在第二台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