Free — no signup required

Quality of Service (QoS) Classes

2 min read

Not All Pods Are Created Equal

When a Node runs out of memory, the Linux kernel's Out-Of-Memory (OOM) killer must terminate processes to reclaim memory and keep the system alive. Left to its own devices, the kernel uses a heuristic called the OOM score — it tends to kill the process using the most memory. This is often the wrong process to kill from an application perspective.

Kubernetes improves on this by assigning every Pod a Quality of Service (QoS) Class that directly influences the OOM score the kernel assigns to each container's processes. Pods with lower QoS classes get higher OOM scores, making them more likely to be killed first.

There are three classes, assigned automatically by Kubernetes based on how you configure requests and limits in your Pod spec — you never set the QoS class directly:

QoS Class Eviction Priority Analogy
Guaranteed Last to be evicted Reserved airline seat — guaranteed until you board
Burstable Middle priority Economy ticket — you have a seat but VIPs board first
BestEffort First to be evicted Standby passenger — bumped if the flight is full

QoS affects two distinct scenarios: node-pressure eviction (the kubelet proactively evicts Pods when a Node is running low on resources) and OOM killing (the kernel kills processes when memory is exhausted). In both cases, BestEffort Pods go first, then Burstable, then Guaranteed.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free