2

I recently started using managed instance group with multi zone configuration. When i use GCE api to fetch instances for this instance groups zone is a required parameter. For a managed instance group with instances in multiple zone instance group does not belong to one zone. how do i fetch instances in this case?

Grzenio
  • 35,875
  • 47
  • 158
  • 240

1 Answers1

2

What API or gcloud command are you using to list the instances? I guess you are using the instanceGroups.listInstances API, but for regional instance group, you need to use regionInstanceGroupManagers.listManagedInstances, or the corresponding gcloud command:

$ gcloud beta compute instance-groups managed list-instances instance-group-1 --region us-central1 NAME ZONE STATUS ACTION LAST_ERROR instance-group-1-mk4j us-central1-b RUNNING NONE instance-group-1-xnyk us-central1-c RUNNING NONE instance-group-1-g23r us-central1-f RUNNING NONE

Note that this feature is still in beta.

Dagang
  • 24,586
  • 26
  • 88
  • 133
  • um, it seems like you are basically saying "you can not get a list of regional instance groups". as you are instead showing how to list instances in that group. – JasonS Sep 29 '16 at 21:20