'Multiple services with ALB ingress
I have created EKS cluster with Fargate. I deployed two microservices. Everything is working properly with ingress and two separate application load balancers. I am trying to create ingress with one alb which will route the traffic to the services. The potential problem is that both services use the same port (8080). How to create ingress for this problem? Also I have got a registered domain in route 53.
Solution 1:[1]
I believe you can accomplish this using the ALB Ingress Controller.
Solution 2:[2]
You can have a common ALB for your services running inside EKS, even if they use the same port; you can associate it with different listener rules on ALB based on path.
If you are using an ingress controller, your ingress can be configured to handle the creation of these different listener rules.
For eg. if you are using aws alb ingress controller, you can have one common alb and then create ingresses with annotation:
alb.ingress.kubernetes.io/group.name: my-group
All ingresses part of this group will be under the same alb associated to the group.
checkout -userguide-alb-ingress for more info
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | grahamlyons |
Solution 2 | Kaish kugashia |