master kubelet[35712]: E0321 17:14:23.075875 35712 kubelet.go:2183] node “master“ not found

问题如下:

        Unfortunately, an error has occurred:
                timed out waiting for the condition

        This error is likely caused by:
                - The kubelet is not running
                - The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

        If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
                - 'systemctl status kubelet'
                - 'journalctl -xeu kubelet'

        Additionally, a control plane component may have crashed or exited when started by the container runtime.
        To troubleshoot, list all containers using your preferred container runtimes CLI.

        Here is one example how you may list all Kubernetes containers running in docker:
                - 'docker ps -a | grep kube | grep -v pause'
                Once you have found the failing container, you can inspect its logs with:
                - 'docker logs CONTAINERID'

error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher
 

查日志发现:

master kubelet[35712]: E0321 17:14:23.075875   35712 kubelet.go:2183] node "master" not found

解决方案:

第一步:查看docker服务起来了吗?

第二步:查看yaml文件中,IP写对了吗?要写成本机的啊!!

查来查去,发现是init-config.yaml中

advertiseAddress: 192.168.206.133 #master节点IP

IP写错了!!真是坑啊!

这里要写本机的IP,不要复制过来或者写成别的了!

以上步骤查完了,还是这个问题?

第三步:杀掉整个部署进程,重来一次!

hostnamectl set-hostname master

cat clean.sh

for port in 6443 10259 10257 10250 2380 2379
do
    lsof -i:$port |awk '{print $2}' | grep -v PID | xargs kill -9

done
rm -rf /etc/kubernetes/manifests/kube-apiserver.yaml /etc/kubernetes/manifests/kube-controller-manager.yaml  /etc/kubernetes/manifests/kube-scheduler.yaml /etc/kubernetes/manifests/etcd.yaml /var/lib/etcd/*

sh clean.sh

swapoff -a && kubeadm reset && systemctl daemon-reload && systemctl restart kubelet && iptables -F && iptables -t nat -F && iptables -t mangle -F && iptables -X

再来一次!

见了这个信息,表示一定可以成功的!

总之:一定是某个进程没起来,或者是配置文件出错了。

如果是kubeadm安装的集群,详细步骤请看:

centos7.9 kubeadm 安装kubernetes集群(无坑)_centos7.9 安装kubenates-CSDN博客

只要按照这个一步步来,百分百成功!

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值