- Andreas Bartel
- October 5, 2021
An instance group is a collection of virtual machine (VM) instances that you can manage as a single entity.
Compute Engine offers two kinds of VM instance groups, managed and unmanaged:
- Managed instance groups (MIGs) let you operate apps on multiple identical VMs. You can make your workloads scalable and highly available by taking advantage of automated MIG services, including: autoscaling, autohealing, regional (multiple zone) deployment, and automatic updating.
- Unmanaged instance groups let you load balance across a fleet of VMs that you manage yourself.
- Login to google cloud platform portal.
- Click on Compute Engine.
- Select Instance groups.
- Click on Create Instance group.
- Provide Instance group name.
- Select Location, Region & Zone.
- Click on Instance Template.
- Click on Create a new Instance template.
- Click on link http://www.hackerxone.com/blog/how-create-virtual-machine-google-cloud for how to create a new instance template.
- Provide the Number of instances.
- Click on Configure autoscaling & otherwise edit the autoscaling setting after the instance group has been created.
- If needs to Add HTTP Load balancing utilization or Stackdriver monitoring metrics then click on Add new metric otherwise leave the option.
- Provide the cool down period in seconds(Cool down period allows autoscaler to make better scaling decisions).
- Provide the min or max number of instances.
- Click on Create health check.
- Then click on link http://www.hackerxone.com/blog/how-create-health-check-google-cloud-platform for how to create health check.
- Click on Create.
- After sometime Instance group is ready then go to the Instance Groups page.
Create Instance groups using Shell
- Initially steup a gcloud cli on your system so click on link http://www.hackerxone.com/blog/how-setup-google-cloud-cligcloud-cli-ubuntu
- Once gcloud-cli is done,click on command line.
- Then, Copy & Run the following command has given in below image:-