Reputation: 864
I don't know if I missed something, but I can't seem to find any posts/doc that is related to my question. Maybe I misunderstand the type ingress
in kubernetes, but is it possible to define multiple ingresses that use the same LoadBlancer? Having to start one LoadBalancer for every ingress is costly.
Upvotes: -1
Views: 1742
Reputation: 1
Yes you are right , its costly and you can use the Ingress group annonation of Kubernetes to create a alb group and all the ingress files having this unique group name will be clustered together and thus will use the same load balancer. But a point to be noted is that this alb group is only possible for single cluster architecture and it is not supported in multi cluster architecture.
Upvotes: 0
Reputation: 44657
One of the benefit of using ingress it helps to avoid creating an external LoadBalancer for each LoadBalancer type service. On many cloud providers some of the ingress controllers will create the corresponding external Load Balancer resource for each ingress resource. But using Nginx Ingress controller you need one loadBalancer to expose the Nginx Ingress controller itself. Then create multiple ingress resource and have multiple backends. All the backends are served by same external Load Balancer.
From the docs of Nginx Ingress
In this section you can find a common usage scenario where a single load balancer powered by ingress-nginx will route traffic to 2 different HTTP backend services based on the host name
Upvotes: 3