Reputation: 1281
I am using GCP and have a created a GCP load balancer to load balance across 3 docker instances running on one VM. The instances are running on ports 8080, 8081 and 8082. When creating the load balancer health check in the UI console, it asks for the port number for the health check (see screenshot). I can use 8080 but I want the health check to check each port of the instances to see if the service is healthy. This will allow me to stop and start the docker instances without affecting the service.
Any pointers or advice on how to do this?
Upvotes: 0
Views: 978
Reputation: 567
As a workaround :
Define all ports you want to forward to the backend in instance groups settings.
Create different load balancer backends for each different ports in instance group.
map each backend to different domain/subdomain in load balancer settings.
GCP Load balancer deployment takes a few minutes. You might not able to see the changes immediately
Upvotes: 0
Reputation: 176
Mapping multiple ports to a single health check is currently unavailable. You can open a feature request here. In the meantime, you need to create health check for each port.
Upvotes: 1