diff --git a/content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md b/content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md index b8a5b1c35280d..39b5cc4dc7d60 100644 --- a/content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md +++ b/content/en/docs/tasks/access-application-cluster/create-external-load-balancer.md @@ -194,6 +194,24 @@ Known issues: {{% capture discussion %}} +## Load Balancer cleanup + +In usual case, the correlating load balancer resources in cloud provider should +be cleaned up soon after a LoadBalancer type service is deleted. But it is known +that there are various corner cases where resources can be leaved orphaned after +a service is deleted. Finalizer Protection for Service LoadBalancers was +introduced to prevent this from happening. By using finalizer, this feature +makes sure service resource is not fully deleted until the correlating load +balancer resources are deleted. + +Specifically, a finalizer with name `"service.kubernetes.io/load-balancer-cleanup"` +will be attached to the service if any load balancer resource is created for it. +The finalizer will only be removed after load balancer resource is cleaned up. +Above ensures resource won't be leaked even in corner cases. + +This feature was introduced as Alpha in kubernetes v1.15. It can be enabled via +feature gate `ServiceLoadBalancerFinalizer=true`. + ## External Load Balancer Providers It is important to note that the datapath for this functionality is provided by a load balancer external to the Kubernetes cluster.