Below are some useful GCP commands for quick reference. You can find comprehensive documentation at https://cloud.google.com/docs.

GCP Login

# gcloud auth login

Set GCP Project

# gcloud config set project <<project_name>>

Get Google Kubernetes Engine (GKE) context

# kubectl config get-contexts

Set GKE context

# kubectl config use-context <<context_mame>>

You can also use this command to set GKE context:

# gcloud container clusters get-credentials --region <<region>> <<project_name>>