What are the three Quality of Service (QoS) classes in Kubernetes?
The three QoS classes are Guaranteed, Burstable, and BestEffort. They define how Kubernetes manages pod resources under pressure.
Click to reveal answer
intermediate
What conditions must a pod meet to be classified as Guaranteed QoS in Kubernetes?
A pod is Guaranteed if every container has memory and CPU requests equal to their limits. This means the pod gets the highest priority for resources.
Click to reveal answer
intermediate
Describe the <strong>Burstable</strong> QoS class in Kubernetes.
A pod is Burstable if it has resource requests and limits set, but requests are less than limits for at least one resource. It can use extra resources when available but may be throttled under pressure.
Click to reveal answer
beginner
What happens to a BestEffort pod during resource contention in Kubernetes?
BestEffort pods have no resource requests or limits set. They get the lowest priority and are the first to be evicted when the node runs out of resources.
Click to reveal answer
intermediate
How does Kubernetes determine the QoS class of a pod?
Kubernetes checks the resource requests and limits of all containers in the pod. Based on their presence and equality, it assigns the pod to Guaranteed, Burstable, or BestEffort.
Click to reveal answer
Which QoS class in Kubernetes guarantees the highest priority for resource allocation?
ANone
BBurstable
CBestEffort
DGuaranteed
✗ Incorrect
The Guaranteed class ensures pods have equal resource requests and limits, giving them the highest priority.
A pod with no resource requests or limits set falls under which QoS class?
ABestEffort
BGuaranteed
CBurstable
DCritical
✗ Incorrect
Pods without any resource requests or limits are classified as BestEffort.
If a pod has CPU requests less than CPU limits, what QoS class does it belong to?
ABurstable
BBestEffort
CGuaranteed
DNone
✗ Incorrect
When requests are less than limits, the pod is Burstable.
Which QoS class pods are evicted first during node resource pressure?
AGuaranteed
BBestEffort
CAll equally
DBurstable
✗ Incorrect
BestEffort pods have the lowest priority and are evicted first.
What must be true for a pod to be classified as Guaranteed?
ARequests less than limits for some containers
BNo resource requests or limits
CRequests equal limits for all containers
DOnly CPU requests set
✗ Incorrect
Guaranteed requires requests and limits to be equal for every container.
Explain the differences between Guaranteed, Burstable, and BestEffort QoS classes in Kubernetes.
Think about resource requests and limits and how Kubernetes uses them to prioritize pods.
You got /4 concepts.
Describe how Kubernetes uses QoS classes to manage pod eviction during resource shortages.
Consider which pods have resource guarantees and which do not.
You got /4 concepts.
Practice
(1/5)
1. Which Kubernetes Quality of Service (QoS) class guarantees that a pod will always get the resources it requests?
easy
A. Burstable
B. Guaranteed
C. BestEffort
D. Reserved
Solution
Step 1: Understand QoS classes in Kubernetes
There are three main QoS classes: Guaranteed, Burstable, and BestEffort. Guaranteed means the pod has resource requests equal to limits.
Step 2: Identify which class ensures resource guarantees
Guaranteed pods always get the resources they request because requests and limits match exactly.
Final Answer:
Guaranteed -> Option B
Quick Check:
Guaranteed = full resource guarantee [OK]
Hint: Guaranteed means requests equal limits, so full resource guarantee [OK]
Common Mistakes:
Confusing Burstable with Guaranteed
Thinking BestEffort has resource guarantees
Assuming Reserved is a QoS class
2. Which of the following pod resource specifications will result in a Burstable QoS class?
Step 1: Compare requests and limits in the pod spec
Requests and limits for both CPU and memory are equal (100m CPU and 128Mi memory).
Step 2: Determine QoS class based on equality
When requests equal limits for all resources, Kubernetes assigns Guaranteed QoS.
Final Answer:
Guaranteed -> Option D
Quick Check:
Requests = Limits means Guaranteed [OK]
Hint: Equal requests and limits means Guaranteed QoS [OK]
Common Mistakes:
Choosing Burstable when requests equal limits
Thinking BestEffort applies with resource specs
Selecting null as a QoS class
4. Given this pod spec snippet, what QoS class will Kubernetes assign?
resources:
requests:
cpu: '0'
memory: '0'
medium
A. BestEffort
B. Burstable
C. Guaranteed
D. It will cause a syntax error
Solution
Step 1: Analyze the resource specification
Requests are set to cpu: '0' and memory: '0', with no limits defined.
Step 2: Apply QoS classification rules
Requests are specified but zero values are treated as no requests. No limits are defined. This qualifies as BestEffort, since no resource requests or limits are effectively set.
Final Answer:
BestEffort -> Option A
Quick Check:
No requests or limits means BestEffort [OK]
Hint: Zero requests with no limits -> BestEffort (not Burstable) [OK]
Common Mistakes:
Thinking it causes a syntax error
Assuming zero requests means BestEffort
Believing it qualifies as Guaranteed
5. You want to ensure a pod gets guaranteed CPU and memory resources but also allow it to burst beyond the requested amount when available. Which resource configuration and QoS class combination achieves this?
hard
A. Set no requests or limits; QoS class BestEffort
B. Set requests equal to limits; QoS class Guaranteed
C. Set requests less than limits; QoS class Burstable
D. Set limits less than requests; QoS class Burstable
Solution
Step 1: Understand resource guarantees and bursting
Guaranteed QoS requires requests equal to limits, which means no bursting beyond limits. Burstable allows requests less than limits, enabling bursting.
Step 2: Match configuration to desired behavior
Setting requests less than limits gives minimum guaranteed resources with ability to burst, which is Burstable QoS.
Final Answer:
Set requests less than limits; QoS class Burstable -> Option C