Understanding Kubernetes Evicted Pods
Blog post from Sysdig
Kubernetes Pod eviction is a process where Pods are terminated due to insufficient resources, primarily resulting from preemption and node-pressure scenarios. Preemption occurs when a high-priority Pod needs to be scheduled, prompting the eviction of lower-priority Pods to make room, managed through Pod Priority Classes. Node-pressure eviction happens when a node's resources, like CPU or memory, are strained, causing the kubelet to evict Pods based on Quality of Service (QoS) Classes, which prioritize Guaranteed, Burstable, and BestEffort Pods. Additional eviction methods include API-initiated eviction, taint-based eviction, and node drain, which allow for more controlled resource management. Monitoring tools like Prometheus can track these evictions, and proper configuration of resources can lead to cost savings and improved system reliability.