k8s解决 搭建集群的时候notReady问题

由于k8s安装master一直处于NotReady状态查看日志出现 failed to find plugin “flannel” in path [/opt/cni/bin]

日志信息


1 : [failed to find plugin "flannel" in path [/opt/cni/bin]]
1 W1226 16:19:36.668133   47110 cni.go:237] Unable to update cni config: no valid networks found in /etc/cni/net.d
1 E1226 16:19:36.945778   47110 kubelet.go:2187] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
1 W1226 16:19:41.669980   47110 cni.go:202] Error validating CNI config list {

查看 /opt/cni/bin 缺少 flannel 

查看节点状态

kubectl get nodes

查看日志命令

journalctl -u kubelet -f

解决方案

需要下载CNI插件:CNI plugins v0.8.6

github下载地址:https://github.com/containernetworking/plugins/releases/tag/v0.8.6

(在1.0.0版本后CNI Plugins中没有flannel)

下载后通过xftp 上传到Linux /home目录解压

tar zxvf cni-plugins-linux-amd64-v0.8.6.tgz

 复制 flannel 到 /opt/cni/bin/

[root@k8s-node1 home]# cp flannel /opt/cni/bin/

查看节点状态

查看到状态立马变为Ready,至此解决问题。

  • 9
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值