-
Notifications
You must be signed in to change notification settings - Fork 1.5k
add information on load balancer lifecycle #2703
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
- stringList: `"s1,s2,s3"` | ||
- stringMap: `"k1=v1,k2=v2"` | ||
- json: `"{ \"key\": \"value\" }"` | ||
- The controller may not update the configuration of an *existing* load balancer if an annotation is added/updated. New load balancers will be have an appropriate configuration. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Barring some limitations, controller does update the existing load balancer. There are some issues with the kube-controller-manager provisioned load balancer, but this controller should be able to update most of the configuration. Limitations:
|
||
|
||
## Annotations | ||
!!!warning | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,21 @@ Ingress traffic starts at the ALB and reaches the Kubernetes nodes through each | |
#### IP mode | ||
Ingress traffic starts at the ALB and reaches the Kubernetes pods directly. CNIs must support directly accessible POD ip via [secondary IP addresses on ENI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html). | ||
|
||
## Lifecycle of AWS Load Balancers | ||
|
||
!!! warning | ||
The controller, generally, does not update load balancers after creation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. load balancer does get updated, this warning is not accurate. |
||
|
||
|
||
The controller updates the targets of load balancers in response to cluster workload changes. However, the controller may not update the configuration of load balancers in response to annotations added to cluster resources after the load balancer is created. | ||
|
||
For example, if you add the annotation `aws-load-balancer-ssl-cert` to a service after the load balancer is created, the controller will *not* update the configuration of the AWS load balancer. However, if you delete the AWS load balancer, the controller will *recreate* the load balancer with the desired configuration. | ||
|
||
Recommendations: | ||
1. Assume AWS load balancers may need to be replaced. | ||
1. Do not manually update the configuration of load balancers provisioned by the controller. This will cause the in-cluster resource definitions and the AWS configuration to get out of sync. | ||
1. If durability of a specific load balancer resource is important, consider using IAM permissions to block the controller from creating or deleting new load balancers. Use the controller only to update the targets of self-managed load balancers. | ||
1. Use the [ExternalDNS Controller](https://github.com/kubernetes-sigs/external-dns) to automatically update DNS records instead of relying on a specific load balancer IP address or hostname. | ||
|
||
|
||
|
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.
This controller should update the existing load balancer. In certain case, for example when the load balancer scheme gets modified from internal to internet-facing or vice-versa, controller deletes existing lb and recreates a new one.
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.
I commented my issue on the other PR (#2680 (comment)) -- let's discuss there