Skip to content

GCP

Basics

Command Description
gcloud init initialize the gcloud CLI and configure settings
gcloud auth login authenticate with Google Cloud Platform
gcloud components list list available gcloud components
gcloud config list list current gcloud configuration

Compute Engine

Command Description
gcloud compute instances create create a new instance
gcloud compute instances start start a stopped instance
gcloud compute instances stop stop a running instance
gcloud compute instances delete delete an instance
gcloud compute instances list list instances

Kubernetes Engine

Command Description
gcloud container clusters create create a new Kubernetes cluster
gcloud container clusters delete delete a Kubernetes cluster
gcloud container clusters list list Kubernetes clusters
gcloud container clusters get-credentials configure kubectl to connect to a cluster

Cloud Storage

Command Description
gsutil mb create a new bucket
gsutil cp copy files to/from a bucket or object
gsutil ls list buckets or objects
gsutil rm delete a bucket or object

Cloud SQL

Command Description
gcloud sql instances create create a new Cloud SQL instance
gcloud sql instances delete delete a Cloud SQL instance
gcloud sql instances list list Cloud SQL instances
gcloud sql connect connect to a Cloud SQL instance

BigQuery

Command Description
bq mk create a new dataset or table
bq cp copy data between tables or datasets
bq ls list datasets or tables
bq rm delete a dataset or table

Other Services

Command Description
gcloud pubsub topics create create a new Pub/Sub topic
gcloud pubsub subscriptions create create a new Pub/Sub subscription
gcloud datastore create-indexes create indexes for a Cloud Datastore app
gcloud functions deploy deploy a Cloud Function