How Do You Get Kubernetes Nodes to Be Ready?

Problem scenario
Your Kubernetes cluster is not working. The nodes are not ready. You see your Kubernetes nodes are not ready (with kubectl get nodes). You also see this error from a kubectl describe node foobar command:

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

What should you do?

(If you get a different error, see this posting How Do You Troubleshoot a Kubernetes Cluster That is Not Working at the Node Level?.)

Possible Solution #1
Run these two commands (as we found them to work with an EKS cluster):

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

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

Possible Solution #2
You may want to see this posting if there is a problem with the subnet.env file on the worker nodes.

Possible Solution #3 (if using AKS)
Reboot the node. If that doesn't work, reimage the node. (The error message likely would have been different in the problem scenario for this solution to work. This solution was adapted from this external page.)

Possible Solution #4 (if you are getting an error about a network plugin)
See the posting How Do You Get Nodes in Kubernetes to Be Ready with a Network Plugin Error?.

Leave a comment

Your email address will not be published. Required fields are marked *