KCNA ยท Cluster administration and scheduling
Requests, limits and QoS classes
CPU/memory requests vs limits, QoS classes, throttling vs OOMKill, LimitRange and ResourceQuota.
Key points
- Request: what the scheduler reserves for a container. Limit: the ceiling it may use.
- Over CPU limit: throttled. Over memory limit: can be OOM-killed.
- QoS class, derived from these: Guaranteed if requests equal limits for CPU and memory in every container.
- Burstable: some requests or limits.
- BestEffort: none; evicted first under node pressure.
- LimitRange: per-object defaults and bounds. ResourceQuota: caps totals per namespace.
Source: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
Practice questions
Which value does the scheduler use to decide whether a Pod fits on a node?
- The container's limits
- The container's requests
- The container's image size
- The Pod's restart count
Show answer
Answer: B. The container's requests
The scheduler sums container requests and compares them with unreserved node capacity. Limits are ceilings enforced at runtime.
Which statements about QoS classes are correct?
- The class is derived from requests and limits
- BestEffort Pods are evicted before Burstable and Guaranteed
- Guaranteed needs requests equal to limits for CPU and memory
- You set the class by writing status.qosClass yourself
- Burstable Pods are always evicted last
Show answer
Answer: A. The class is derived from requests and limits, B. BestEffort Pods are evicted before Burstable and Guaranteed, C. Guaranteed needs requests equal to limits for CPU and memory
QoS is derived from requests and limits, BestEffort goes first under pressure, and Guaranteed needs equal requests and limits for CPU and memory. You cannot set the class directly, and Guaranteed is evicted last, not first.
A container that exceeds its CPU limit is killed, just like one that exceeds its memory limit.
Show answer
Answer: False
False. CPU over the limit is throttled; only exceeding memory can lead to an OOM kill.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
