Kubeadm Errors: network plugin is not ready: cni config uninitialized

Error Message

=================================
$ kubectl get nodes
NAME                                          STATUS     ROLES    AGE   VERSION
ip-172-31-23-27.ap-south-1.compute.internal   NotReady   master   79m   v1.17.1
=================================
$ kubectl describe nodes ip-172-31-23-27.ap-south-1.compute.internal
 Ready            False   Fri, 17 Jan 2020 06:18:48 +0000   Fri, 17 Jan 2020 05:03:20 +0000   KubeletNotReady              runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized
=================================
$ kubectl get pods -n=kube-system
NAME                                                                  READY   STATUS    RESTARTS   AGE
coredns-6955765f44-7cgfn                                              0/1     Pending   0          80m
coredns-6955765f44-xjtww                                              0/1     Pending   0          80m
etcd-ip-172-31-23-27.ap-south-1.compute.internal                      1/1     Running   0          80m
kube-apiserver-ip-172-31-23-27.ap-south-1.compute.internal            1/1     Running   0          80m
kube-controller-manager-ip-172-31-23-27.ap-south-1.compute.internal   1/1     Running   0          80m
kube-proxy-bd9n6                                                      1/1     Running   0          80m
kube-scheduler-ip-172-31-23-27.ap-south-1.compute.internal            1/1     Running   0          80m
=================================
$ kubectl describe pods coredns-6955765f44-7cgfn -n=kube-system
Events:
  Type     Reason            Age                   From               Message
  ----     ------            ----                  ----               -------
  Warning  FailedScheduling  4m23s (x53 over 80m)  default-scheduler  0/1 nodes are available: 1 node(s) had taints that the pod didn't tolerate.

Solution

For Weavenet
$ kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

OR
For Calico
$ kubectl apply -f https://docs.projectcalico.org/v3.11/manifests/calico.yaml
Rajesh Kumar
Follow me