本文主要是介绍Pod提示NetworkPlugin cni failed to set up .. network:open/run/flannel/subnet.env:nosuchfileordirectory,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
K8s在创建pod时发现pod状态为ContainerCreating状态
检查pod的日志发现提示
Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "fdd30141bf51b68d4f08a2405ea287508aa0d585d30c853a849d9d57cb7c1062" network for pod "tiller-deploy-58565b5464-zhnml": NetworkPlugin cni failed to set up pod "tiller-deploy-58565b5464-zhnml_kube-system" network: open /run/flannel/subnet.env: no such file or directory
在对应node节点上 新建 /run/flannel/subnet.env
这个文件写入内容:
FLANNEL_NETWORK=10.244.0.0/16
FLANNEL_SUBNET=10.244.0.1/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true
后删除异常pod后状态恢复
这篇关于Pod提示NetworkPlugin cni failed to set up .. network:open/run/flannel/subnet.env:nosuchfileordirectory的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!