Mastering Kubernetes QoS: Guarantees, Burstable, and BestEffort Explained
This article explains Kubernetes QoS classes—Guaranteed, Burstable, and BestEffort—detailing their resource request and limit requirements, how to configure them with YAML examples, the eviction priority order, and practical best‑practice strategies for classifying and scheduling workloads across cluster nodes.
Kubernetes QoS Overview
QoS (Quality of Service) classes in Kubernetes determine pod scheduling and eviction priority. Kubelet uses them to manage pod eviction order and advanced CPU management.
QoS Levels
Guaranteed : All containers in the pod must have identical memory and CPU limits and requests.
Burstable : At least one container has a memory or CPU request.
BestEffort : No container specifies any memory or CPU requests or limits.
Guaranteed
For a Guaranteed pod, each container (including init containers) must specify equal memory request and limit, and equal CPU request and limit.
apiVersion: v1
kind: Pod
metadata:
name: qos-demo
spec:
containers:
- name: qos-demo
image: nginx
resources:
limits:
memory: "500Mi"
cpu: "700m"
requests:
memory: "500Mi"
cpu: "700m"Verification:
# kubectl describe po qos-demo
...
QoS Class: GuaranteedIf a container sets limits without requests, Kubernetes automatically sets matching requests.
Burstable
A pod is classified as Burstable when it does not meet Guaranteed criteria and at least one container has a memory or CPU request.
apiVersion: v1
kind: Pod
metadata:
name: qos-demo2
spec:
containers:
- name: qos-demo2
image: nginx
resources:
limits:
memory: "500Mi"
requests:
memory: "200Mi"Verification:
# kubectl describe po qos-demo2
...
QoS Class: BurstableBestEffort
For BestEffort pods, containers have no memory or CPU limits or requests.
apiVersion: v1
kind: Pod
metadata:
name: qos-demo3
spec:
containers:
- name: qos-demo3
image: nginxQoS Priority
The priority order from lowest to highest is: BestEffort → Burstable → Guaranteed.
Eviction Mechanism
Compressible resource: CPU . When a pod exceeds its CPU limit, usage is throttled but not killed.
Non‑compressible resource: Memory . If a node runs out of memory before Kubelet can reclaim it, the OOM killer terminates containers based on their oom_score_adj values: -998 for Guaranteed, 1000 for BestEffort, and a calculated value for Burstable.
The OOM killer first terminates the lowest‑QoS pods that exceed their requested resources, typically selecting over‑requesting containers in Burstable pods.
Best Practices
Classify applications by type: core, regular, extra.
Assign QoS classes: core → Guaranteed, regular → Burstable, extra → BestEffort.
Separate cluster nodes accordingly: core nodes, regular nodes, extra nodes.
Scheduling policies:
Core apps: use nodeAffinity with preferredDuringSchedulingIgnoredDuringExecution to target core nodes.
Regular apps: use hard nodeAffinity to schedule on regular nodes.
Extra apps: use hard nodeAffinity to schedule on extra nodes.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
