Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

初始化k8s环境执行以下三个脚本

http://1.116.235.157:1080/install/uennew.sh

runtime采用docker:   http://1.116.235.157:1080/install/dockerinit.sh

runtime采用containerd(推荐):   http://1.116.235.157:1080/install/containerdinit.sh

http://1.116.235.157:1080/install/k8sinit.sh

初始化集群完毕后

1、在原master上执行

kubeadm token create --print-join-command

返回结果,以实际返回为准

Image Removed

4、在新node192.168.31.182上执行将worker节点ip加入到当前master的免密登录列表中

Code Block
ssh-copy-id 192.168.1.120
#输入192.168.1.120的root密码,或者提前在192.168.1.120中加入master的公钥

再执行如下面命令

Code Block
worker=192.168.1.120
##获取加入集群的token命令,因为我们取的临时的token,所以为了安全设置5分钟即可
joinconmand=$(kubeadm token create --print-join-command --ttl 5m)
##加入集群
ssh ${worker} "$joinconmand"