Skip to main content

Guaranteed

Guaranteed is the highest Kubernetes QoS class. A pod is Guaranteed when every container has CPU and memory requests equal to its limits, which gives it the strongest protection and makes it the last to be evicted under node memory pressure.

The exact rule

Every container in the pod, including init containers and injected sidecars, must set both cpu and memory with requests equal to limits. One container that breaks the rule makes the whole pod Burstable.

YAML
containers:
- name: trading-engine
image: registry.example.com/trading-engine:v4.2.1
resources:
requests: { cpu: "2", memory: "4Gi" }
limits: { cpu: "2", memory: "4Gi" }
- name: metrics-exporter
image: prom/statsd-exporter:v0.26.1
resources:
requests: { cpu: "100m", memory: "64Mi" }
limits: { cpu: "100m", memory: "64Mi" }
Bash
kubectl get pod trading-engine-7d9f8c-xkp2q -n production -o jsonpath='{.status.qosClass}'
kubectl get pods -n production -o custom-columns=NAME:.metadata.name,QOS:.status.qosClass
flowchart TD M["Node memory pressure"] --> B["BestEffort
evicted first"] B --> U["Burstable
over request"] U --> G["Guaranteed
evicted last"] classDef start fill:#475569,color:#ffffff classDef bad fill:#FEE2E2,color:#1E293B classDef mid fill:#FFEDD5,color:#1E293B classDef safe fill:#D1FAE5,color:#1E293B class M start class B bad class U mid class G safe

Guaranteed pods also receive CPU manager benefits: with the static CPU manager policy, integer-CPU Guaranteed pods can get exclusive cores.

The cost

The scheduler reserves the full limit even if usage is a fraction of it, so nodes look full long before they are busy. Use Guaranteed selectively for databases, payment processors, and other workloads where eviction is unacceptable.

Remember

Service mesh sidecars are injected automatically. If the injected proxy does not have equal requests and limits, your pod is silently downgraded to Burstable. Confirm the class after deploying.

Tip

Set mesh proxy resources through the mesh's global or per-pod annotations when you need Guaranteed pods in a meshed namespace.

Common Mistake

Making everything Guaranteed because it sounds safer. Packing efficiency collapses and you pay for capacity you rarely use.

Frequently Asked Questions

Why are Guaranteed pods evicted last?

Their usage is bounded by their request, so the kubelet considers them the least likely cause of pressure. Eviction goes through BestEffort and over-request Burstable pods first.

What is the downside of Guaranteed everywhere?

Poor bin packing. The scheduler reserves peak capacity for every pod, so you need more nodes than your actual usage requires.

Why is my pod Burstable when I set requests equal to limits?

Another container, often an init container or injected sidecar, has different or missing values. Check every container with kubectl get pod -o json.

Found a mistake, an outdated step or a broken link?