kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.96k stars 1.47k forks source link

Optimize shared target groups #3767

Open RobinFrcd opened 4 months ago

RobinFrcd commented 4 months ago

Hi, I have to expose a service in multiples ways (OIDC, IP filtering, etc..) but to do that I have to create multiple Ingresses. Every time I create a new Ingress, it creates a new target group, and I reached the number of target groups attached to my ALB: You have reached the maximum number of unique target groups that you can associate with a load balancer of type 'application': [100]. Is there a way to share target groups between Ingresses ? To have 1 service = 1 target group ?

Example: I have a service I want to expose in 2 ways:

This needs 2 different ingresses, but both are pointing to the same service. It results in 2 target groups, where it could work with only one.

Thanks !

Environment

shraddhabang commented 4 months ago

Have you tried using the TargetGroupBinding for your service? You can then use this target group to be attached to your ingress using actions. Can you please try this configuration and see if this helps your case?

RobinFrcd commented 4 months ago

Thank you for your answer ! But it needs a targetGroupARN to be set right ? So I would need to create a first ingress, find a way to get its target group ARN and then, based on that, start another ingress using this targetGroupARN. Can't be done in a single deployment.

Thanks again for your help !

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 2 weeks ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten