Kubernetes QoS Classes Explained: Why Pods Get Evicted Before Hitting Memory Limits

Pods can be evicted under node memory or disk pressure even when they haven't reached their container memory limits, and the cause is usually their Quality of Service class. Kubernetes assigns this class automatically from the requests and limits of all containers in a Pod, including initContainers and sidecars, so it is not set manually in the manifest. Guaranteed Pods, where every container sets equal requests and limits for CPU and memory, are evicted last, while BestEffort Pods with no resource settings are evicted first. Burstable Pods fall in between, and a common pitfall is that removing CPU limits while keeping memory request equal to limit, or adding a sidecar without matching values, can silently drop a Pod from Guaranteed to Burstable. The article also warns that mixing Mi and M units can cause unexpected rejection or classification, and it provides kubectl commands to inspect QoS classes and eviction events.
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