2
votes

I created cluster in gcloud with three nodes. So far so good.Thereafter i tried to run the pod.. it is giving error.. I found out the kubectl is not configured correct.. Getting following error when I try to run the pod.. Appreciate any help in this regard.

error: could not read an encoded object from nodejs.yaml: unable to connect to a server to handle "pods": couldn't read version from server: Get http://localhost:8080/api: dial tcp 127.0.0.1:8080: connection refused

thx

1

1 Answers

5
votes

If your kubectl configuration is incorrect after creating a cluster, you can always run gcloud container clusters get-credentials NAME (see configuring kubectl) to restore a working kubeconfig file.