Skip to content
tezvyn:

What are the three Pod QoS classes?

Source: interviewMediumHow cards are made

Summary

QoS and eviction priority.

Key points

Guaranteed when every container sets equal requests and limits for CPU and memory; Burstable when requests are set but not matching limits; BestEffort when none are set; lower classes are evicted first under…

What's really being asked

Whether you understand how Kubernetes derives QoS from requests and limits and how that drives eviction ordering under node pressure.

The full answer

There are three classes, assigned automatically from the resource settings. Guaranteed: every container in the Pod sets both a CPU and a memory limit, and each limit equals its corresponding request; requests may be omitted because they default to the limits. These Pods have the most predictable resources and are the last to be evicted. Burstable: the Pod does not qualify as Guaranteed, but at least one container has a CPU or memory request or limit set. These Pods can use more than their requests when capacity allows but are reclaimable above their requests. BestEffort: no container in the Pod sets any request or limit at all. These get whatever is left over. The classes matter most during node memory pressure: the kubelet evicts BestEffort Pods first, then Burstable Pods that are using more than their requests, and protects Guaranteed Pods longest. QoS also influences the OOM score the kernel assigns.

The mistakes people make

Thinking any Pod with requests set is Guaranteed, when Guaranteed strictly requires limits equal to requests on every container. Believing BestEffort means no scheduling. Getting the eviction order backwards. Forgetting that limits must equal requests for Guaranteed.

What usually comes next

Why must limits equal requests for Guaranteed? How does QoS affect the kernel OOM score? What gets evicted first under memory pressure? Can a single container omit requests and still be Guaranteed?

A concrete example

A Pod whose container sets cpu and memory requests and limits all to identical values is Guaranteed; one that sets only a memory request is Burstable; one with no resources specified is BestEffort, and under memory pressure that BestEffort Pod is the first the kubelet evicts.

Interview question

Which condition makes a Pod's QoS class Guaranteed?

  • a.The Pod runs in the kube-system namespace
  • b.At least one container sets a memory request
  • c.Every container sets CPU and memory limits equal to their requestsCorrect
  • d.No container sets any requests or limits
Why?

Guaranteed requires every container to set both CPU and memory limits equal to their requests. Setting only a request yields Burstable, setting nothing yields BestEffort, and the namespace does not determine QoS.

Just read this? Test yourself on what you have been reading.

Read the original → kubernetes.io

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on kubernetes — each one lists the topics its interview covers.

See open roles