Cheat Sheet

Google Cloud Platform tips and tricks.

gcloud

Other Cheat Sheets

https://cloud.google.com/sdk/gcloud/reference

http://cheat.sh/gcloud

https://gist.github.com/pydevops/cffbd3c694d599c6ca18342d3625af97#file-gcloud_cheat_sheet-md

Install

Download the latest version: https://cloud.google.com/sdk/docs/install

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/

Choosing a load balancer

https://cloud.google.com/load-balancing/docs/choosing-load-balancer

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

Delete VM

Kubernetes

Get credentials

Deploy

Mount file system over SSH

rsync

Last updated