A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/sdk/docs/cheatsheet below:

The gcloud CLI cheat sheet

A roster of go-to commands for the Google Cloud CLI, the primary command-line tool for Google Cloud.

(Also included: introductory primer, understanding commands, and a printable PDF.)

Cheat sheet Getting started

Get going with the gcloud CLI.

Help

gcloud CLI is happy to help.

Personalization

Make the gcloud CLI your own; personalize your configuration with properties.

Grant and revoke authorization to the gcloud CLI and manage credentials.

Projects

Manage project access policies.

IAM

Configuring Identity and Access Management (IAM) preferences and service accounts.

Docker & Google Kubernetes Engine (GKE)

Manage containerized applications on Kubernetes.

Virtual Machines & Compute Engine

Create, run, and manage VMs on Google Cloud infrastructure.

Serverless & App Engine

Build highly scalable applications on a fully managed serverless platform

Miscellaneous

Commands that might come in handy

Introductory primer

A quick primer for getting started with the gcloud CLI.

Installing the Google Cloud CLI

Install the Google Cloud CLI with these installation instructions.

Flags, arguments, and other wondrous additions

Arguments can be positional arguments or flags:

Global flags

Some flags are available throughout the gcloud CLI experience, like:

Cleaning up results

Get the most from your output with the filter, format, limit, and sort-by flags.

For Compute Engine instances with prefix us and not machine type f1-micro:

gcloud compute instances list --filter="zone ~ ^us AND -machineType:f1-micro"

For a list of projects created on or after 15 January 2018, sorted from oldest to newest, presented as a table with project number, project id and creation time columns with dates and times in local timezone:

gcloud projects list --format="table(projectNumber,projectId,createTime.date(tz=LOCAL))"
--filter="createTime>=2018-01-15T12:00:00" --sort-by=createTime

For a list of ten Compute Engine instances with a label my-label (of any value):

gcloud compute instances list --filter="labels.my-label:*" --limit=10
Understanding commands

The underlying patterns for gcloud CLI commands; to aid self-discovery of commands.

Finding gcloud CLI commands

The gcloud CLI is a tree; non-leaf nodes are command groups and leaf nodes are commands. (Also, tab completion works for commands and resources!)

Most gcloud commands follow the following format:

gcloud + release level (optional) + component + entity + operation + positional args + flags

For example: gcloud + compute + instances + create + example-instance-1 + --zone=us-central1-a

Release level

Release Level refers to the command’s release status.

Example: alpha for alpha commands, beta for beta commands, no release level needed for GA commands.

Component

Component refers to the different Google Cloud services.

Example: compute for Compute Engine, app for App Engine, etc.

Entity

Entity refers to the plural form of an element or collection of elements under a component.

Example: disks, firewalls, images, instances, regions, zones for compute

Operation

Operation refers to the imperative verb form of the operation to be performed on the entity.

Example: Common operations are describe, list, create/update, delete/clear, import, export, copy, remove, add, reset, restart, restore, run, and deploy.

Positional args

Positional args refer to the required, order-specific arguments needed to execute the command.

Example: <INSTANCE_NAMES> is the required positional argument for gcloud compute instances create.

Flags

Flags refer to the additional arguments, --flag-name(=value), passed in to the command after positional args.

Example: --machine-type=<MACHINE_TYPE> and --preemptible are optional flags for gcloud compute instances create.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4