@@ -518,9 +518,10 @@ During a non-graceful shutdown, Pods are terminated in the two phases:
518
518
{{< feature-state feature_gate_name="NodeSwap" >}}
519
519
520
520
To 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`
522
522
[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.
524
525
525
526
{{< warning >}}
526
527
When 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,
532
533
533
534
` ` ` yaml
534
535
memorySwap:
535
- swapBehavior: UnlimitedSwap
536
+ swapBehavior: LimitedSwap
536
537
` ` `
537
538
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.
540
540
- `LimitedSwap` : The utilization of swap memory by Kubernetes workloads is subject to limitations.
541
541
Only Pods of Burstable QoS are permitted to employ swap.
542
542
543
543
If configuration for `memorySwap` is not specified and the feature gate is
544
544
enabled, by default the kubelet will apply the same behaviour as the
545
- ` UnlimitedSwap ` setting.
545
+ ` NoSwap ` setting.
546
546
547
547
With `LimitedSwap`, Pods that do not fall under the Burstable QoS classification (i.e.
548
548
` BestEffort` /`Guaranteed` Qos Pods) are prohibited from utilizing swap memory.
0 commit comments