Weedjo
Weedjo

Reputation: 335

Google Cloud Platform: Using VPC with managed instance groups

In the last two weeks I had huge problems with Google Cloud Platform. Restarting the server resulted very very often in:

"Starting VM instance "foobar-controller" failed. Error: The zone 'projects/demoday-zollhof/zones/europe-west3-b' does not have enough resources available to fulfill the request. Try a different zone, or try again later."

One solution I stumbled upon were managed instance groups. I successfully deployed my service in 3 zones in a managed instance group, however the name changed to "foobar-controller-group-9990". I would like to stick to the name "foobar-controller", because other services rely on this name (and the 9990 indicates to me, that it could change...).

how can I map or fix a name for the instance group so I can still use the following requests internally: http://foobar-controller/dostuff?q=12345

Thank you!

Upvotes: 0

Views: 155

Answers (1)

night-gold
night-gold

Reputation: 2421

As you are using a Managed instance group all computes are created and managed (as the name imply) by the instance group. You should also have more than one compute deployed with the same image.

One solution for this would be to deploy a LB in front of your managed instance group, this way you will be able to declare the domain name and associate it to the new LB and be able to access all the compute engines inside the IG with the same name.

This should also give you some hints on how to do it: https://cloud.google.com/load-balancing/docs/internal/#load_balancing_ip_address

Upvotes: 1

Related Questions