gcloud
Google Cloud Platform command-line interface
TLDR
SYNOPSIS
gcloud group [command] [options]
DESCRIPTION
gcloud is the Google Cloud Platform CLI for managing cloud resources. It provides commands for all GCP services including Compute Engine, Kubernetes Engine, Cloud SQL, Cloud Run, Cloud Functions, and more.The tool handles authentication, configuration, and resource management. Commands are organized by service groups with subcommands for specific operations. The --format and --filter flags are available on all commands for scripting and automation. Output formats include json, yaml, csv, table, text, value, and more.Multiple named configurations can be managed with gcloud config configurations for switching between projects and accounts.
PARAMETERS
GROUP
Service group: compute, container, iam, sql, storage, functions, run, etc.auth
Authentication and credential commands.config
Configuration management.compute
Compute Engine commands.container
Kubernetes Engine commands.projects
Project management.--project ID
Override the default project for this command.--format FORMAT
Output format: json, yaml, csv, table, text, value, etc.--filter EXPRESSION
Filter results (e.g. 'name~prod').--quiet, -q
Disable interactive prompts and use defaults.--verbosity LEVEL
Logging verbosity: debug, info, warning, error, critical, none.--account ACCOUNT
Override the default account for this command.--region REGION
Override the default region for this command.--zone ZONE
Override the default zone for this command.--configuration NAME
Use a named configuration instead of the active one.--flags-file FILE
Read flags from a YAML or JSON file.--flatten KEY
Flatten nested list or map output.--help
Display help information.
CONFIGURATION
~/.config/gcloud/configurations/config_default
Default configuration properties including project, region, zone, and account settings.~/.config/gcloud/credentials.db
Encrypted credentials database for authenticated accounts.~/.config/gcloud/application_default_credentials.json
Application default credentials for local development.
CAVEATS
Requires a GCP account and project. Actions may incur costs. Some commands need specific IAM permissions. The gcloud CLI is part of the Google Cloud SDK, which must be installed separately from most package managers.
HISTORY
gcloud is part of the Google Cloud SDK, first released in 2013 as the primary CLI for Google Cloud Platform administration and automation. It has grown to cover hundreds of GCP services and is continuously updated with new features.
