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
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.