Cheat Sheet

Google Cloud Platform tips and tricks.

gcloud

Other Cheat Sheets

https://cloud.google.com/sdk/gcloud/referencearrow-up-right

http://cheat.sh/gcloudarrow-up-right

https://gist.github.com/pydevops/cffbd3c694d599c6ca18342d3625af97#file-gcloud_cheat_sheet-mdarrow-up-right

Install

Download the latest version: https://cloud.google.com/sdk/docs/installarrow-up-right

echo "export CLOUDSDK_PYTHON=$(which python3)" >> ~/.zshrc
source ~/.zshrc
./install.sh

Install/remove components

gcloud components install COMPONENT_ID
gcloud components remove COMPONENT_ID

Config

Change project default Project

You may also set the environment variable CLOUDSDK_CORE_PROJECT.

Change project default Compute Engine Region

Change project default Compute Engine Zone

Env vars

Show current project

List config

Compute

SSH to VM

Transfer files to VM

https://cloud.google.com/compute/docs/instances/transfer-files/arrow-up-right

Choosing a load balancer

https://cloud.google.com/load-balancing/docs/choosing-load-balancerarrow-up-right

https://cloud.google.com/load-balancing/docs/https/setting-up-httpsarrow-up-right

Delete VM

Kubernetes

Get credentials

Deploy

Mount file system over SSH

rsync

Last updated