Kubernetes Swap Support Reaches GA in v1.34 After Years as Experimental Feature
Kubernetes has historically required swap to be disabled on all nodes because its scheduler and eviction system depend on precise memory accounting, and swap usage by pods can go undetected, undermining resource limits. Developers bootstrapping clusters with kubeadm on LXC containers frequently encounter a kubelet startup error caused by the host's swap being visible inside containers, since swap is a host-wide kernel resource and not namespaced per container. A practical workaround is setting failSwapOn: false in the kubelet configuration, which allows kubelet to start while keeping workloads in NoSwap mode by default. After beginning as an alpha feature in Kubernetes 1.22 in 2021, the NodeSwap feature (KEP-2400) reached general availability in Kubernetes 1.34 in 2025. It introduces two configurable swap behaviors — NoSwap, which prevents pods from using swap while allowing system processes to, and LimitedSwap, which grants pods a proportional swap allocation via cgroup v2.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in