A
managed instance group (MIG)
is a group of virtual machine (VM) instances that you treat as a single entity.
Each VM in a MIG is based on an
instance template
.
If you only need to create multiple VMs, but don't want them grouped together in
a MIG, see the
bulk instance API
.
To learn about other Compute Engine options, see
Choose a Compute Engine deployment strategy for your workload
.
To get started with creating a MIG, read this document to find a basic
configuration that works for you.
Basic scenarios for creating a MIG
MIGs have many configuration options. See the following guides to quickly get a
MIG up and running for various scenarios:
Limitations
MIGs have different limitations depending on which features you use. The
following lists show general MIG limitations as well as additional limitations
if you use regional or stateful features.
By default, you can create up to 1,000 VMs in a zonal MIG. If you need more,
use one of the following options:
When updating a MIG, you can specify up to 1,000 VMs in a single request.
Once the MIG is created, you cannot change its networks or subnetworks.
All VMs in the MIG are assigned to the same subnetworks.
Shared VPC on interfaces other than
nic0
for managed instance
groups is supported in gcloud CLI and the API, but not in
Google Cloud console.
A MIG that is spread across multiple zones?a
regional MIG
?has the following
limitations:
Load balancing
with a regional MIG doesn't support the
max-rate
target capacity in
RATE
and
UTILIZATION
balancing modes. To learn more about the usage
guidelines for each load balancer, see
Balancing modes and target capacity settings
.
A MIG with
stateful configuration
?a
stateful MIG
?has the following limitations:
- You cannot use autoscaling if your MIG has stateful configuration.
- If you want to use automated rolling updates, you must set the
replacement method
to
RECREATE
.
- For stateful regional MIGs, you must
disable proactive redistribution
(set the redistribution type to
NONE
) to prevent deletion of stateful
instances by automatic cross-zone redistribution.
- If you use an
all-instances configuration
to override instance template properties, you cannot specify those properties
in any per-instance configuration and at the same time in the group's
all-instances configuration.
If you want to configure an autoscaler for your MIG, review the
autoscaler specifications
, too.
IPv6 support
If you want your MIG to include VM instances that use IPv6
addressing, you must use the dual-stack setting when you create your instance
template. For more information, see
Create an instance template with IPv6 addresses
.
Additional MIG tasks
After you've created a MIG, you might want to do the following:
Learn about the group and its VMs
Resize the group
Change the group's VM configuration
Add MIG features
Tutorials
Try a tutorial: