获取加入集群命令
kubeadm token create --print-join-command
如
kubeadm join apiserver.k8s:6443 --token kr6b58.54miy4t4jtlmlqcu --discovery-token-ca-cert-hash sha256:8db06ed6b6b9049eaf9d94c606f1d0c1b5f410f883729428cef373ac4865257a
获取certificate-key(如果是控制面)
kubeadm init phase upload-certs --upload-certs
如
ad43e37f11d637459420c203da23be8732c49a2650bfe03799dad2a68a121de3
拼接后得到加入集群命令
假设是控制面
kubeadm join apiserver.k8s:6443 --token kr6b58.54miy4t4jtlmlqcu --discovery-token-ca-cert-hash sha256:8db06ed6b6b9049eaf9d94c606f1d0c1b5f410f883729428cef373ac4865257a --control-plane --certificate-key ad43e37f11d637459420c203da23be8732c49a2650bfe03799dad2a68a121de3 --apiserver-advertise-address 172.19.132.11 --v=5
假设是非控制面
kubeadm join apiserver.k8s:6443 --token kr6b58.54miy4t4jtlmlqcu --discovery-token-ca-cert-hash sha256:8db06ed6b6b9049eaf9d94c606f1d0c1b5f410f883729428cef373ac4865257a
网友评论