Can't to get answer from kubernetes cluster from local workstati

Can't to get answer from kubernetes cluster from local workstation. Couple days ago it worked.

I started all 5 lab servers, ssh-ed to load balancer with ssh -L 6443:localhos:6443 user@<HostName>, but got an error in my local workstation for command kubectl get nodes.

"Unable to connect to the server: net/http: TLS handshake timeout"

And another one

"Error from server (Timeout): the server was unable to return a response in the time allotted, but may still be processing the request (get nodes)"

Please advice.


  • post-author-pic
    Alexander K
    11-01-2018

    It's clear that all lab servers were stopped for one day due timeout.

  • post-author-pic
    Alexander K
    11-01-2018

    The same command was executed on both master nodes but without success.

    user@algambra2:~$ kubectl get nodes

    The connection to the server localhost:8080 was refused - did you specify the right host or port?

    But port 8080 was not used for any config file during installation process.

  • post-author-pic
    Will B
    11-01-2018

    Try contacting the API through the load balancer with curl (with the ssh tunnel open):

    curl -k https://localhost:6443/version
    If that works, then there might be a problem with the kubeconfig.

    If that does not work, then make sure that the kube apiserver is working on the backend. Make sure the controllers are up, and check the status of kube-apiserver. Make sure it's runnint, and check on the log if it's not. Let me know how that goes and we can troubleshoot from there!
    sudo systemctl status kube-apiserver

  • post-author-pic
    Alexander K
    11-01-2018

    Thank you very much for the prompt reply.
    Sorry, I forget to mention that all services on all nodes were checked and worked fine.
    Problem was solved by rebooting worker nodes.
    Do we have some definite order for starting nodes in cluster?
    IMHO I guess problem  was related to this reason.

  • post-author-pic
    Will B
    11-01-2018

    If the services are enabled they should be fine in any order. If it's causing problems, try doing at the masters and the load balancer first, make sure the Kube API is up and running, then do the workers.

  • post-author-pic
    Novus H
    11-28-2018

    Had the same problem of not being able to see the worker nodes when running `kubectl get nodes`.  


    I then restarted both worker nodes as Alex mentioned and it worked :D

Looking For Team Training?

Learn More