One load balancer redirect to two different ports (80 and 3000)

46 Views Asked by At

I created VM in GCE where are exposed two applciations:

  • frontend: port 80,
  • backend: port 3000.

In Instances Groups I defined a group with the VM instance and with two port mappings:
enter image description here

Next I defined Load Balancer:

  1. Frontend configuration:
    enter image description here
  2. Backend configuration:
    enter image description here
  3. Routing rules:
    enter image description here

And SSL Certificate include only main domain: example.com (without api.example.com):
enter image description here

Unfortunately, this configuration doesn't work. When I have got only one backend for port 80 I can see my frontend app on https://example.com, however when I use both: api3000 and ssl-loadbalancer-be nothing works.

Am I missing some configuration?
Is it possible to redirect the traffic from one load balancer to one Virtual Machine Instance, but on different ports? It's not obligatory to me to redirect it under api.example.com, it can be also https://{IP_ADDRESS}:3000.

0

There are 0 best solutions below