- Run
gcloud auth listto check if you have authenticated to gcloud already and what email was used. - Run
gcloud auth loginto login with the right email id. cross check with step 1 when done. - Run
gcloud auth application-default loginto set up default application credentials. - Step 3 will create a json file with credentials, you should run
export GOOGLE_APPLICATION_CREDENTIALS=$HOME/.config/gcloud/application_default_credentials.jsonafter cross checking if the file exists and is in the correct path which is typically$HOME/.config/gcloud/application_default_credentials.json
gcloud config set project k8s-infra-sandbox-capgto set the correct project for operations