Linux Node Swap Behaviors
To allow Kubernetes workloads to use swap, on a Linux node,
you must disable the kubelet's default behavior of failing when swap is detected,
and specify memory-swap behavior as LimitedSwap
:
The available choices for swap behavior are:
NoSwap
- (default) Workloads running as Pods on this node do not and cannot use swap. However, processes outside of Kubernetes' scope, such as system daemons (including the kubelet itself!) can utilize swap. This behavior is beneficial for protecting the node from system-level memory spikes, but it does not safeguard the workloads themselves from such spikes.
LimitedSwap
- Kubernetes workloads can utilize swap memory. The amount of swap available to a Pod is determined automatically.
To learn more, read swap memory management.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified August 12, 2025 at 11:10 PM PST: Improve swap management concept (ba07b0331c)