Score:1

GCP load balancer with existing VMs

cn flag

I'm in the process of setting up a HTTPS load balancer in GCP but have faced some challenges.

I have two existing VMs I want to load balance traffic to, these are in two different GCP VCP networks.

When creating a load balancer through the GCP Console I'm asked to chose or create an instance group but when creating one I find no option in adding existing VMs.

What I want to accomplish is to create a load balancer available through internet that balances traffic to my two existing VMs that are in two different networks in different zones. How can I do this?

Wytrzymały Wiktor avatar
it flag
Hello @secret_cinema and welcome to ServerFault! Please remember to [react to answers for your questions](https://stackoverflow.com/help/someone-answers). That way we know if the answers were helpful and other community members could also benefit from them. Try to [accept answer](https://stackoverflow.com/help/accepted-answer) that is the final solution for your issue, upvote answers that are helpful and comment on those which could be improved or require additional attention. Enjoy your stay!
Score:0
ar flag

To set up a load balancer with a Compute Engine backend, your VMs need to be in instance groups.

The managed instance group provides VMs running the backend servers of an external HTTPS load balancer.

To set up multi-region external HTTPS load balancer,follow steps.

Wojtek_B avatar
jp flag
It's impossible to create instance group if the VM's are in different VPC's :(
Score:0
jp flag

You have VM's in different VPC's so you will be unable to create an instance group and load balancer;

Under VM instances select one or more existing VMs to add to the group. You can only select VMs that are in the same zone & VPC network (see section #4).

To set up a load balancer your VM's have to be in the same region & VPC.

If you can move one of your VM's so that both are in the same VPC then you can create an unmanaged instance group, add both VM's and then create external HTTPS load balancer.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.