k8s部署报错network: failed to find plugin “flannel“ in path [/opt/cni/bin]]

k8s在部署工作负载时,pod详情页提示以下问题

Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "50f3931eac5991127a7371f5b4adeb9c53a37b65c267fbad7f56dd20a2f647dd" network for pod "sleep-668b75d4c4-68gq7": networkPlugin cni failed to set up pod "sleep-668b75d4c4-68gq7_default" network: failed to find plugin "flannel" in path [/opt/cni/bin], failed to clean up sandbox container "50f3931eac5991127a7371f5b4adeb9c53a37b65c267fbad7f56dd20a2f647dd" network for pod "sleep-668b75d4c4-68gq7": networkPlugin cni failed to teardown pod "sleep-668b75d4c4-68gq7_default" network: failed to find plugin "flannel" in path [/opt/cni/bin]]
  Normal   SandboxChanged          3m22s (x185 over 43m)  kubelet            Pod sandbox changed, it will be killed and re-created.

解决方案:
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/

cp flannel /opt/cni/bin/

删除pod,此时pod启动成功状态为Running

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值