DEV Community

kkkevin
kkkevin

Posted on Originally published at opshubs.space

Kubernetes QoS Classes Explained: Guaranteed vs Burstable vs Evicted

Every Kubernetes engineer knows OOMKilled (exit code 137), but far fewer understand why healthy-looking Pods suddenly turn into status Evicted during traffic spikes or node maintenance—even before hitting their container memory limit.

The culprit is almost always your Pod's Quality of Service (QoS) class. When a Kubernetes node runs low on memory or ephemeral storage (MemoryPressure or DiskPressure), the kubelet uses QoS classes to decide which Pods get killed first.

How Kubernetes Assigns QoS Classes

Kubernetes Pod QoS Classes Guaranteed vs Burstable vs BestEffort Eviction Priority

You do not set qosClass manually in your YAML—the Kubernetes API server calculates it automatically from the requests and limits of every container (including initContainers and sidecars) in the Pod:

  • Guaranteed (Protected — Evicted Last): Every container in the Pod must specify both CPU and Memory requests and limits, and for every resource, request == limit.

  • Burstable (Middle Tier): The Pod does not meet Guaranteed criteria, and at least one container specifies a CPU or Memory request or limit.

  • BestEffort (Evicted First): No container in the Pod defines any CPU or Memory requests or limits.

Interactive Tool: Quick Kubernetes QoS Class Checker

Interactive Tool: Try the live interactive calculator directly in the original OpsHubs guide.

3 Common Mistakes That Silently Downgrade Your QoS Class

1. Omitting CPU limits While Setting Memory request == limit

Many teams intentionally remove CPU limits to avoid CFS throttling, while keeping Memory request == limit. That is a valid pattern, but be aware: it turns your Pod from Guaranteed into Burstable. For mission-critical databases or payment gateways, you may want true Guaranteed QoS instead.

2. Forgetting Sidecar or InitContainer Resources

If your main app container has equal requests and limits, but an injected sidecar (such as Envoy, Fluent Bit, or a metrics exporter) or an initContainer lacks matching requests == limits, the entire Pod drops to Burstable.

3. Confusing Mi vs M (Mebibytes vs Megabytes)

Setting request: 512Mi and limit: 512M looks identical at a glance, but 512Mi (536.8 MB) is larger than 512M (512 MB), causing Kubernetes to reject the Pod or assign Burstable. Always standardize on binary units (Mi, Gi).

30-Second kubectl Diagnosis Commands

Check the live QoS class of every Pod in a namespace or inspect recently evicted Pods:

# List Pods with their assigned QoS class
kubectl get pods -A -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,QOS:.status.qosClass,STATUS:.status.phase

# Find why a Pod was Evicted
kubectl get events -A --field-selector reason=Evicted --sort-by='.lastTimestamp'
Enter fullscreen mode Exit fullscreen mode

Production Checklist

Originally published at OpsHubs. Found it useful? Buy us a coffee ☕.

Top comments (0)