Google Cloud Command Line Interface (gcloud CLI)
Create and manage Google Cloud resources and services directly on the command line or via scripts using the Google Cloud CLI. With broad platform compatibility and service coverage, perform common platform tasks faster and control your cloud resources at scale.
Accelerates your software development
Manage development workflows like pushing files to VMs, using data emulators for local Pub/Sub, databases, or BigQuery development, and deploying code to Cloud Functions.
Authenticate to Google Cloud services using various simplified authentication approaches. Implement authentication flows for your client libraries code to run seamlessly locally, in staging, and production.
Install Google Cloud CLI
Download and initialize the latest version of Google Cloud CLI.
Install additional components
Download additional command-line components like bq, gsutil, kubectl, preview gcloud commands, or necessary dependencies.
Overview of the Google Cloud CLI
A comprehensive, high-level look at the gcloud CLI, including its release levels, command structure, and important concepts.
Scripting gcloud commands
Run gcloud commands from a script by utilizing features like prompt disabling and output filtering and formatting.
Hands-on labs: Using the gcloud CLI
Learn how to install and configure gcloud CLI, then use it to perform some basic operations like creating VMs, networks, and using gsutil to perform operations.
When you script with gcloud CLI, you can run gcloud commands using scripts or other automations—for example, by using Bash scripts, or when using Jenkins to drive automation of Google Cloud tasks. Additionally, the gcloud command-line tool comes with the ability to filter and format command output to easily structure and extract information as well as combine multiple commands to manage your Google Cloud resources non-interactively.
Google Cloud basics
Beginner’s guide to automating Google Cloud tasks
Google Cloud basics
Scripting gcloud CLI commands
gcloud CLI ships with various data and service emulators to simulate dataset availability and backend behaviors directly in your local environment. This way, you can code, inspect behavior, and iterate on how your software displays data or handles various responses.
Cloud Spanner emulation
|gsutil||The gsutil tool provides access to Cloud Storage, including a wide range of bucket and object management tasks, directly from the command line.|
|bq||The bq tool enables running queries and manipulating datasets, tables, and entities in BigQuery through the command line.|
|kubectl||The kubectl tool provides commands for greater control over Kubernetes clusters. With kubectl, you can deploy applications, inspect and manage cluster resources, and view logs, among a wide set of operations.|
|Emulators||Google Cloud CLI comes with emulators for products like Cloud Bigtable, Datastore, Firestore, Spanner, and Pub/Sub, for local development, testing, and validation.|
|Interactive mode||The gcloud interactive shell produces suggestions and auto-completion for commands, sub-commands, flags, and file and resource arguments. Inline help is displayed in the lower section.|
|Cloud Console command construction||For Cloud Compute, Cloud Storage, and several other popular services, you can use the Cloud Console web-UI to manipulate drop-down menus and the point-and-click interface to build up the precise equivalent gcloud command.|
|Refineable output verbosity||Command response verbosity, list page sizes, and other filters are available to refine output sizes and other usage characteristics.|
|Export to Terraform (Preview)||Export the current state of your cloud resources and configurations into a Terraform compatible text file. You can use this to later reapply the configuration to create a duplicate environment, revert to a good known configuration, or for other DevOps style management purposes.|