Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):
Yes
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):
loadbalancer
createloadbalancer
elb
etc
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
NGINX Ingress controller version: 0.22.0
Kubernetes version (use kubectl version): 1.11.5
Environment:
uname -a): 4.14.88-88.76.amzn2.x86_64What happened:
I created a cluster with EKS using CloudFormation, then I added ingress-nginx and a couple of ingress resources. This created an ELB. After deleting the CloudFormation stack and re-creating, instead of re-using the existing ELB, a new one is created.
What you expected to happen:
I expect the same ELB to be re-used, since it is tagged with the same values as the new ELB.
How to reproduce it (as minimally and precisely as possible):
Create cluster, add ingress-nginx, add an ingress to create ELB, delete cluster and repeat, a new ELB is created.
Anything else we need to know:
Perhaps this can be achieved with the use of an annotation, but I have so far searched the source code in vain...
I expect the same ELB to be re-used, since it is tagged with the same values as the new ELB.
That is not possible. When you create a service type=LoadBalancer, Kubernetes creates a new ELB associated with the service.
If you want to reuse an existing ELB, you need to use a service type=NodePort (similar to baremetal) and add the cluster nodes to the ELB manually (from the AWS console)
Edit: this applies to any service type=LoadBalancer in the cluster
Most helpful comment
That is not possible. When you create a service type=LoadBalancer, Kubernetes creates a new ELB associated with the service.
If you want to reuse an existing ELB, you need to use a service type=NodePort (similar to baremetal) and add the cluster nodes to the ELB manually (from the AWS console)
Edit: this applies to any service type=LoadBalancer in the cluster