赞
踩
k8s集群初始化后, node3节点加入集群, 状态Noready
1、2、查看node3节点kubelet状态,以及日志
问题点:"Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"
原因:缺少网络cni
- [root@node3 ~]# systemctl status kubelet
- ● kubelet.service - kubelet: The Kubernetes Node Agent
- Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)
- Drop-In: /usr/lib/systemd/system/kubelet.service.d
- └─10-kubeadm.conf
- Active: active (running) since 三 2024-02-28 11:25:08 CST; 3h 37min ago
- Docs: https://kubernetes.io/docs/
- Main PID: 29889 (kubelet)
- CGroup: /system.slice/kubelet.service
- └─29889 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --conf...
-
- 2月 28 15:02:08 node3 kubelet[29889]: E0228 15:02:08.473967 29889 file_linux.go:61] "Unable to read config path" err="path does not exi...nifests"
- 2月 28 15:02:09 node3 kubelet[29889]: E0228 15:02:09.332189 29889 file.go:104] "Unable to read config path" err="path does not exist, i...nifests"
- 2月 28 15:02:09 node3 kubelet[29889]: E0228 15:02:09.474789 29889 file_linux.go:61] "Unable to read config path" err="path does not exi...nifests"
- 2月 28 15:02:10 node3 kubelet[29889]: E0228 15:02:10.475357 29889 file_linux.go:61] "Unable to read config path" err="path does not exi...nifests"
- 2月 28 15:02:10 node3 kubelet[29889]: E0228 15:02:10.553576 29889 kubelet.go:2391] "Container runtime network not ready" networkReady="...ialized"
- 2月 28 15:02:11 node3 kubelet[29889]: I0228 15:02:11.026553 29889 cni.go:240] "Unable to update cni config" err="no networks found in /...i/net.d"
- 2月 28 15:02:11 node3 kubelet[29889]: E0228 15:02:11.475784 29889 file_linux.go:61] "Unable to read config path" err="path does not exi...nifests"
- 2月 28 15:02:12 node3 kubelet[29889]: E0228 15:02:12.476201 29889 file_linux.go:61] "Unable to read config path" err="path does not exi...nifests"
- 2月 28 15:02:13 node3 kubelet[29889]: E0228 15:02:13.477159 29889 file_linux.go:61] "Unable to read config path" err="path does not exi...nifests"
- 2月 28 15:02:14 node3 kubelet[29889]: E0228 15:02:14.477465 29889 file_linux.go:61] "Unable to read config path" err="path does not exi...nifests"
- Hint: Some lines were ellipsized, use -l to show in full.
-
-
- [root@node3 ~]# journalctl -u kubelet | tail -n 100
- 2月 28 15:01:33 node3 kubelet[29889]: E0228 15:01:33.454130 29889 file_linux.go:61] "Unable to read config path" err="path does not exist, ignoring" path="/etc/kubernetes/manifests"
- 2月 28 15:01:34 node3 kubelet[29889]: E0228 15:01:34.454646 29889 file_linux.go:61] "Unable to read config path" err="path does not exist, ignoring" path="/etc/kubernetes/manifests"
- 2月 28 15:01:35 node3 kubelet[29889]: E0228 15:01:35.455584 29889 file_linux.go:61] "Unable to read config path" err="path does not exist, ignoring" path="/etc/kubernetes/manifests"
- 2月 28 15:01:35 node3 kubelet[29889]: E0228 15:01:35.511148 29889 kubelet.go:2391] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"
3、复制cni到问题节点
- [root@master kube]# scp /etc/cni/net.d/* root@node3:/etc/cni/net.d/
- 10-calico.conflist 100% 657 24.4KB/s 00:00
- calico-kubeconfig 100% 2712 98.5KB/s 00:00
-
-
- #### 验证
- [root@master kube]# kubectl get nodes
- NAME STATUS ROLES AGE VERSION
- master Ready control-plane,master 4h46m v1.23.15
- node3 Ready <none> 3h39m v1.23.15
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。