当前位置:   article > 正文

“Container runtime network not ready“ networkReady=“NetworkReady=false reason:NetworkPluginNotReady_container runtime network not ready" networkready=

container runtime network not ready" networkready="networkready=false reaso

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

  1. [root@node3 ~]# systemctl status kubelet
  2. ● kubelet.service - kubelet: The Kubernetes Node Agent
  3. Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)
  4. Drop-In: /usr/lib/systemd/system/kubelet.service.d
  5. └─10-kubeadm.conf
  6. Active: active (running) since 三 2024-02-28 11:25:08 CST; 3h 37min ago
  7. Docs: https://kubernetes.io/docs/
  8. Main PID: 29889 (kubelet)
  9. CGroup: /system.slice/kubelet.service
  10. └─29889 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --conf...
  11. 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"
  12. 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"
  13. 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"
  14. 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"
  15. 2月 28 15:02:10 node3 kubelet[29889]: E0228 15:02:10.553576 29889 kubelet.go:2391] "Container runtime network not ready" networkReady="...ialized"
  16. 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"
  17. 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"
  18. 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"
  19. 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"
  20. 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"
  21. Hint: Some lines were ellipsized, use -l to show in full.
  22. [root@node3 ~]# journalctl -u kubelet | tail -n 100
  23. 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"
  24. 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"
  25. 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"
  26. 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到问题节点

  1. [root@master kube]# scp /etc/cni/net.d/* root@node3:/etc/cni/net.d/
  2. 10-calico.conflist 100% 657 24.4KB/s 00:00
  3. calico-kubeconfig 100% 2712 98.5KB/s 00:00
  4. #### 验证
  5. [root@master kube]# kubectl get nodes
  6. NAME STATUS ROLES AGE VERSION
  7. master Ready control-plane,master 4h46m v1.23.15
  8. node3 Ready <none> 3h39m v1.23.15

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/565660
推荐阅读
相关标签
  

闽ICP备14008679号