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

百般思念 提交于 2019-12-13 03:43:57

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/48776011/unable-to-connect-to-the-server-dial-tcp-accounts-google-com-443-getsockopt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!