DEV Community

Shibu N
Shibu N

Posted on

1 1

GCP gcloud CLI command Structure Overview

The gcloud CLI is a set of tools used to create and manage Google Cloud Resources. By using the gcloud CLI, you can create Compute Engine Virtual Machines, VPC, Google Kubernetes Engine clusters, Dataproc clusters and jobs,Cloud SQL instances, App Engine Apps, etc.

Most gcloud commands follow the following format:

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

Example

gcloud compute instances create example-instance-1
--zone=us-central-1

Where:

Release Level refers to the command's release status. For example alpha, beta, GA.

Component refers to different Google Cloud services.For example compute for compute engine, app for app engine.

Entity refers to the plural form of an element or collection of elements under a component. For example instances, disks, images, zones, regions.

Operation refers to the imperative verb form of the operation to be performed on the entity. For example describe, list, create, update, delete, import, export, copy, run, add, remove.

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

Flags refer to the additional arguments, --flag-name(=value),
passed in to the command after positional args. For example --machine type=MACHINE_TYPE and are --preemptible
optional flags for gcloud compute instances create.

For more info, visit https://cloud.google.com/sdk/gcloud

πŸ‘‹ While you are here

Reinvent your career. Join DEV.

It takes one minute and is worth it for your career.

Get started

Top comments (0)

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay