I ran into this issue when I setup my cluster with the cloud cli and then later went on installing the cloud sdk tool and kubernetes on my local.

First find in the kubernets section the environment you are in. Mine was europe-west.

Then go to your terminal (local) and set the environment to the same string as your cluster is on:

1
gcloud config set compute/zone europe-west1-b

Next point to the correct cluster

1
gcloud config set container/cluster mycluster

And then download the credentials for kubectl

1
gcloud container clusters get-credentials mycluster

Leave a Reply

Your email address will not be published. Required fields are marked *