# Kubernetes deletes and re-creates AWS ELB following changes to unrelated resources

**URL:** <https://discuss.kubernetes.io/t/kubernetes-deletes-and-re-creates-aws-elb-following-changes-to-unrelated-resources/7797>\
**Category:** General Discussions\
**Created:** [September 5, 2019, 5:44pm UTC](https://discuss.kubernetes.io/t/kubernetes-deletes-and-re-creates-aws-elb-following-changes-to-unrelated-resources/7797 "2019-09-05T17:44:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmf](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gmf](https://discuss.kubernetes.io/u/gmf)\
**Post date:** [September 5, 2019, 5:44pm UTC](https://discuss.kubernetes.io/t/kubernetes-deletes-and-re-creates-aws-elb-following-changes-to-unrelated-resources/7797/1 "2019-09-05T17:44:07Z")

</div>

### Cluster information:

Kubernetes version:  
Client Version: [version.Info](http://version.info/){Major:“1”, Minor:“11”, GitVersion:“v1.11.3”, GitCommit:“a4529464e4629c21224b3d52edfe0ea91b072862”, GitTreeState:“clean”, BuildDate:“2018-09-10T11:44:36Z”, GoVersion:“go1.11”, Compiler:“gc”, Platform:“darwin/amd64”}  
Server Version: [version.Info](http://version.info/){Major:“1”, Minor:“8”, GitVersion:“v1.8.6”, GitCommit:“6260bb08c46c31eea6cb538b34a9ceb3e406689c”, GitTreeState:“clean”, BuildDate:“2017-12-21T06:23:29Z”, GoVersion:“go1.8.3”, Compiler:“gc”, Platform:“linux/amd64”}

Cloud being used: AWS

Installation method: kops

Host OS: Debian GNU/Linux 8.10 (jessie)

### 

Hello,  
I’m facing the following issue:  
after updating some services and deployments in any namespace, kubernetes deletes and recreates the AWS Load Balancer connected to the nginx-ingress-controller, although no changes have been made to the ingress-nginx service.

In the kube-controller-manager.log file of the master node that sent the command to AWS, I found the following logs:

"  
service\_controller.go:298] Ensuring LB for service ingress-nginx/ingress-nginx

aws.go:2786] EnsureLoadBalancer(…)

aws.go:2256] Existing security group ingress: sg-xxxxxxxxxxxxx

aws\_loadbalancer.go:230] Deleting removed load balancer listeners

aws\_loadbalancer.go:242] Creating added load balancer listeners

aws\_loadbalancer.go:486] Creating proxy protocol policy on load balancer

aws\_loadbalancer.go:335] Updating load-balancer attributes for “aaaaaaaabbbbbbbbbccccccccc”

aws.go:3055] Loadbalancer aaaaaaaabbbbbbbbbccccccccc (ingress-nginx/ingress-nginx) has DNS name  
aaaaaaaabbbbbbbbbccccccccc-\<serial\_of\_the\_deleted\_lb\>-.elb.amazonaws.com

service\_controller.go:775] Failed to process service. Not retrying: Failed to persist updated status to apiserver, even after retries. Giving up: Not persisting update to service ‘ingress-nginx/ingress-nginx’ that has been changed since we received it: Operation cannot be fulfilled on services “ingress-nginx”: the object has been modified; please apply your changes to the latest version and try again

service\_controller.go:754] Service has been deleted ingress-nginx/ingress-nginx

aws.go:3258] Removing rule for traffic from the load balancer (sg-086dd951c80cad655) to instance (sg-ec8f4f81)

aws.go:2223] Comparing sg-086dd951c80cad655 to sg-02b2179d0025d0ef9

aws.go:2223] Comparing sg-086dd951c80cad655 to sg-040d937708b32505f

aws.go:2223] Comparing sg-086dd951c80cad655 to sg-085f53cda99c42c38

aws.go:2223] Comparing sg-086dd951c80cad655 to sg-086dd951c80cad655

aws.go:2419] Removing security group ingress: sg-ec8f4f81 [{  
IpProtocol: “-1”,  
UserIdGroupPairs: [{  
GroupId: “sg-086dd951c80cad655”  
}]  
}]

aws.go:3360] Ignoring DependencyViolation while deleting load-balancer security group (sg-086dd951c80cad655), assuming because LB is in process of deleting

aws.go:3384] Waiting for load-balancer to delete so we can delete security groups: ingress-nginx

aws.go:3371] Deleted all security groups for load balancer: ingress-nginx

service\_controller.go:298] Ensuring LB for service ingress-nginx/ingress-nginx

aws.go:2786] EnsureLoadBalancer(…)

aws.go:2256] Existing security group ingress: sg-yyyyyyyyyyy

aws.go:2287] Adding security group ingress: sg-yyyyyyyyyyy

aws\_loadbalancer.go:102] Creating load balancer for ingress-nginx/ingress-nginx with name: aaaaaaaabbbbbbbbbccccccccc

…

"

Does anyone have any ideas?

Thank you very much

---

<div class="post-metadata">

**Author:** ![gmf](https://avatars.discourse-cdn.com/v4/letter/g/a88e4f/32.png) [@gmf](https://discuss.kubernetes.io/u/gmf)\
**Post date:** [September 6, 2019, 8:57am UTC](https://discuss.kubernetes.io/t/kubernetes-deletes-and-re-creates-aws-elb-following-changes-to-unrelated-resources/7797/2 "2019-09-06T08:57:26Z")

</div>

Going deeper into the log, it seems that the deletion of the ELB happens about 3 or 4 minutes after deleting a service in any namespace, so from the log the event sequence is:

service\_controller.go: 754] Service has been deleted \<namespace\_name\> / \<service\_name\>

… after about 3 or 4 minutes

service\_controller.go:298] Ensuring LB for service ingress-nginx/ingress-nginx  
…  
service\_controller.go:754] Service has been deleted ingress-nginx/ingress-nginx  
…

The version of nginx-ingress-controller is 0.25.1

Thanks again.
