node3 kubelet无法启动

来源:7-1 定时任务迁移kubernetes

苏赋

2021-07-05

nginx-proxy 的容器已经下载下来,但是根据kubelet无法启动,错误提示无法连接6443

nginx-proxy 容器是需要手动启动吗

kubelet报错如下:
Jul 5 15:15:09 node3 kubelet: I0705 15:15:09.434845 12868 csi_plugin.go:1016] Failed to contact API server when waiting for CSINode publishing: Get “https://127.0.0.1:6443/apis/storage.k8s.io/v1/csinodes/node3”: dial tcp 127.0.0.1:6443: connect: connection refused
Jul 5 15:15:09 node3 kubelet: E0705 15:15:09.435235 12868 cri_stats_provider.go:376] Failed to get the info of the filesystem with mountpoint “/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs”: failed to get device for dir “/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs”: could not find device with major: 0, minor: 37 in cached partitions map.
Jul 5 15:15:09 node3 kubelet: E0705 15:15:09.435277 12868 kubelet.go:1274] Image garbage collection failed once. Stats initialization may not have completed yet: invalid capacity 0 on image filesystem
Jul 5 15:15:09 node3 kubelet: E0705 15:15:09.483914 12868 reflector.go:138] k8s.io/client-go/informers/factory.go:134: Failed to watch *v1.Service: failed to list *v1.Service: Get “https://127.0.0.1:6443/api/v1/services?limit=500&resourceVersion=0”: dial tcp 127.0.0.1:6443: connect: connection refused
Jul 5 15:15:09 node3 kubelet: E0705 15:15:09.499762 12868 reflector.go:138] k8s.io/client-go/informers/factory.go:134: Failed to watch *v1.CSIDriver: failed to list *v1.CSIDriver: Get “https://127.0.0.1:6443/apis/storage.k8s.io/v1/csidrivers?limit=500&resourceVersion=0”: dial tcp 127.0.0.1:6443: connect: connection refused
Jul 5 15:15:09 node3 kubelet: E0705 15:15:09.499900 12868 controller.go:144] failed to ensure lease exists, will retry in 200ms, error: Get “https://127.0.0.1:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/node3?timeout=10s”: dial tcp 127.0.0.1:6443: connect: connection refused
Jul 5 15:15:09 node3 kubelet: I0705 15:15:09.558885 12868 factory.go:163] Registration of the crio container factory failed: Get “http://%2Fvar%2Frun%2Fcrio%2Fcrio.sock/info”: dial unix /var/run/crio/crio.sock: connect: no such file or directory
Jul 5 15:15:09 node3 kubelet: I0705 15:15:09.559052 12868 factory.go:163] Registration of the docker container factory failed: failed to validate Docker info: failed to detect Docker info: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Jul 5 15:15:09 node3 kubelet: E0705 15:15:09.623246 12868 reflector.go:138] k8s.io/client-go/informers/factory.go:134: Failed to watch *v1.RuntimeClass: failed to list *v1.RuntimeClass: Get “https://127.0.0.1:6443/apis/node.k8s.io/v1/runtimeclasses?limit=500&resourceVersion=0”: dial tcp 127.0.0.1:6443: connect: connection refused
Jul 5 15:15:09 node3 kubelet: E0705 15:15:09.710416 12868 controller.go:144] failed to ensure lease exists, will retry in 400ms, error: Get “https://127.0.0.1:6443/apis/coordination.k8s.io/v1/namespaces/kube-node-lease/leases/node3?timeout=10s”: dial tcp 127.0.0.1:6443: connect: connection refused
Jul 5 15:15:09 node3 systemd: Unit kubelet.service entered failed state.
Jul 5 15:15:09 node3 systemd: kubelet.service failed.
Jul 5 15:15:09 node3 kubelet: F0705 15:15:09.888078 12868 kubelet.go:1350] Failed to start ContainerManager failed to get rootfs info: failed to get device for dir “/var/lib/kubelet”: could not find device with major: 0, minor: 37 in cached partitions map
Jul 5 15:15:16 node3 etcd: WARNING: 2021/07/05 15:15:16 grpc: Server.processUnaryRPC failed to write status: connection error: desc = “transport is closing”

写回答

1回答

苏赋

提问者

2021-07-05

容器已下载,但是不启动

[root@node3 ~]# crictl images

IMAGE                                                          TAG                 IMAGE ID            SIZE

docker.io/library/nginx                                        1.19                f0b8a9a541369       53.7MB

registry.cn-hangzhou.aliyuncs.com/kubernetes-kubespray/pause   3.2                 80d28bedfe5de       298kB

k8s.gcr.io/pause                                               3.2                 80d28bedfe5de       298kB


[root@node3 ~]# crictl ps -a

CONTAINER           IMAGE               CREATED             STATE               NAME                ATTEMPT             POD ID

[root@node3 ~]#



问题和:https://coding.imooc.com/learn/questiondetail/GzLgV6kWyw46kWxb.html 这个很相似,但是不知道怎么解决

0
7
Mr_Lee_Bin
我的解决方案: 先下载 pull,再测试 ctr run -t -d registry.cn-hangzhou.aliyuncs.com/imooc2/redis:alpine redis 跑不起来,卸载[root@aliyuan-ops-01 ~]# rpm -e libseccomp-devel-2.3.1-4.el7.x86_64 --nodeps [root@aliyuan-ops-01 ~]# rpm -e libseccomp-2.3.1-4.el7.x86_64 --nodeps #下载高于2.4以上的包 [root@aliyuan-ops-01 ~]# wget http://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/libseccomp-2.5.1-1.el8.x86_64.rpm #安装 [root@aliyuan-ops-01 ~]# rpm -ivh libseccomp-2.5.1-1.el8.x86_64.rpm 再run,OK! 回看node3 journalctl -f -u kubelet 和journalctl -f -u kube-proxy好了。
2022-08-11
共7条回复

Kubernetes生产落地全程实践

一个互联网公司落地Kubernetes全过程点点滴滴

2293 学习 · 2211 问题

查看课程