-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add instance connection draining for NLBs #12966
Conversation
Hi @heybronson. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
For reference, this deregistration occurs after the node has been drained of its non-daemonset pods but kube-proxy is still running, so this specifically helps services exposed via kube-proxy. This doesn't help target groups targeting pod IPs (which can be gracefully deregistered via finalizers and the aws-load-balancer-controller during the drain process) nor does it help targeting pods listening on the hosts' nodePorts directly (since they will have been drained already and their connections disconnected) |
@rifelpet That's correct, this deregistration happens after node draining, so certain service configurations are already covered. However, this helps in scenarios where traffic is routed to daemonset pods running on a node, since those aren't drained. For example, Nginx-ingress in daemonset mode benefits from this change. |
/assign @johngmyers |
/assign @olemarkus |
ace914f
to
61ee7c5
Compare
0e34ce0
to
fa956e3
Compare
friendly bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@rifelpet can we potentially keep this in the 1.23 release? |
This builds on #12902 to add graceful connection draining for associated targetGroups.
Today, one can define
targetGroupArns
in an instanceGroup spec to associate instances in a corresponding instanceGroup with. When instances in the instanceGroup are cycled via rolling-updates, those instances aren't first properly deregistered with the correspondingtargetGroupArns
, causing dropped connections.This PR fixes this issue by ensuring that we're properly draining instances from their corresponding classic load balancers and NLB targetGroups before terminating the instance. This is a big improvement to the overall client experience when running rolling-updates on production clusters.