kubectl get nodes fails; kubelet and kube-proxy errors

Hi. I was following along with Kubernetes the Hard Way. At the end of the Bootstrapping the Kubernetes Worker Nodes section I am having some issues with the kubelet and kube-proxy. Both are showing  "dial tcp :6443: getsockopt: connection refused" errors in the logs, and running `kubectl get nodes` on the masters returns no values. 

I also have this error in the containerd logs "
please check CRI plugin status before setting up network for pods" error="cni config load failed: no network config found in /etc/cni/net.d: cni plugin not initialized: failed to load".

Help? 

  • post-author-pic
    iglablues
    01-15-2019

    @willb am I missing something? Did some Googling and it appears that there is supposed to be a config file in /etc/cni/net.d, but I don't see anywhere in the instructions where we're told to place anything there...

  • post-author-pic
    Will B
    01-15-2019

    The original Kubernetes the Hard Way guide is written for Google Cloud servers. The way we are doing it, networking is done differently and the /etc/cni/net.d stuff is not needed.


    That error message is normal and you can ignore it. The basic problem seems to be that your worker nodes kubelet and kube-proxy cannot reach the kube API on the controllers (through the load balancer). First, you want to check that the kube-apiserver is up and running on the controllers, and that the load balancer is running and working. Log into to the load balancer server and do:

    curl -k https://localhost:6443/version

    That should return some version info from the Kube API. If it does not, try that same command on the controllers as well. If it works on the controllers but not the load balancer, the load balancer is the issue. Make sure your nginx server is running with the right config. If the command fails on either controller, make sure all the kube services and etcd are running, and check their configs and/or logs. Let me know what you find and I'll ge glad to help you proceed from there!

  • post-author-pic
    iglablues
    01-15-2019

    Thank you! I checked the kubeconfig as you suggested on Slack, and it was in fact missing the IP address of the API server. I must have borked that step without knowing it.  Thanks for your assistance!

  • post-author-pic
    Will B
    01-15-2019

    No problem!

Looking For Team Training?

Learn More