Instance IP is changed in Managed Group

241 views
Skip to first unread message

Swapan Kumar Manna

unread,
May 19, 2018, 4:23:26 PM5/19/18
to gce-dis...@googlegroups.com
I have created Managed group instance and reserved an IP, but a day after I see the IP has changed an created another Ephemeral IP. I configured the server in the VM Instance XXXX but now see that has been moved to XXXX IP. And what earlier I configured (Apache) that is not available on the earlier static IP. I'm worried once I configure everything on the main IP and connect to the domain if that might be changed and people will see Website is not available.

Can you please let me know how I can reserve the Instance with Static IP in Managed Group? Or is this correct? Do I need to just reserve on VM Instance rather than concentrating Managed Group IP? Please see the attached screenshot to get a better understanding.

Fady (Google Cloud Platform)

unread,
May 20, 2018, 9:30:21 PM5/20/18
to gce-discussion

Hello Swapan,


When using a managed instance group, new instances can be created, other ones destroyed and others recreated from the instance template per your configurations. For example, when using an autoscaler, the instance group manager may create new ones if configured to autoscale, and once utilization ( or any other set metric) decreases it should destroy unused instances. On the other hand, even if the autoscaler is disabled, but you have autohealing enabled for a single instance, it may recreate the (unhealthy) instance by deleting the existing one and creating a new one (check this thread). Therefore, and because instances within managed instance groups are intended to be dynamically re-created, they get created from the instance template, and not from another (sister) instance within the group. In other words, if you make changes to a running instance and it gets deleted, the new instance created won’t carry these changes, and you would also lose any data saved on it (e.g if your users are inserting data on an existing database on the instance).


That said, if you require autoscaling, you would have to stage an image (configure everything on it) or create a startup script, to be part of the instance template while at the same time separating your instance group as a front end from a working database. Then, you may create a load balancer with a static IP in front of the managed group. This way no matter what IP addresses the instances in the managed group acquire, your load balancer will direct traffic to these instances.


On the other hand, if you do not need an autoscaler, you may either create a regular VM instance, and assign it a static IP, or create an unmanaged instance group that includes non-identical instances and create the load balancer with static IP to load balance traffic to them.


To answer your question, you can not reserve a static IP for an entire managed group, but rather to each individual instance, that if within a managed group it (the instance itself) may get destroyed. But this is not the case for a regular instance even within an unmanaged instance group. I hope this helps.


Note: For Privacy and security reasons I redacted the screenshot and your IP addresses.


Reply all
Reply to author
Forward
0 new messages