kubeadm join第二个master报错

在尝试使用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资源。
摘要由CSDN通过智能技术生成

在第二台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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值