Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

GCP CLI Cheat Sheet

GCP CLI Cheat Sheet

Back to Operating Systems and CLI
Updated 2026-04-28
Next Topic: iptables Legacy Linux Firewall Reference Cheat Sheet

The gcloud CLI is Google Cloud Platform's unified command-line interface for managing resources, services, and infrastructure across the entire GCP ecosystem (current version: 566.0.0, April 2026). Unlike service-specific tools like gsutil or bq, gcloud provides a single, consistent entry point for Compute Engine, Cloud Storage, GKE, Cloud Run, IAM, and hundreds of other Google Cloud services — including Cloud Run functions (the modern successor to Cloud Functions). Understanding gcloud's hierarchical command structure (surface groups → commands → flags) and mastering its filtering, formatting, and configuration capabilities are essential for automating workflows and managing multi-project environments. The CLI supports alpha, beta, and preview release tracks for early access to experimental features, but production workloads should rely on GA (generally available) commands.

What This Cheat Sheet Covers

This topic spans 22 focused tables and 173 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Installation and ConfigurationTable 2: Project and Organization ManagementTable 3: IAM and Service AccountsTable 4: Compute Engine InstancesTable 5: Managed Instance Groups (MIGs)Table 6: Compute Engine Disks and ImagesTable 7: Networking — VPC, Firewall, and Load BalancingTable 8: Cloud StorageTable 9: Kubernetes Engine (GKE)Table 10: Cloud Functions (Cloud Run Functions)Table 11: Cloud RunTable 12: App EngineTable 13: Cloud SQLTable 14: Pub/SubTable 15: Cloud Build and Artifact RegistryTable 16: Logging and MonitoringTable 17: Secret ManagerTable 18: API and Service ManagementTable 19: Output Formatting and FilteringTable 20: Scripting and AutomationTable 21: Beta, Alpha, and Preview CommandsTable 22: BigQuery CLI (bq)

Table 1: Installation and Configuration

CommandExampleDescription
gcloud init
gcloud init
Interactive setup wizard that authenticates your account, sets default project, and configures region/zone.
gcloud auth login
gcloud auth login
Opens browser to authorize your user account via OAuth and stores credentials.
gcloud auth application-default login
gcloud auth application-default login
Sets up Application Default Credentials (ADC) for client libraries — separate from gcloud CLI credentials.
gcloud auth list
gcloud auth list
Lists all credentialed accounts and shows which is active.
gcloud auth print-access-token
gcloud auth print-access-token
Prints the current OAuth 2.0 access token for use in REST API calls or scripts.
gcloud config set
gcloud config set project my-project
gcloud config set compute/zone us-central1-a
• Assigns a property value in the active configuration
• commonly used for project, compute/region, and compute/zone.
gcloud config get-value
gcloud config get-value project
Retrieves the current value of a single configuration property.
gcloud config list
gcloud config list
Displays all properties of the active configuration in one view.

More in Operating Systems and CLI

  • Firebase CLI Cheat Sheet
  • iptables Legacy Linux Firewall Reference Cheat Sheet
  • AWS CLI Cheat Sheet
  • Linux Bash Cheat Sheet
  • nftables Modern Linux Firewall Cheat Sheet
  • tar gzip zip Archive and Compression Tools Cheat Sheet
View all 51 topics in Operating Systems and CLI