今天在原有的k8s集群上新增一个节点,在使用kubeadm join命令增加node节点成功以后,等了5分钟,在master上查看新加节点状态一直是notready状态,然后进行排查
在node节点上执行命令查看kubelet日志
journalctl -f -u kubelet
日志如下:
Mar 09 13:52:46 k8s-cpu-node2 kubelet[12975]: E0309 13:52:46.191060 12975 kubelet.go:2347] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized" Mar 09 13:52:48 k8s-cpu-node2 kubelet[12975]: I0309 13:52:48.004966 12975 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d" Mar 09 13:52:51 k8s-cpu-node2 kubelet[12975]: E0309 13:52:51.210913 12975 kubelet.go:2347] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized" Mar 09 13:52:53 k8s-cpu-node2 kubelet[12975]: I0309 13:52:53.006202 12975 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d" Mar 09 13:52:56 k8s-cpu-node2 kubelet[12975]: E0309 13:52:56.229009 12975 kubelet.go:2347] "Container runtime network not ready" networkReady="NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized" Mar 09 13:52:58 k8s-cpu-node2 kubelet[12975]: I0309 13:52:58.007075 12975 cni.go:240] "Unable to update cni config" err="no networks found in /etc/cni/net.d"
看起来是网络cni插件有点问题,不能找到/etc/cni/net.d目录,然后去其它节点查看却有这个目录,然后试着将master节点的这个目录复制过来试试
scp -r k8s-cpu-master:/etc/cni /etc/cni
接着重启kubelet
systemctl restart kubelet
然后再等待3分钟左右,node节点就正常的ready状态了
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://sulao.cn/post/813
相关阅读
- k8s使用flannel作为CNI网络插件
- k8s中harbor-database-0日志报Permissions should be u=rwx (0700)的处理方法
- k8s使用helm部署harbor镜像仓库并使用nodeport方式暴露
- k8s集群部署prometheus/node-exporter/dcgm-exporter
- k8s中calico匹配多种网络接口名字的方法
- ubuntu22.04使用containerd部署k8s集群
- k8s集群kube-proxy从iptables模式切换到ipvs模式
- k8s级联删除(删除deployment却删除不了rs和pod)异常问题的处理办法
- k8s中修改containerd存储目录并将数据迁移到新磁盘目录
- k8s网络cni插件calico的安装和网络模式切换
评论列表