Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes V1.6.2 unable to update cni config: No networks found in /etc/cni/net.d

Tags:

kubernetes

Based on this (https://kubernetes.io/docs/getting-started-guides/kubeadm/) step I have installed Kubernetes in Centos 7 box and ram the kubeadm init command.

But node is not in ready status. When I looked the /var/log/messages. getting below message.

Apr 30 22:19:38 master kubelet: W0430 22:19:38.226441    2372 cni.go:157] Unable to update cni config: No networks found in /etc/cni/net.d
Apr 30 22:19:38 master kubelet: E0430 22:19:38.226587    2372 kubelet.go:2067] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

My kubelet running with these arguments.

 /usr/bin/kubelet --kubeconfig=/etc/kubernetes/kubelet.conf --require-kubeconfig=true --pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt --cgroup-driver=systemd

in my server I didn't see /etc/cni/net.d directory. in /opt/cin/bin directory I see these files.

# ls  /opt/cni/bin
bridge  cnitool  dhcp  flannel  host-local  ipvlan  loopback  macvlan  noop  ptp  tuning

How can I clear this error message?

like image 434
sfgroups Avatar asked May 01 '17 02:05

sfgroups


1 Answers

Looks like you've chosen flannel as CNI-networking. Pls check if you've specified --pod-network-cidr 10.244.0.0/16 while kubeadm init.

Also check if you've ConfigMaps created for flannel as in here @ https://github.com/coreos/flannel/blob/master/Documentation/kube-flannel.yml

like image 51
karun Avatar answered Sep 28 '22 02:09

karun