Gcloud Flashcards
GCP services have specific CLI tools
- Cloud Storage - gsutil
- Cloud BigQuery - bq
- Cloud Bigtable - cbt
- Kubernetes - kubectl (in addition to Gcloud which is used to manage clusters)
gcloud init
initialize or reinitialize gcloud
gcloud config list
lists all properties of the active configuration
Sets the specified property in your active configuration
–> gcloud config set core/project VALUE
–> gcloud config set compute/region VALUE
–> gcloud config set compute/zone VALUE
–> gcloud config set core/verbosity VALUE(debug)
Syntax - gcloud config set SECTION/PROPERTY VALUE
–> core, compute - SECTIONS
–> project, region, zone - PROPERTIES
E.g. : gcloud config set compute/region us-east2
gcloud config set compute/zone us-east1-b
Creating Compute Instances
gcloud compute instances create [NAME]
Creating Instance Templates
gcloud compute instance-templates create/delete/describe/list
Using Instance Tempate to create an instance
gcloud compute instances create my-test-vm –sourc e-instance-template=my-instance-templatewith-custom-image