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

Ingress cannot be deleted when TooManyUniqueTargetGroupsPerLoadBalancer #3560

Open jfly opened 9 months ago

jfly commented 9 months ago

Describe the bug

We recently added a new ingress to our cluster, and it failed to deploy with this error:

Failed deploy model due to TooManyUniqueTargetGroupsPerLoadBalancer: You have reached the maximum number of unique target groups that you can associate with a load balancer of type 'application': [100] status code: 400, request id: ...

Steps to reproduce

Just keep adding new rules to your load balancer until you have over 100 target groups. Then try to remove the ingress that added the 101st target group. It won't delete, instead kubernetes will just hang waiting for the relevant finalizer to finish.

Expected outcome

I expect to be able to delete Ingresses even if they can't get created.

Environment

Additional Context:

shraddhabang commented 9 months ago

@jfly Have you tried removing the finalizer on your ingress and try to see if the controller then deletes this ingress for you? Also if possible could you please provide us the controller logs around the issue time so that we can look into improving this behaviour?

jfly commented 9 months ago

@shraddhabang, we did not, although I assume that would have gotten rid of the ingress. We instead "solved" this by removing some target groups from the load balancer so the controller could finish creating the ingress and then go on to remove it.

I don't have logs, sorry. I am pretty sure this is straightforward to reproduce, though.

traseta commented 7 months ago

Same issue here. Deleting the finalizer from ingress deleted the ingress, however, restart of aws-load-balancer-controller deployment was needed to get rid of the error.

AWS Load Balancer controller version: 2.4.7 Kubernetes version: 1.27 Using EKS (yes/no), if so version? yes, platform version: eks.7

k8s-triage-robot commented 4 months 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

jfly commented 4 months ago

/remove-lifecycle stale

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