k8s集群初始化超时错误解决
解决k8s集群初始化超时
·
初始化集群报错信息如下
[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.
docker ps -a 查看容器状态时,所有服务状态都显示created状态
因为docker ps -a 命令没有报错,我默认docker是好的,以为是k8s哪里配置问题,困扰了我好久。。。。一直卸载重装k8s
直到我在系统message日志看到了dockers相关的报错。。
查看docker的状态
[root@k8s-m1 ~]# systemctl status docker -l
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since 二 2022-09-27 15:17:38 CST; 1min 31s ago
Docs: https://docs.docker.com
Main PID: 12544 (dockerd)
CGroup: /system.slice/docker.service
└─12544 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
9月 27 15:17:36 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:36.838334758+08:00" level=error msg="failed to load container" container=cab0fd2dfdbb40dc4269903a06d6e793d104a66b87a1684732ddda716406e111 error="open /opt/k8s/docker/containers/cab0fd2dfdbb40dc4269903a06d6e793d104a66b87a1684732ddda716406e111/config.v2.json: no such file or directory"
9月 27 15:17:36 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:36.838429177+08:00" level=error msg="failed to load container" container=25fda4da4b2d205a85c815590ec72af7d0cf5847a2fb06e8ab544a6bf79d5928 error="open /opt/k8s/docker/containers/25fda4da4b2d205a85c815590ec72af7d0cf5847a2fb06e8ab544a6bf79d5928/config.v2.json: no such file or directory"
9月 27 15:17:36 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:36.838448896+08:00" level=error msg="failed to load container" container=4dea07cea1ee6fdc090c217eb6244fb565243ac3530ea47e62e9fdd48fa7797c error="open /opt/k8s/docker/containers/4dea07cea1ee6fdc090c217eb6244fb565243ac3530ea47e62e9fdd48fa7797c/config.v2.json: no such file or directory"
9月 27 15:17:37 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:37.804032457+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
9月 27 15:17:37 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:37.918307689+08:00" level=info msg="Loading containers: done."
9月 27 15:17:37 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:37.918976956+08:00" level=warning msg="failed to retrieve runc version: exit status 127"
9月 27 15:17:38 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:38.018293270+08:00" level=info msg="Docker daemon" commit=b0f5bc3 graphdriver(s)=overlay2 version=20.10.7
9月 27 15:17:38 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:38.018354269+08:00" level=info msg="Daemon has completed initialization"
9月 27 15:17:38 k8s-m1 systemd[1]: Started Docker Application Container Engine.
9月 27 15:17:38 k8s-m1 dockerd[12544]: time="2022-09-27T15:17:38.109117363+08:00" level=info msg="API listen on /var/run/docker.sock"
根据报错信息排查runc
[root@k8s-m1 ~]# runc
runc: error while loading shared libraries: libseccomp.so.2: cannot open shared object file: No such file or directory
根据runc报错信息安装依赖
[root@k8s-m1 yum.repos.d]# yum install libseccomp.so.2
重启docker解决
更多推荐
已为社区贡献1条内容
所有评论(0)