Skip to main content

The official CLI tool for Google Cloud Platform.

# To list all properties in one's active configuration:
gcloud config list

# To log in to Google account:
gcloud auth login

# To set the active project:
gcloud config set project <project_name>

# To ssh into a virtual machine instance:
gcloud compute ssh <user>@<instance> 

# To display all Google Compute Engine instances in a project. Instances from all zones are listed by default:
gcloud compute instances list

# To update a kubeconfig file with the appropriate credentials to point kubectl to a specific cluster in Google Kubernetes Engine:
gcloud container clusters get-credentials <cluster_name>

# To update all gcloud CLI components:
gcloud components update

# To show help for a given command:
gcloud help <command>

# ---

# To disable sending usage statistics, run the following command:
gcloud config set disable_usage_reporting true