Search This Blog

Compute Engine - gcloud Commands

 


You can use 'gcloud' command-line tool to create and manage Google Compute Engine resources.

  • Set your Project as default in which you want to create Compute Engine instance
gcloud config set project your-project-id

 

  • Create Compute Engine instance named test-instance-1 in zone us-central1-a
gcloud compute instances create test-instance-1 --zone us-central1-a

 

gcloud compute ssh --zone us-central1-a test-instance-1


  •  To List all instances

gcloud compute instances list


  • To List instances with a label, for example  - key="production" and value="paymentserver"

gcloud compute instances list --filter='labels.production:paymentserver'


 

Join GCP - Professional Cloud Architect Online Live Training 




Learn more on Google Cloud Services


No comments:

Post a Comment

Featured Post

How to Prepare for GCP Certification?

Are you new to Google Cloud and not sure how to start on it? Are you looking for Google Cloud Certification and not sure how to prepare f...