Make the Cloud SDK your own; personalize your configuration with properties.
| Name | Summary |
|---|---|
| gcloud config set | Define a property (like compute/zone) for the current configuration. |
| gcloud config get-value: | Fetch value of a Cloud SDK property. |
| gcloud config list | Display all the properties for the current configuration. |
| gcloud config configurations create | Create a new named configuration. |
| gcloud config configurations list | Display a list of all available configurations. |
| gcloud config configurations activate | Switch to an existing named configuration. |
| Name | Summary |
|---|---|
| Check version & settings | gcloud version, gcloud info, gcloud components list |
| Init profile | gcloud init |
| List all zones | gcloud compute zones list |
| Upgrade local SDK | gcloud components update, gcloud components update --version 219.0.1 |
| Name | Summary |
|---|---|
| List projects | gcloud project list |
| Configuration | gcloud config list, gcloud config list project |
| Show project info | gcloud compute project-info describe |
| Switch project | gcloud config set project |
| Name | Summary |
|---|---|
| Auth login | gcloud auth login |
| Display a list of credentialed accounts | gcloud auth list |
| Set the active account | gcloud config set account <Account> |
| Set kubectl context | gcloud container clusters get-credentials <cluster-name> |
| Change zone | gcloud config set compute/zone us-west1-b |
| Change region | gcloud config set compute/region us-west |
| List all container clusters | gcloud container clusters list |
| Name | Summary |
|---|---|
| List all instances | gcloud compute instances list |
| Show instance info | gcloud compute instances describe "instance-name" –project "project-name" –zone "zone" |
| Stop an instance | gcloud compute instances stop instance-1 |
| Start an instance | gcloud compute instances start instance-1 |
| Create an instance | gcloud compute instances create vm1 --image image-1 --tags test --zone "<zone>" --machine-type f1-micro |
| SSH to instance | gcloud compute ssh –project "<project-name>" –zone "<zone-name>" "<instance-name>" |