0
0
GCPcloud~30 mins

Cloud Shell and gcloud CLI in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Cloud Shell and gcloud CLI Basics
📖 Scenario: You are starting to use Google Cloud Platform (GCP) for your projects. You want to learn how to use Cloud Shell and the gcloud command-line tool to manage your cloud resources easily from your browser.
🎯 Goal: Learn how to open Cloud Shell, set your project ID, list available compute zones, and create a simple virtual machine instance using the gcloud CLI.
📋 What You'll Learn
Use Cloud Shell in the GCP Console
Set the active project using gcloud config set project
List available compute zones with gcloud compute zones list
Create a VM instance with gcloud compute instances create
💡 Why This Matters
🌍 Real World
Cloud Shell and gcloud CLI let you manage cloud resources quickly without leaving your browser. This is useful for developers and system administrators who want to automate and control their cloud infrastructure.
💼 Career
Knowing how to use Cloud Shell and gcloud CLI is essential for cloud engineers, DevOps specialists, and anyone working with Google Cloud Platform to deploy and manage resources efficiently.
Progress0 / 4 steps
1
Open Cloud Shell and Set Project ID
Open Cloud Shell in the GCP Console and set your active project ID by typing gcloud config set project my-project-123. Write this exact command in Cloud Shell.
GCP
Need a hint?

Use the exact command gcloud config set project my-project-123 to set your project.

2
List Available Compute Zones
In Cloud Shell, list all available compute zones by typing the command gcloud compute zones list. Write this exact command.
GCP
Need a hint?

Use the command gcloud compute zones list to see zones.

3
Create a Virtual Machine Instance
Create a VM instance named my-vm-instance in the zone us-central1-a using the command gcloud compute instances create my-vm-instance --zone=us-central1-a. Write this exact command.
GCP
Need a hint?

Use the command gcloud compute instances create my-vm-instance --zone=us-central1-a to create the VM.

4
Verify the VM Instance Creation
Verify your VM instance is created by listing all instances in the zone us-central1-a using the command gcloud compute instances list --zones=us-central1-a. Write this exact command.
GCP
Need a hint?

Use gcloud compute instances list --zones=us-central1-a to check your VM.