gcloud notes
Universals
# the cheat sheet
$ gcloud cheat-sheet
# initialize gcloud
$ gcloud init
# get gcloud version
$ gcloud version
# gcloud components
$ gcloud components install
$ gcloud components update
# gcloud info
$ gcloud info
# gcloud help
$ gcloud help
# gcloud feedback for Google
$ gcloud feedback
# gcloud topics like accessibility, filtering, and formatting
$ gcloud topic
gcloud auth
How to get current auth account?
$ gcloud auth list
gcloud config
How to list current config (account, project, etc)?
$ gcloud config list
How to get current active project?
$ gcloud config get project
How to switch project?
$ gcloud config set project logan-dev1
How to modify configurations?
$ gcloud config configurations create
$ gcloud config configurations list
$ gcloud config configurations activate
gcloud functions
How to list current cloud functions?
$ gcloud functions list
2nd generation cloud functions are essentially cloud runs (with containers)
gcloud artifact registry
# 1. configure Docker to use GCP
$ gcloud auth configure-docker northamerica-northeast2-docker.pkg.dev
# 2. tag image
$ docker tag inno12_v2_monolith:1.0 northamerica-northeast2-docker.pkg.dev/ijayden/default/inno12_v2_monolith:1.0
# 3. push to artifact registry
$ docker push northamerica-northeast2-docker.pkg.dev/ijayden/default/inno12_v2_monolith:1.0