kubeadm部署k8s集群node一直是notready狀態的解決方案


使用kubeadm工具部署好了一個k8s集群並加入了一個node節點

但是join進來的node一直處於notready狀態

[root@k8s-master net.d]# kubectl get nodes
NAME         STATUS             ROLES                  AGE   VERSION
k8s-master   Ready        control-plane,master         20h   v1.22.2
k8s-node1    NotReady           <none>                 17h   v1.22.2

 

到有問題節點上執行 journalctl  -f -u  kubelet.service 命令看到有如下報錯

k8s-node1 kubelet[27242]: I1014 11:17:29.409068 27242 cni.go:239] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
Oct 14 11:17:29 k8s-node1 kubelet[27242]: E1014 11:17:29.996079 27242 kubelet.go:2332] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized"

解決方法,將master上/etc/cni/net.d 目錄下的文件拷貝到有問題的節點上:
scp server4:/etc/cni/net.d/* /etc/cni/net.d/
可以了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM