Kubernetes Deep Dive Room

Sign Up Free or Log In to participate!

Kubernetes nodes error

When I try to get nodes, I get the following error:

The connection to the server localhost: 8080 was refused – did you specify the right host or port


1 Answers

Hi Ricardo, I had the same problem, if you’re using GCP, you need to run the following (add the correct clustername and zone) :

gcloud container clusters get-credentials your-first-cluster-1 --zone us-central1-a
  • See the following documentation for an explanation:


To authenticate for the cluster, run the following command:

gcloud container clusters get-credentials [CLUSTER_NAME]

This command configures kubectl to use the cluster you created.


Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?