Kubernetes QoS Calculator
Container resources
CPU in millicores (500m is half a core), memory in MiB. Leave a field empty for unset, which is exactly how the kubelet sees it.
Middle of the eviction order. Can use spare capacity, and can lose it under pressure.
OOM score adjustment (oom_score_adj)
- Container 1985
What the kubelet writes for the container's processes. When the node itself runs out of memory, the kernel kills the highest score first: 1000 goes before 3, and -997 last.
- notememory limit above request overcommits the node. Under pressure this pod is evicted before Guaranteed pods.
Requests and limits in, QoS class and eviction consequences out.
What a Kubernetes QoS class is
A label the kubelet attaches to every pod when it is admitted, derived entirely from the requests and limits its containers declare. There is no field to set it in: you get the class your resource spec earns. Its purpose is to rank pods against each other for eviction, so when a node runs out of memory the class decides who is killed first.
Guaranteed, Burstable and BestEffort
Three rules, checked in order:
- Guaranteed: every container sets CPU and memory limits, and each request equals its limit. A request you leave out is copied from the limit, so limits alone are enough.
- BestEffort: no container sets any request or limit at all.
- Burstable: anything else.
The rule that catches people is how unforgiving Guaranteed is. One container in a pod missing one value, or a request set a little below its limit, drops the entire pod to Burstable. Sidecars are the usual culprit: the application container is specified carefully and the log shipper beside it is not.
What the class actually changes
Eviction order under memory pressure. BestEffort pods are removed first, then Burstable pods that have grown past their requests, and Guaranteed pods last. For a stateful or latency-critical service, the class is effectively its seat on the lifeboat.
Worth separating from a different mechanism people conflate with it: exceeding a memory limit gets a container OOM-killed by the kernel immediately, whatever its class. Exceeding a CPU limit only throttles it. That asymmetry is why a missing memory limit is worth flagging, since without one a leak grows until the node itself is in trouble and the eviction order decides who pays for it.
How to check a pod's QoS class
The kubelet records the class in the pod's status, so you can read what a running pod was given instead of working it out:
# One pod
kubectl get pod NAME -o jsonpath='{.status.qosClass}'
# Every pod in the cluster
kubectl get pods -A -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,QOS:.status.qosClass kubectl describe pod NAME prints
the same value on its QoS Class line. The class
is fixed when the pod is created. To change it, change the requests and limits in the
workload and let the pods be replaced.
QoS class and oom_score_adj
Eviction by the kubelet is one mechanism. The other is the Linux OOM killer, which acts
when the node runs out of memory faster than the kubelet can evict. The kubelet steers
it by writing an oom_score_adj
value for every container, chosen from the QoS class:
| QoS class | oom_score_adj |
|---|---|
| Guaranteed | -997 |
| Burstable | 1000 - (1000 x memory request / node memory), kept between 3 and 999 |
| BestEffort | 1000 |
The kernel adds this number to a score based on how much of the node's memory the process is using, and kills the highest total. A Burstable container that requests 256 MiB on a 16 GiB node gets 985, so it is killed almost as readily as a BestEffort one. A container that requests 10% of the node gets 900. The larger the request, the better protected the container, which is one more reason to set requests honestly.
The calculator above shows the value for each container. Node memory means the
capacity the node reports, which is a little under the instance's nominal size:
kubectl describe node NAME lists
it under Capacity. To see the live value, run
kubectl exec POD -- cat /proc/1/oom_score_adj.
Should everything be Guaranteed?
No. Guaranteed reserves the full limit for every pod, which gives up the overcommit that makes a cluster affordable. The usual shape is Guaranteed for critical stateful services, Burstable with honest requests for the bulk of workloads, and BestEffort only for jobs you would not mind losing. Setting requests you know to be inflated in order to reach Guaranteed just moves the waste somewhere harder to see.
Kubernetes QoS FAQs
What are the three QoS classes?
Guaranteed: every container sets requests and limits for both CPU and memory, with request equal to limit. BestEffort: nothing is set at all. Burstable: everything in between. One container falling short of the Guaranteed rules makes the whole pod Burstable.
What is a QoS class in Kubernetes?
A label the kubelet assigns to every pod at admission time, based purely on the requests and limits its containers declare. You never set it directly; it is derived. Its job is to rank pods for eviction when a node runs short of resources, so it decides which workloads are sacrificed first when the node is under pressure.
How does Kubernetes decide the QoS class?
Three rules, checked in order. If every container in the pod sets both CPU and memory requests and limits, and each request equals its limit, the pod is Guaranteed. If no container sets any request or limit at all, it is BestEffort. Everything else is Burstable. A single container missing a single value is enough to drop the whole pod from Guaranteed to Burstable, which is the rule that surprises people most.
Why does the QoS class matter?
It sets the eviction order when a node runs short of memory: BestEffort pods go first, then Burstable pods exceeding their requests, and Guaranteed pods last. For anything stateful or latency-critical, the class is effectively your seat on the lifeboat.
Should everything be Guaranteed then?
No. Guaranteed reserves the full limit for every pod, which forfeits the overcommit that makes clusters efficient. A common pattern is Guaranteed for critical stateful services, Burstable with honest requests for most workloads, and BestEffort only for genuinely disposable jobs.
What happens when a container exceeds its memory limit?
It is OOM-killed by the kernel, regardless of QoS class. Exceeding the CPU limit merely throttles. That asymmetry is why the calculator flags missing memory limits: without one, a leak grows until the node itself comes under pressure and the eviction order decides who pays.
How do I check the QoS class of a pod?
Read status.qosClass: kubectl get pod NAME -o jsonpath='{.status.qosClass}' prints Guaranteed, Burstable or BestEffort. kubectl describe pod NAME shows the same value on its QoS Class line. The class is assigned when the pod is created and does not change afterwards.
Is a pod with only limits Guaranteed?
Yes, if every container sets both a CPU limit and a memory limit. When a limit is set and the request is left out, Kubernetes copies the limit into the request, so request equals limit and the pod is Guaranteed. Setting only requests does not work the other way: the pod is Burstable.
What oom_score_adj does each QoS class get?
Guaranteed containers get -997 and BestEffort containers get 1000. A Burstable container gets 1000 minus a thousand times its memory request divided by the node's memory capacity, kept between 3 and 999. A container requesting 10% of the node therefore gets 900. The kernel kills the process with the highest total score first.
Is my configuration sent anywhere?
No. Classification happens in your browser and the page works offline.
Related tools
- Kubernetes Resource Units ConverterCPU millicores and memory quantities like 128Mi, 1G and 129e6, with warnings for the suffix mistakes the API server accepts.
- EKS Max Pods CalculatorMax pods per node for any EC2 instance type on Amazon EKS, with prefix delegation, custom networking and the managed node group caps.
- Little's Law CalculatorSolve concurrency, throughput and latency from the other two, and convert request rates across time windows.