@@ -518,9 +518,10 @@ During a non-graceful shutdown, Pods are terminated in the two phases:
518518{{< feature-state feature_gate_name="NodeSwap" >}}
519519
520520To enable swap on a node, the `NodeSwap` feature gate must be enabled on
521- the kubelet, and the `--fail-swap-on` command line flag or `failSwapOn`
521+ the kubelet (default is true) , and the `--fail-swap-on` command line flag or `failSwapOn`
522522[configuration setting](/docs/reference/config-api/kubelet-config.v1beta1/)
523- must be set to false.
523+ must be set to false.
524+ To allow Pods to utilize swap, `swapBehavior` should not be set to `NoSwap` (which is the default behavior) in the kubelet config.
524525
525526{{< warning >}}
526527When the memory swap feature is turned on, Kubernetes data such as the content
@@ -532,17 +533,16 @@ specify how a node will use swap memory. For example,
532533
533534` ` ` yaml
534535memorySwap:
535- swapBehavior: UnlimitedSwap
536+ swapBehavior: LimitedSwap
536537` ` `
537538
538- - `UnlimitedSwap` (default) : Kubernetes workloads can use as much swap memory as they
539- request, up to the system limit.
539+ - `NoSwap` (default) : Kubernetes workloads will not use swap.
540540- `LimitedSwap` : The utilization of swap memory by Kubernetes workloads is subject to limitations.
541541 Only Pods of Burstable QoS are permitted to employ swap.
542542
543543If configuration for `memorySwap` is not specified and the feature gate is
544544enabled, by default the kubelet will apply the same behaviour as the
545- ` UnlimitedSwap ` setting.
545+ ` NoSwap ` setting.
546546
547547With `LimitedSwap`, Pods that do not fall under the Burstable QoS classification (i.e.
548548` BestEffort` /`Guaranteed` Qos Pods) are prohibited from utilizing swap memory.
0 commit comments