Unable to connect to the server: dial tcp accounts.google.com :443: getsockopt: operation timed out

2/13/2018

I'm trying to get the pods list from the gcloud project.

The gcloud project I've created in the gcp using different laptop. Now I'm using different machine but logged into same gcp account and using same project.

When I run the command kubectl get pods I get the below error.

Unable to connect to the server: dial tcp a.b.c.d:443: getsockopt: operation timed out

I tried to add an argument --verbose but that doesn't seems to be valid.

How can I further proceed in resolving this error.

-- Rajkumar Natarajan
gcloud
google-kubernetes-engine
kubernetes

1 Answer

2/14/2018

gcloud container clusters get-credentials my-cluster-name will log you into your cluster locally

From the docs: "updates a kubeconfig file with appropriate credentials and endpoint information to point kubectl at a specific cluster in Google Kubernetes Engine." - src

-- Chainlink
Source: StackOverflow