Reputation: 8461
I'm brand new to GCP and I'm trying to get an instance up and running. I'm noticing that the instance seems to be not healthy because the IP is not connecting. I want to check the health of the instance but I think it needs to belong to an instance group before I can do that. But I can't see how to add an instance to a group.
Here is the UI:
I want to add the statcasters-instance
to the statcasters-group
instance group. Does anybody know how I can do this?
Upvotes: 3
Views: 9191
Reputation: 3700
If it's an "unmanaged" instance group you can add an existing VM instance to the group with
gcloud compute instance-groups unmanaged add-instances $INSTANCE_GROUP_NAME \
--zone=$ZONE \
--instances=$INSTANCE_NAME
Upvotes: 0
Reputation: 2805
According to Instance Groups documentation. There are 2 kinds of VM instance groups.
Managed instance groups are groups that can be created using an Instance Template. You can't add a new instance to that group as this is a managed by Google. You can only create a new Instance Template and then create a new Instance Group from that template.
Unmanaged instance groups are group that are managed by your self. However, when creating an Unmanaged instance group
you specify the Network
for this instance group. You can add VM instnaces to that group later, as long as those VM instances are part of that network as well. To do so, go to the Instance groups
page in Google Cloud Console, and click on your unmanged instance group's name. This will open the instance group details page. Click on EDIT GROUP
. In the VM Instances
choose the VM instance that is not already in the group and add it to the group.
Upvotes: 5