k8s初始化 报错Error getting node“ err=“node

编程入门 行业动态 更新时间:2024-10-17 17:19:39

k8s初始化 <a href=https://www.elefans.com/category/jswz/34/1771188.html style=报错Error getting node“ err=“node"/>

k8s初始化 报错Error getting node“ err=“node

    [root@master ~]#kubeadm init \
    --apiserver-advertise-address=192.168.255.168 \
    --image-repository registry.aliyuncs/google_containers \
    --service-cidr=10.1.0.0/16 \
    --pod-network-cidr=10.244.0.0/16 
我执行了上面这条命令之后就会在下面这里卡很久
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
然后就报下面这个错
[kubelet-check] Initial timeout of 40s passed.

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 running Kubernetes containers by using crictl:
    - 'crictl --runtime-endpoint unix:///var/run/containerd/containerd.sock ps -a | grep kube | grep -v pause'
    Once you have found the failing container, you can inspect its logs with:
    - 'crictl --runtime-endpoint unix:///var/run/containerd/containerd.sock 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
[root@master ~]# 
执行下面命令显示报错
[root@master ~]# journalctl -xeu kubelet
5月 21 21:07:57 master kubelet[15135]: E0521 21:07:57.697075   15135 kubelet.go:2419] "Error getting node" err="node

就出现这个错误,我几个node的IP地址检查过好多遍也没问题
上网找了很多方法都解决不了

咋整啊

==================================

解决方法:

我问了下我老师,也查了下资料k8s 已经弃用了docker了,如果安装的kubelet   kubeadm  kubectl
是V1.24就会出现以上错误,安装的时候指定一下1.23版本,就可以解决了:yum install -y kubelet-1.23.6 kubeadm-1.23.6 kubectl-1.23.6

参考连接:=1001.2014.3001.5502

更多推荐

k8s初始化 报错Error getting node“ err=“node

本文发布于:2024-02-10 21:47:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1677468.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报错   初始化   k8s   err   node

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!