How to check a Pod's QoS class and requests
- Paste a manifest: a Pod, Deployment, StatefulSet, DaemonSet, ReplicaSet, Job or CronJob, several separated by
---, or thekind: Listthatkubectl get -o yamlprints. - Read the QoS class and the reason for it, then the findings. Where a fix is unambiguous a button applies it to the manifest; Copy manifest takes the result. A structural fix rewrites the YAML, so comments are dropped.
- Optionally enter a node's allocatable CPU and memory to see how many Pods fit, and its memory capacity to see each container's
oom_score_adj.kubectl describe nodeprints both under Capacity and Allocatable.
Quantities are read with the same rules as the resource units converter, so 128m of memory, 512MB and CPU in Gi are caught.
Kubernetes resource units converter
QoS classes and how each is decided
Kubernetes gives every Pod one of three classes when it is created, from the cpu and memory requests and limits of all its containers after defaulting. The class sets the kernel's oom_score_adj for the containers and the cgroup the kubelet places them in.
| Class | When | oom_score_adj |
|---|---|---|
| Guaranteed | Every container (init and sidecar ones too) sets a cpu and a memory limit, and each request equals its limit. A limit alone is enough: the API server copies it into the request. | -997 |
| Burstable | Neither of the other two: at least one container sets a cpu or memory request or limit, but not every one matches. | 3 to 999, from the memory request |
| BestEffort | No container sets any cpu or memory request or limit. Other resources (ephemeral-storage, GPUs) do not count. | 1000 |
The rule runs container by container, init containers first. Any container whose cpu or memory request differs from its limit makes the Pod Burstable at once. A container that sets cpu but not memory is Burstable too. Two containers that are each consistent but different (one with nothing set, one fully set) also give Burstable.
When spec.resources sets a pod-level cpu or memory value (the PodLevelResources feature, beta since v1.34), those pod-level values alone decide the class. A pod-level limit without a pod-level request takes its request from the containers' combined request, not from the limit.
Requests also drive autoscaling: the HorizontalPodAutoscaler reads CPU and memory utilization as a percentage of these requests, so a missing or inflated request changes how many replicas it asks for.
How the Pod request is computed
The scheduler reserves, for each resource, the larger of two numbers, then adds spec.overhead:
- Running Pod: the sum of the app containers and every sidecar (init container with
restartPolicy: Always). - Busiest init step: each regular init container, plus the sidecars listed before it, which are already running.
The tool's default manifest has a migrate init container, then a log-shipper sidecar, then the app:
| Phase | CPU | Memory |
|---|---|---|
Init migrate (no sidecar started yet) | 500m | 512Mi |
Sidecar log-shipper starts | 100m | 64Mi |
Running: app + log-shipper | 350m | 320Mi |
| Pod request | 500m | 512Mi |
The init step wins on both resources, so this Pod needs 500m and 512Mi free on a node to be scheduled, although it runs on 350m and 320Mi. On a node with 3920m CPU and 14Gi allocatable that is 7 Pods by CPU and 28 by memory, so CPU runs out first.
Limits add up the same way, with one rule of their own: the Pod gets a cpu or memory limit only if every container sets one. Here migrate sets no cpu limit, so the Pod's cpu limit is none; its memory limit is 640Mi (512Mi + 128Mi while both run).
How many Pods a node can hold is also capped by its Pod limit; on EKS, by the node's network interfaces.
Eviction and the OOM killer
Two different things remove Pods when a node runs short of memory, and the class matters to each in a different way.
Kubelet eviction (node pressure)
When available memory falls below an eviction threshold, the kubelet ranks Pods by, in order: whether their usage exceeds their request, their Pod priority, and how far usage exceeds the request. The class is not a sort key, but it decides the first one in practice: BestEffort Pods request nothing, so they always exceed it; Burstable Pods exceed it once they grow past their request; a Guaranteed Pod cannot use more than its limit, which equals its request.
Kernel OOM killer
If memory runs out before the kubelet acts, the kernel kills the process with the highest OOM score: roughly its share of memory in thousandths, plus the oom_score_adj the kubelet set for its container: −997 for Guaranteed, 1000 for BestEffort, and for Burstable 1000 − 1000 × request ÷ capacity. In the example on a 16Gi node, app gets 985, migrate 969, and the sidecar log-shipper 985: a sidecar never scores above the smallest app container, so it is not killed before the app it serves.
The kubelet keeps a Burstable score between 3 and 999. The eviction page of the Kubernetes documentation writes the formula as min(max(2, …), 999); the kubelet code clamps to 1000 + (−997) = 3, so a container requesting all of the node's memory gets 3, which is what this tool shows.
A container that exceeds its own memory limit is OOM-killed by its cgroup regardless of class. CronJob Pods follow the same rules; their template is read from jobTemplate.
Verification
The engine is a line-by-line port of the Kubernetes source (master branch, read in November 2026). Its unit tests use the vectors from the upstream tests:
- Defaulting:
SetDefaults_PodanddefaultPodRequestsinpkg/apis/core/v1/defaults.go: a limit without a request becomes the request. - QoS class:
ComputePodQOS,requirementsQOSandresourceQOSinpkg/apis/core/helper/qos/qos.go, with PodLevelResources on. Vectors frompkg/apis/core/v1/helper/qos/qos_test.go. - Pod request and limit:
PodRequests,PodLimits,aggregateContainerResourcesByFnandomitPartiallySetCPUMemLimitsink8s.io/component-helpers/resource/helpers.go, from the spec only (no in-place resize status, no DRA). Vectors from itshelpers_test.go. - oom_score_adj:
GetContainerOOMScoreAdjustinpkg/kubelet/qos/policy.goandhelpers.go, including the sidecar and pod-level rules. Vectors frompolicy_test.go. A Pod withpriorityClassName: system-node-criticalscores −997. - Eviction order:
rankMemoryPressureinpkg/kubelet/eviction/helpers.go. - Quantities: the same engine as the resource units converter, a port of
resource.Quantityfromk8s.io/apimachinery; values are exact integers, so no floating-point error reaches a result.
Not modelled: LimitRange defaults and ResourceQuota (they live in the cluster, not the manifest), the scheduler's scoring defaults for Pods without requests, hugepages and extended resources such as GPUs.
The engine runs in this tab; nothing you paste is sent anywhere.