McKube 0 requests sent

Kubernetes QoS Classes (Guaranteed, Burstable, BestEffort) & OOM Order

How Kubernetes calculates Pod QoS automatically from requests and limits, and which pods die first under node memory pressure.

How kubelet assigns QoS class and oom_score_adj

You never set qosClass manually in YAML; Kubernetes computes it from every container's requests and limits. BestEffort (no CPU or memory requests/limits anywhere in the Pod) receives oom_score_adj = 1000 and is always evicted first under node memory pressure. Guaranteed (every container sets CPU and memory requests equal to limits) receives oom_score_adj = -997 and is protected until last. Burstable (anything in between) receives a proportional score between 2 and 999 based on memory request fraction.

Why matching memory requests and limits avoids silent surprises

Setting requests.memory: 256Mi and limits.memory: 2Gi looks economical until ten pods burst simultaneously on one node and trigger node-wide OOM evictions. For critical stateful or revenue-path services, set requests.memory == limits.memory so the scheduler guarantees the full memory budget upfront.