1

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?

Nikhil
  • 88
  • 4
  • 1
    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! – Wytrzymały Wiktor Jul 01 '21 at 10:49

2 Answers2

1

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.

Wojtek_B
  • 931
  • 3
  • 12
0

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.

Nikhil
  • 88
  • 4