Friday, April 28, 2017

kubectl get pods - The connection to the server w.x.y.z was refused - did you specify the right host or port

$ kubectl get pods
The connection to the server  was refused - did you specify the right host or port
Solution:
$ gcloud container clusters get-credentials your-cluster --zone us-east1-b --project your-project
Other issues I have found that get resolved with the same command:
  • Unable to connect to the server: x509: certificate signed by unknown authority
  • Unable to connect to the server: dial tcp w.x.y.z:443: i/o timeout

Followers