Node-pressure Eviction
When a Node starts running low on memory or disk, who decides which Pods to sacrifice? Once a signal crosses its threshold the Kubelet first reclaims what it can without evicting (dead containers and unused images, for disk), then ranks the Pods by whether they exceed their requests, then by Priority, then by how far over they are. It evicts one at a time until the signal recovers. QoS class only approximates that order, and no PodDisruptionBudget applies here.
Play the animation 5 steps, animated, best on a wide screen
Node-pressure Eviction, step by step
-
Kubelet derives memory.available from cAdvisor stats as capacity minus the working set, and it has dropped to 500Mi. Eviction manager polls these stats every 10s and compares against the --eviction-hard thresholds. The threshold is breached.
Play from step 1 -
Kubelet PATCHes Node.status.conditions: MemoryPressure flips from False to True. The control plane turns this into a NoSchedule taint (node.kubernetes.io/memory-pressure), so Pods that do not tolerate it can no longer be scheduled here. Being Burstable or Guaranteed does not exempt a Pod: by default no QoS class gets a memory-pressure toleration.
Play from step 2 -
Eviction manager ranks running Pods by three things in order: whether each is using more of the starved resource than it requested, then Pod Priority, then how far over the request it sits. QoS class does not decide that order, it only estimates it, because the class comes from declared requests and limits while the ranking reads live usage. See the Pod QoS Classes card.
Play from step 3 -
Kubelet evicts the BestEffort Pod itself, not through the Eviction API, so no PodDisruptionBudget is consulted. Under a hard threshold the spec terminationGracePeriodSeconds is ignored and each container gets only a 2s stop window before SIGKILL, not the 30s default. The Pod is set to phase Failed, reason Evicted, with a DisruptionTarget condition, and reported to the API.
Play from step 4 -
Memory frees up and memory.available climbs back above the threshold. After --eviction-pressure-transition-period (default 5m) of staying clear, Kubelet flips MemoryPressure back to False. Scheduling resumes for new Pods.
Play from step 5