Google compute Engine using gcloud CLI -2
In this lab we will play with gcloud cli with more commands and launch compute Engine with it.
- If you want to see the details of your compute instance.
gcloud compute instances describe [your instance name]
- To reset your VM instances.
gcloud compute instances reset [your instance name]
- To stop your VM instances.
gcloud compute instances stop [your instance name]
- To start your instance.
gcloud compute instances start [your instance name]
- To delete your instance.
gcloud compute instances delete [your instance name]
- To view the zones in a particular region.
- To view your default zone.
gcloud config get-value compute/zone
If it shows unset you can set.
- To set the zone . you can choose your desired region's zone.
gcloud config set compute/zone us-central1-f
again if you type gcloud config get-value compute/zone
your zone have been set.
you can use unset
command to unset zone and after that you can set with another zone.
Again write the command to create instance you should see your instance with your default zone.
gcloud compute instances create my-instance-cli-2
Finally we launched our VM instance in our desired zone using CLI.
That's it, for now, we will continue further more in next blog.
Hope you liked it. Will see you on the next topic ๐
Next topic
https://bvakash.hashnode.dev/gcloud-command-with-supporting-resource
Subscribe to my newsletter
Read articles from B V AKASH directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
B V AKASH
B V AKASH
I design, architect, and maintain hybrid cloud environments.