GCP
GCP platform services and infrastructure.
- Artifact Registry — Container images and packages
- GCE — Compute Engine
- GCS — Cloud Storage
- GKE — Kubernetes Engine
- IAM — Identity, service accounts, Workload Identity Federation
- Network — VPC, Cloud DNS, Cloud Load Balancing
gcloud CLI Basics
bash
# Authentication
gcloud auth login # interactive browser login
gcloud auth application-default login # set Application Default Credentials (ADC)
gcloud auth activate-service-account --key-file=KEY.json
gcloud auth list # list authenticated accounts
gcloud auth revoke # revoke credentials
# Configuration
gcloud config set project PROJECT_ID
gcloud config set compute/region asia-southeast1
gcloud config set compute/zone asia-southeast1-a
gcloud config get project
gcloud config list # list all properties
# Configuration profiles
gcloud config configurations create staging
gcloud config configurations list
gcloud config configurations activate staging
# Projects
gcloud projects describe PROJECT_ID
gcloud projects list
# Components
gcloud components list
gcloud components install kubectl
gcloud components update
# Info and version
gcloud info
gcloud version
# Global flags
--project=PROJECT_ID # override active project
--format="json|yaml|table|value|csv" # output format
--filter="EXPRESSION" # filter results
--quiet # disable interactive prompts
--verbosity=debug # set log verbosity
--help # show helpReference: