8、新增一个node节点
按照上面的方式全新安装,在加入集群过程稍有不同。
[root@k8smaster ~]# kubeadm token create --print-join-command # 因为token过期时间是24h,所以需要重新生成
W1228 09:54:57.783734 6538 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
kubeadm join 192.168.1.80:6443 --token uqatlq.f1jozwauamdp4zxv --discovery-token-ca-cert-hash sha256:b8f8276dac835c51befa418d6184a2cddbe80a39031c142e8500df37aafbba34
新节点执行加入,
[root@localhost ~]# hostnamectl set-hostname k8snode3
[root@k8snode3 ~]# kubeadm join 192.168.1.80:6443 --token uqatlq.f1jozwauamdp4zxv --discovery-token-ca-cert-hash sha256:b8f8276dac835c51befa418d6184a2cddbe80a39031c142e8500df37aafbba34
[root@k8smaster ~]# kubectl get nodes # 查看node3节点新增成功,这里可能会notready,安装好网络插件就好。
[root@k8smaster ~]# kubectl get nodes NAME STATUS ROLES AGE VERSION k8smaster Ready master 38h v1.18.0 k8snode1 Ready <none> 38h v1.18.0 k8snode2 Ready <none> 38h v1.18.0 k8snode3 Ready <none> 3m36s v1.18.0
标签:--,token,集群,Ready,Kubeadm,k8s,root,kubeadm From: https://www.cnblogs.com/sunnyyangwang/p/18637194