If you're using GKE, chances are you've installed the gcloud command line tool. Here are the most frequent errors we encounter when using gcloud, and how to fix them.

Need authentication?

At the time of auth login, gcloud gets the credentials for projects you're currently part of and the roles you're currently in. So, if you are added to a new project or your roles change at any point, you have to auth login again.

copy: gcloud auth login

Wrong project?

copy: gcloud config set project PROJECT_ID

Need cluster credentials?

gcloud automatically creates a directory, ~/.kube/config, when running the command below. Any additional cluster credentials are merged in with that config file.

copy: gcloud container clusters get-credentials CLUSTER_NAME

Wrong zone?

copy: gcloud config set compute/zone ZONE


Google's full gcloud docs can be found here.