Search code examples
nginxgoogle-cloud-platformload-balancinggoogle-cloud-networkinggoogle-cloud-load-balancer

Is it possible to create a load balancer in gcp that works without instance groups in a regional scope?


the problem is I have 3 virtual machines with the same source images in three diferent zones in a region. I can't put them in a MIG because each of them has to attach to a specific persistent disk and according that I researched, I have no control of which VM in the MIG will be attached to which persistent disk (please correct me if I´m wrong). I explored the unmanaged instance group option too, but only has zonal scope. Is there any way to create a load balancer that works with my VMs or I have to create another solution (ex. NGINX)?

enter image description here


Solution

  • Solution in my case was using a dedicated vm, intalling nginx as a load balancer and creating static ips to each vm in the group. I couldn't implement managed or unmanaged instance groups and managed load balancer.

    That worked fine but another solution found in quicklabs was adding all intances in a "instance pool", maybe in the future I will implement that solution.