自己手工安装了k8s花费了不少时间,后来发现在kuboard.cn上有安装手册,今天测试一下
环境:
host主机:ubuntu 18.04, 192.168.10.8,虚拟网络 192.168.122.1
kvm虚拟机三台,centos7.8, 192.168.122.10: master,kvm名字 centos7v1
kvm虚拟机三台,centos7.8 ,192.168.122.51: work1,kvm名字 centos7v2
kvm虚拟机三台,centos7.8 ,192.168.122.52: work2,,kvm名字 centos7v3
步骤:准备master的环境并检查
master目前能够上网,已经配置好了。但还没有安装net-tools.否则网络工具不能使用
$ yum install net-tools -y
----- 省略 ----
net-tools-2.0-0.25.20131004git.el7.x86_64.rpm | 306 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1
验证中 : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1
已安装:
net-tools.x86_64 0:2.0-0.25.20131004git.el7
完毕!
使用命令看该机器的IP地址,马上需要使用.
[root@localhost ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.122.10 netmask 255.255.255.0 broadcast 192.168.122.255
inet6 fe80::5054:ff:feb8:ad60 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:b8:ad:60 txqueuelen 1000 (Ethernet)
RX packets 4337 bytes 5325748 (5.0 MiB)
RX errors 0 dropped 18 overruns 0 frame 0
TX packets 1772 bytes 127104 (124.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ip地址为192.168.122.10,将来作为master的地址使用.
设置机器的名称为k8s-master,将来为了识别比较方便,同时,在/etc/hosts文件尾部添加 127.0.0.1 k8s-master .
[root@localhost ~]# hostnamectl set-hostname k8s-master
使用lscpu命令看看cpu个数是不是大于2,如果小于2的话,使用virsh edit centos8v1 修改cpu的个数,重启虚拟机。
[root@localhost ~]# lscpu
lscpu
Architecture:

本文详细记录了通过kuboard.cn提供的安装手册手动部署Kubernetes (K8s) 集群的过程,包括安装docker、kubelet,初始化master节点及工作节点等关键步骤。
最低0.47元/天 解锁文章
602

被折叠的 条评论
为什么被折叠?



