当前位置:   article > 正文

K8S集群 NOT READY的解决办法 1.13 错误信息:cni config uninitialized

cni config uninitialized
错误现象:

untime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

log:
#systemctl status kubelet
\u25cf kubelet.service - kubelet: The Kubernetes Node Agent
   Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/kubelet.service.d
           \u2514\u250010-kubeadm.conf
   Active: active (running) since Tue 2020-01-07 15:08:20 UTC; 35min ago
     Docs: http://kubernetes.io/docs/
 Main PID: 910 (kubelet)
    Tasks: 23
   Memory: 93.5M
      CPU: 48.586s
   CGroup: /system.slice/kubelet.service
           \u2514\u2500910 /usr/bin/kubelet --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubele

Jan 07 15:43:41 nav1 kubelet[910]: E0107 15:43:41.868737     910 kubelet.go:2130] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Jan 07 15:43:46 nav1 kubelet[910]: W0107 15:43:46.869683     910 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d
Jan 07 15:43:46 nav1 kubelet[910]: E0107 15:43:46.869801     910 kubelet.go:2130] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Jan 07 15:43:51 nav1 kubelet[910]: W0107 15:43:51.870672     910 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d
Jan 07 15:43:51 nav1 kubelet[910]: E0107 15:43:51.870790     910 kubelet.go:2130] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Jan 07 15:43:56 nav1 kubelet[910]: W0107 15:43:56.871658     910 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d
Jan 07 15:43:56 nav1 kubelet[910]: E0107 15:43:56.871779     910 kubelet.go:2130] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Jan 07 15:44:01 nav1 kubelet[910]: W0107 15:44:01.872529     910 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d
Jan 07 15:44:01 nav1 kubelet[910]: E0107 15:44:01.872649     910 kubelet.go:2130] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Jan 07 15:44:06 nav1 kubelet[910]: W0107 15:44:06.873414     910 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d
Jan 07 15:44:06 nav1 kubelet[910]: E0107 15:44:06.873540     910 kubelet.go:2130] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
Jan 07 15:44:11 nav1 kubelet[910]: W0107 15:44:11.874201     910 cni.go:171] Unable to update cni config: No networks found in /etc/cni/net.d
Jan 07 15:44:11 nav1 kubelet[910]: E0107 15:44:11.874291     910 kubelet.go:2130] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
解决办法:
docker pull quay.io/coreos/flannel:v0.9.1-amd64

mkdir -p /etc/cni/net.d/

cat <<EOF> /etc/cni/net.d/10-flannel.conf
{"name":"cbr0","type":"flannel","delegate": {"isDefaultGateway": true}}
EOF
mkdir /usr/share/oci-umount/oci-umount.d -p
mkdir /run/flannel/
cat <<EOF> /run/flannel/subnet.env
FLANNEL_NETWORK=172.100.0.0/16
FLANNEL_SUBNET=172.100.1.0/24
FLANNEL_MTU=1450
FLANNEL_IPMASQ=true
EOF

然后执行命令:
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.9.1/Documentation/kube-flannel.yml
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/167539?site
推荐阅读
相关标签
  

闽ICP备14008679号