Coredns in pending state in Kubernetes cluster Coredns in pending state in Kubernetes cluster kubernetes kubernetes

Coredns in pending state in Kubernetes cluster


Unable to update cni config: No networks found in /etc/cni/net.d ..... Oct 02 19:21:32 kubernetus kubelet[19007]: E1002 19:21:32.886170 19007 kubelet.go:2167] Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

According to this error, you forgot to initialize a Kubernetes Pod network add-on. Looking at your settings, I suppose it should be Flannel.

Here is the instruction from the official Kubernetes documentation:

For flannel to work correctly, you must pass --pod-network-cidr=10.244.0.0/16 to kubeadm init.

Set /proc/sys/net/bridge/bridge-nf-call-iptables to 1 by running sysctl net.bridge.bridge-nf-call-iptables=1 to pass bridged IPv4 traffic to iptables’ chains. This is a requirement for some CNI plugins to work, for more information please see here.

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.10.0/Documentation/kube-flannel.yml

Note that flannel works on amd64, arm, arm64 and ppc64le, but until flannel v0.11.0 is released you need to use the following manifest that supports all the architectures:

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/c5d10c8/Documentation/kube-flannel.yml

For more information, you can visit this link.


Try to install Pod network add-on (Base on this guide).

Run this line:

kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml


For the Kubernetes cluster to be available, the cluster should have a Container Networking Interface (CNI). A pod-network is required to be configured for the dns pod to be functional.

Install any of the CNI Providers like: - Flannel - Calico - Canal - WeaveNet, etc.,

Without this, the hosted Kubernetes cluster would have the master in the NotReady State.