在第二台master使用命令时报错
kubeadm join 192.168.249.10:6443 --token 2svtiw.68ice6gm6w6c8bje --discovery-token-ca-cert-hash sha256:70165bfced0533d756796d16845f466cd6cfbec506c7733134eb483bddad36c8 --control-plane --certificate-key 06c460c8470c0fe734ce43e9fba227f09073e0b4b7e6db62b034af9b659c4d27
报错内容
unable to add a new control plane instance to a cluster that doesn’t have a stable controlPlaneEndpoint address
到第一台master修改configmap,添加controlPlaneEndpoint参数
kubectl -n kube-system edit cm kubeadm-config
添加controlPlaneEndpoint:“master1ip:6443”,位置如下

从master1拷贝证书到master2
cd /etc/kubernetes

在尝试使用kubeadm加入第二个master节点时遇到错误:'unable to add a new control plane instance to a cluster that doesn’t have a stable controlPlaneEndpoint address'。解决方法是,在现有master上更新configmap,添加controlPlaneEndpoint参数,设置为'master1ip:6443'。然后将master1的证书和新生成的token复制到master2,并在master2上运行kubeadm命令,确保master节点至少分配2核2G资源。
最低0.47元/天 解锁文章
451

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



