Add detail documentation for service LoadBalancerClass

pull/27092/head
Harold 2021-03-27 17:38:42 -07:00
parent 119233c47b
commit 3c1216c7ce
2 changed files with 10 additions and 1 deletions

View File

@ -628,6 +628,15 @@ is set to `false` on an existing Service with allocated node ports, those node p
You must explicitly remove the `nodePorts` entry in every Service port to de-allocate those node ports.
You must enable the `ServiceLBNodePortControl` feature gate to use this field.
#### Specifying class of load balancer implementation {#load-balancer-class}
{{< feature-state for_k8s_version="v1.21" state="alpha" >}}
Starting in v1.21, you can optionally specify class of load balancer implementation for a Service Type=LoadBalancer by setting field `spec.loadBalancerClass` value. By default, `spec.loadBalancerClass` is `nil` and type LoadBalacner Services will use the cloud providers' default load balancer implementation.
If `spec.loadBalancerClass` is specified, it is assumed that a matching class load balancer implementation is watching for Services and any default load balancer implementation (e.g. cloud providers) will ignore Services that set this field. `spec.loadBalancerClass` can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed.
The value of `spec.loadBalancerClass` must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users.
You must enable the `ServiceLoadBalancerClass` feature gate to use this field.
#### Internal load balancer
In a mixed environment it is sometimes necessary to route traffic from Services inside the same

View File

@ -730,7 +730,7 @@ Each feature gate is designed for enabling/disabling a specific feature:
- `ServiceAppProtocol`: Enables the `AppProtocol` field on Services and Endpoints.
- `ServiceLBNodePortControl`: Enables the `spec.allocateLoadBalancerNodePorts`
field on Services.
- `ServiceLoadBalancerClass`: Enables the `LoadBalancerClass` field on Services. See [Service Type=LoadBalancer Class Field](https://github.com/kubernetes/enhancements/tree/master/keps/sig-cloud-provider/1959-service-lb-class-field) for more details.
- `ServiceLoadBalancerClass`: Enables the `LoadBalancerClass` field on Services. See [Specifying class of load balancer implementation](/docs/concepts/services-networking/service/#specifying-class-of-load-balancer-implementation-load-balancer-class) for more details.
- `ServiceLoadBalancerFinalizer`: Enable finalizer protection for Service load balancers.
- `ServiceNodeExclusion`: Enable the exclusion of nodes from load balancers
created by a cloud provider. A node is eligible for exclusion if labelled with