How to use CLI for Managed instance groups ?

We have been using the cloud console to manage the managed instance groups. Let us now learn how to use the command line interface to manage the instance groups. It is important to note that we need to set the project id before we can execute any of these commands mentioned below. Else, you will receive an error. You can use the below command to set the project id.

gcloud config set project <project name>
Read More
How to update managed instance group ?

You can gradually upgrade an instance in an instance group to a new instance template. This type of upgrade is called as Rolling upgrade. Let us say we have 10 instances running and we want to upgrade only 2 instances at once. this is the default. We can also set a canary template, meaning if the upgrade of the first two instances is successful & tested. Then all the remaining instances will be upgraded at once.

Read More
Few additional commands in Google Cloud.

Below are few compute instance commands in gcloud.

gcloud compute instances start <instance 1> <instance 2 > //The instance 1 & 2 are created
gcloud compute instances stop <instance 1> < instance 2 > //The instances 1 & are stopped
gcloud compute instances delete <instance 1> // The instance 1 is deleted
gcloud compute instances delete <instance 1 > --delete-disks=<value> //deletes the boot disk along with instance
gcloud compute instances delete <instance 1> --keep-disks=<value> // keeps the boot disk even if the vm is deleted
gcloud compute instances move <instance 1> --zone us-central1-b --destination-zone us-central-f // moves the instance from central-1b zone to central-f zonet out a 
gcloud compute instance
Read More
Command Structure in Gcloud simplified.

The typical Command Structure in Gcloud is “gcloud <group> <subgroup> <action>”. “Group” is usually the service you are working with like, compute, container, config or iam etc… “Subgroup” is the component we are referring to in the group. for example, if we take compute as a group then the instances, images, instance-templates, regions & zones are all subgroups. “action” is the action you want to take like list, create, delete & describe. Now let us look at some examples.

Read More
error: Content is protected !!