0
votes

I have a cluster on GCP with multiple deployments on it. The deployments are exposed with NodePort services. I'm setting up a HTTP(S) load balancer with the aim of routing from frontend to backend services, one domain to one deployment.

The issue is that when I'm saving the load balancer the backend services I've defined are suddenly both pointing to the same port. Which results in both defined domains pointing to the same service.

https://i.imgur.com/q2tfbFY.png This is how it's setup, with two backend services.

https://i.imgur.com/sBaRsdd.png This is how the host and path rules are defined.

https://i.imgur.com/JGt7aco.png When editing the "Port numbers" in the "first-backend-service" and saving the load balancer, the port numbers in the "second-backend-service" will be changed to the same as was defined in the "first-backend-service".

I've tried using two load balancers, one for each service with the same result.

1
It's maybe a GUI issue. I also got some issue in the path definition. I had to reload the page to see the correct defined values. Try with a refresh, and/or open a case to the support.guillaume blaquiere

1 Answers

0
votes

You might be using the same named port for all the backend services. The instance group comes with the default Named port. As your are using same name port, when you are changing it reverting back to the configured one.

You can configure your custom named port and map it to your desired port by selecting Instance group --> details-->edit group using 'add item' you can add port name and port number as per your requirement and later use it in the backend services. Edit the "Port name" and "Port numbers" numbers.

So for your scenario you can create different port name with different ports number in your instance group and apply one each to the backend services:

  • http1: 3000
  • http2: 3001