kubeadm join第二个master报错

在第二台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”,位置如下
kubeadm join第二个master报错_第1张图片

你可能感兴趣的:(kubernetes,kubernetes,docker,容器)