DEV Community

Cover image for Kubernetes Swap Support in 1.35: The Config That Silently Does Nothing
Dev Encyclopedia
Dev Encyclopedia

Posted on • Originally published at devencyclopedia.com

Kubernetes Swap Support in 1.35: The Config That Silently Does Nothing

Node swap support (KEP-2400) went GA in 1.34 and stable in 1.35. If you've been putting off a decision on this, this is the release where it's actually safe to test.

But "stable" doesn't mean "on for you." Swap is opt-in at two levels: swap has to be provisioned on the node's disk, and the kubelet has to be explicitly configured to allow it. Nothing changes just because you upgraded.

Here's the trap. Setting failSwapOn: false gets you NoSwap by default, which just stops the kubelet from refusing to start on a swap-enabled node. Your pods still don't get swap access. People provision swap, flip failSwapOn, restart the kubelet, and wonder why nothing changed. The setting you actually need is memorySwap.swapBehavior: LimitedSwap.

There's also a QoS restriction that trips people up: only Burstable pods (where at least one container's memory request is below its limit) get swap access at all. Guaranteed pods are excluded by design, and BestEffort pods never get it either.

In the full writeup I cover the cgroup v2 and container runtime prerequisites, the exact kubelet config, how to verify it actually worked (not just that the kubelet accepted it), and a breakdown of workload types where this helps versus where it makes p99 latency worse: https://devencyclopedia.com/blog/kubernetes-swap-support-1-35

Top comments (0)