Skip to main content

Command Palette

Search for a command to run...

Enhance Scalability Using Managed Instance Groups (Solution)

Updated
1 min read
Enhance Scalability Using Managed Instance Groups (Solution)
D

A passionate full-stack developer from @ePlus.DEV

Overview

  • Labs are timed and cannot be paused. The timer starts when you click Start Lab.

  • The included cloud terminal is preconfigured with the gcloud SDK.

  • Use the terminal to execute commands and then click Check my progress to verify your work.

Challenge scenario

As a cloud infrastructure administrator tasked with optimizing compute resource management on Google Cloud, you are required to create a managed instance group named "dev-instance-group" using a pre-existing instance template named "dev-instance-template". This initiative aims to streamline deployment, enhance scalability, and ensure to use below configurations.

  • Autoscaling mode : ON

  • Minimum number of instances : 1

  • Maximum number of instances : 3

  • CPU Utilization : 60%

Click Check my progress to verify the objective.

Create a managed instance group using a pre-existing instance template


Solution of Lab

curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/enhance-scalability-using-managed-instance-groups-solution/lab.sh
source lab.sh

Script Alternative

export REGION=$(gcloud compute project-info describe --format="value(commonInstanceMetadata.items[google-compute-default-region])")

gcloud compute instance-groups managed create dev-instance-group --template=dev-instance-template --size=1 --region="$REGION" && gcloud compute instance-groups managed set-autoscaling dev-instance-group --region=[enter region] --min-num-replicas=1 --max-num-replicas=3 --target-cpu-utilization=0.6 --mode=on

Tip & Tricks

Part 45 of 50

Quick and practical tips to help users optimize tasks, improve skills, and solve common problems effectively across various areas like tech, lifestyle, productivity, and more.

Up next

The Arcade Base Camp February 2026

🏕️ Arcade Base Camp February 2026 Welcome to Base Camp February 2026, where you’ll develop key Google Cloud skills and earn an exclusive credential that will open doors to the cloud for you. No prior