k8s入坑之报错(2)解决Error execution phase kubelet-start: a Node with name ... and status Ready already exis...

参考链接:云灬沙-Error execution phase kubelet-start: a Node with name ... and status Ready already exists

完整报错信息
[root@localhost ~]# kubeadm join 192.168.1.112:6443 --token kkj95v.77am3u1k3q4b4qc3     --discovery-token-ca-cert-hash sha256:5ea87ae5440baa0412acca4fa7d0c650677b37519f57765eed13b9df88c3b2be 
W0609 12:30:31.021373   40835 join.go:346] [preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.
[preflight] Running pre-flight checks
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
error execution phase kubelet-start: a Node with name "localhost.localdomain" and status "Ready" already exists in the cluster. You must delete the existing Node or change the name of this new joining Node
To see the stack trace of this error execute with --v=5 or higher

使用kubeadm部署K8S的时候出现了这样的问题,因为使用的是虚拟机复制,Node是Master的复制,
kubeadm 默认使用主机名作为节点名,当您从主服务器克隆工作程序时,它们具有相同的主机名。

解决方案:

  1. 给node一个新的hostname通过hostnamectl或其他工具
  2. 在集群加入Node时使用–node-name来标识一下
    例如可以先执行这一句再加入
hostnamectl set-hostname k8s-node1

记得使用

kubeadm reset

参考链接:https://stackoverflow.com/questions/66472399/error-execution-phase-kubelet-start-a-node-with-name-and-status-ready-alrea

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值