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
Command Line Interface of GCP

The Command line interface in GCP is called as Gcloud. Most GCP services can be managed from Gcloud. We can create, delete and update virtual machines, you can manage instance groups & databases etc…

While there are some more service specific CLI tools in GCP, Gcloud is the most commonly used one. The following is the list of some service specific cli tools about which we will deal later.

Read More
Compute Engine Live Migration & best practices

Live Migration:

When the host system in needs to be updated live migration of the virtual instance happens. The virtual instance is migrated to a different host system from the same zone. The properties of the instance do not change. However, this is not supported for instances with GPU or for Spot instances. The live migration option can be selected when creating the virtual instance under the availability policy.

Read More
Billing, Discounts & keeping costs low on GCP.

sustained use discounts:

  • Google will provide you sustained discounts in case if the virtual instance is running more than 25% of the month.
  • Sustained discounts are automatically applied usually the discount is between 20-50% on every incremental minute.
  • The sustained use discounts do not apply for certain machine types like E2 & A2
  • The sustained use discounts do not also apply if the Virtual instances are created by App Engine or Data flow.
Read More
error: Content is protected !!