kubernetes / ingress-nginx

Ingress-NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.15k stars 8.19k forks source link

ingress-nginx-controller doesn't delete old load balancer #9810

Open y509319 opened 1 year ago

y509319 commented 1 year ago

What happened: We're migrating from an AWS Classic Load Balancer to an AWS Network Load Balancer. Everything goes well, a NLB appears, the ingress DNS records are getting automatically updated (by external-dns app), the applications are accessible, but the old CLB is left hanging (as seen in AWS console) without being used anymore.

What you expected to happen: The old/classic load balancer to get automatically deleted?

NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.): 1.7.0

Kubernetes version (use kubectl version): 1.24

Environment:

Name: management-nginx Labels: app.kubernetes.io/component=controller app.kubernetes.io/instance=management-nginx-ingress app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=ingress-nginx app.kubernetes.io/part-of=ingress-nginx app.kubernetes.io/version=1.7.0 helm.sh/chart=ingress-nginx-4.6.0 Annotations: <none> Controller: k8s.io/ingress-nginx Events: <none>

How to reproduce this issue: Assuming an AWS EKS cluster is deployed and having an ingress host to access. Deploy the ingress-nginx-controller app so that a CLB is created for the host to access. Add the service.beta.kubernetes.io/aws-load-balancer-type: nlb annotation as described in Configuring a LoadBalancer Service to Use NLB. Wait a bit for a NLB to be created. (And it's still not deleting the unused CLB...)

k8s-ci-robot commented 1 year ago

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
github-actions[bot] commented 1 year ago

This is stale, but we won't close it automatically, just bare in mind the maintainers may be busy with other tasks and will reach your issue ASAP. If you have any question or request to prioritize this, please reach #ingress-nginx-dev on Kubernetes Slack.

tfon23 commented 1 year ago

Bumping this as I am still facing this issue.

mecostav commented 1 year ago

any update for this? this issue is an inconvenience when it comes to e2e tests and branch specific clusters which are destroyed when work is completed

arunsisodiya commented 11 months ago

Hello Ingress Team,

We are also facing this issue. During the new load balancer creation the older ones are still there. Can you help us to understand the reason behind that and how we can clean them up?

longwuyuan commented 11 months ago

yes, this is expected as the LB on AWS or even GCP/Azure etc is handled via cloud-controller-manager making api calls to the cloud, so outside of K8S.

/remove-kind bug