kubernetes: AWS LoadBalancer doesn't handle updates correctly
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
After adding service.beta.kubernetes.io/aws-load-balancer-type: nlb annotation to LoadBalancer service on AWS a new network load balancer gets provisioned, but the old one is not deleted and status.loadBalancer.ingress service field is not updated with the new address.
What you expected to happen:
Old load balancer is deleted.
status.loadBalancer.ingress field is updated.
How to reproduce it (as minimally and precisely as possible):
- Create
LoadBalanceron AWS withoutservice.beta.kubernetes.io/aws-load-balancer-typeannotation; - Add
service.beta.kubernetes.io/aws-load-balancer-type: nlbannotation to created service once it ensures load balancer.
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version): v1.9.6 - Cloud provider or hardware configuration: AWS
- OS (e.g. from /etc/os-release):
- Kernel (e.g.
uname -a): - Install tools: kops
- Others: image
kope.io/k8s-1.9-debian-jessie-amd64-hvm-ebs-2018-03-11
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (13 by maintainers)
@metral I am trying to get approver to merge this PR and cherry-pick to kubernetes 1.11. Should be done soon. @micahhausler
@bnutt It’s an unsupported behavior for now.
service.beta.kubernetes.io/aws-load-balancer-typeshould be treated as immutable. If you need to change it, you should delete the service and recreate.Hmm this is an interesting edge-case.
We don’t re-create an ELB (or NLB) right now if you switch from internal to external (see #60393 and #64251), and this feels similar. We could probably manage this, but we’ll bring it up at the next SIG-AWS on Friday