About 7 hours ago i was working with kubectl without problems. Now (after a few hours of sleep, and a reboot of my computer) all kubectl get commands gives me this error:
Unable to connect to the server: net/http: TLS handshake timeout
I did not do anything since it worked besides shut down my computer.
Since I'm new with Kubernetes and GCE i need a few hints on what this could be, and where to look.
So i found the problem.
kubernetes was set to use the wrong context and cluster (i had created a GC project and deleted it again, and the created a new project).
I got the new credentials from GC:
gcloud container clusters get-credentials CLUSTER_NAME_FROM_GC
To get the new context name and cluster name i used:
kubectl config view
And to update the current context and cluster i used:
kubectl config set-cluster CLUSTER_NAME_FROM_CREDENTIALS
kubectl config set-context CONTEXT_NAME_FROM_CREDENTIALS
This fixed the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With