From f0da3cf753c854852fa1b91ec8baef1286f54681 Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Thu, 3 Feb 2022 00:49:06 +1100 Subject: [PATCH 1/5] `ServiceLBNodePortControl` went to beta in v1.22 Looks like this was overlooked to be updated when the feature gate documentation was updated in #28770. Signed-off-by: Paul "TBBle" Hampson --- content/en/docs/concepts/services-networking/service.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/en/docs/concepts/services-networking/service.md b/content/en/docs/concepts/services-networking/service.md index b642b6f522..e676c85a83 100644 --- a/content/en/docs/concepts/services-networking/service.md +++ b/content/en/docs/concepts/services-networking/service.md @@ -684,7 +684,7 @@ The set of protocols that can be used for LoadBalancer type of Services is still #### Disabling load balancer NodePort allocation {#load-balancer-nodeport-allocation} -{{< feature-state for_k8s_version="v1.20" state="alpha" >}} +{{< feature-state for_k8s_version="v1.22" state="beta" >}} Starting in v1.20, you can optionally disable node port allocation for a Service Type=LoadBalancer by setting the field `spec.allocateLoadBalancerNodePorts` to `false`. This should only be used for load balancer implementations @@ -692,7 +692,8 @@ that route traffic directly to pods as opposed to using node ports. By default, is `true` and type LoadBalancer Services will continue to allocate node ports. If `spec.allocateLoadBalancerNodePorts` is set to `false` on an existing Service with allocated node ports, those node ports will NOT be de-allocated automatically. 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. +You must enable the `ServiceLBNodePortControl` feature gate to use this field in v1.20 and v1.21, +and the feature gate is enabled by default from v1.22 onwards. #### Specifying class of load balancer implementation {#load-balancer-class} From b54cee1c44837c73633d14de75a5830a66b660b6 Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Thu, 3 Feb 2022 02:31:07 +1100 Subject: [PATCH 2/5] Apply better wording to remain current in future versions Co-authored-by: Tim Bannister Signed-off-by: Paul "TBBle" Hampson --- content/en/docs/concepts/services-networking/service.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/content/en/docs/concepts/services-networking/service.md b/content/en/docs/concepts/services-networking/service.md index e676c85a83..60acbd83b6 100644 --- a/content/en/docs/concepts/services-networking/service.md +++ b/content/en/docs/concepts/services-networking/service.md @@ -692,8 +692,12 @@ that route traffic directly to pods as opposed to using node ports. By default, is `true` and type LoadBalancer Services will continue to allocate node ports. If `spec.allocateLoadBalancerNodePorts` is set to `false` on an existing Service with allocated node ports, those node ports will NOT be de-allocated automatically. 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 in v1.20 and v1.21, -and the feature gate is enabled by default from v1.22 onwards. +Your cluster must have the `ServiceLBNodePortControl` +[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) +enabled to use this field. +For Kubernetes v{{< skew currentVersion >}}, this feature gate is enabled by default, +and you can use the `spec.allocateLoadBalancerNodePorts` field. For clusters running +other versions of Kubernetes, check the documentation for that release. #### Specifying class of load balancer implementation {#load-balancer-class} From be07879592b8385a6080e35c63344c43d8c43bf5 Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Thu, 3 Feb 2022 02:31:29 +1100 Subject: [PATCH 3/5] Remove needless mention of previous versions Co-authored-by: Tim Bannister Signed-off-by: Paul "TBBle" Hampson --- content/en/docs/concepts/services-networking/service.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/concepts/services-networking/service.md b/content/en/docs/concepts/services-networking/service.md index 60acbd83b6..616aa02656 100644 --- a/content/en/docs/concepts/services-networking/service.md +++ b/content/en/docs/concepts/services-networking/service.md @@ -686,7 +686,7 @@ The set of protocols that can be used for LoadBalancer type of Services is still {{< feature-state for_k8s_version="v1.22" state="beta" >}} -Starting in v1.20, you can optionally disable node port allocation for a Service Type=LoadBalancer by setting +You can optionally disable node port allocation for a Service of `type=LoadBalancer`, by setting the field `spec.allocateLoadBalancerNodePorts` to `false`. This should only be used for load balancer implementations that route traffic directly to pods as opposed to using node ports. By default, `spec.allocateLoadBalancerNodePorts` is `true` and type LoadBalancer Services will continue to allocate node ports. If `spec.allocateLoadBalancerNodePorts` From 2103a16c0fb410496bb8db27dd46777bc87ae786 Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Thu, 3 Feb 2022 02:31:43 +1100 Subject: [PATCH 4/5] Fix style nit-pick Co-authored-by: Tim Bannister Signed-off-by: Paul "TBBle" Hampson --- content/en/docs/concepts/services-networking/service.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/concepts/services-networking/service.md b/content/en/docs/concepts/services-networking/service.md index 616aa02656..b4b01afc86 100644 --- a/content/en/docs/concepts/services-networking/service.md +++ b/content/en/docs/concepts/services-networking/service.md @@ -690,7 +690,7 @@ You can optionally disable node port allocation for a Service of `type=LoadBalan the field `spec.allocateLoadBalancerNodePorts` to `false`. This should only be used for load balancer implementations that route traffic directly to pods as opposed to using node ports. By default, `spec.allocateLoadBalancerNodePorts` is `true` and type LoadBalancer Services will continue to allocate node ports. If `spec.allocateLoadBalancerNodePorts` -is set to `false` on an existing Service with allocated node ports, those node ports will NOT be de-allocated automatically. +is set to `false` on an existing Service with allocated node ports, those node ports will **not** be de-allocated automatically. You must explicitly remove the `nodePorts` entry in every Service port to de-allocate those node ports. Your cluster must have the `ServiceLBNodePortControl` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) From db2b66e3657891a857eb2fd8a0ad53e603a2762b Mon Sep 17 00:00:00 2001 From: "Paul \"TBBle\" Hampson" Date: Thu, 3 Feb 2022 02:35:59 +1100 Subject: [PATCH 5/5] Apply wording improvements to load-balancer-class Credit to Tim Bannister for the same improvements in load-balancer-nodeport-allocation above. Signed-off-by: Paul "TBBle" Hampson --- content/en/docs/concepts/services-networking/service.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/en/docs/concepts/services-networking/service.md b/content/en/docs/concepts/services-networking/service.md index b4b01afc86..0298854137 100644 --- a/content/en/docs/concepts/services-networking/service.md +++ b/content/en/docs/concepts/services-networking/service.md @@ -703,7 +703,9 @@ other versions of Kubernetes, check the documentation for that release. {{< feature-state for_k8s_version="v1.22" state="beta" >}} -`spec.loadBalancerClass` enables you to use a load balancer implementation other than the cloud provider default. This feature is available from v1.21, you must enable the `ServiceLoadBalancerClass` feature gate to use this field in v1.21, and the feature gate is enabled by default from v1.22 onwards. +`spec.loadBalancerClass` enables you to use a load balancer implementation other than the cloud provider default. +Your cluster must have the `ServiceLoadBalancerClass` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) enabled to use this field. For Kubernetes v{{< skew currentVersion >}}, this feature gate is enabled by default. For clusters running +other versions of Kubernetes, check the documentation for that release. By default, `spec.loadBalancerClass` is `nil` and a `LoadBalancer` type of Service uses the cloud provider's default load balancer implementation if the cluster is configured with a cloud provider using the `--cloud-provider` component flag.