出现这个报错,多是因为之前的集群信息没有清理干净。
解决办法如下:
执行命令,获取etcd节点列表。
etcd节点名称为 “etcd”+hostname
这里以 etcd-k8s-master1 为例, 进入etcd容器内部
返回的信息如下
返回信息的第三列为主机名。 我当前加入失败的节点,主机名为master2 , master2恰恰在列表中。所以得出结论, 加入失败是因为etcd节点信息没有重制, 我们手动把master2删掉即可添加成功
- Author:Hang Ke
- URL:https://hang.ke/article/kubeadm-master-etcd-health
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts
