Certified Kubernetes Application Developer (CKAD) · Section 4 · 25% of the exam
Understand requests, limits, quotas
One of the objectives of the Certified Kubernetes Application Developer (CKAD) exam, in the section “Application Environment, Configuration and Security”. Here is what it covers, the points to remember and a question to try.
What it covers
Requests tell the scheduler how much a container needs; limits cap what it can use. This lesson covers units, how the kubelet enforces limits, QoS classes and eviction, LimitRange defaults, ResourceQuota for namespaces, in-place resize, and the commands for setting and checking resources.
Points to remember
- Requests are used by the scheduler; limits are enforced at run time by the kubelet and runtime.
- Exceeding a CPU limit throttles the container; exceeding a memory limit gets it OOM-killed (OOMKilled, exit code 137).
- CPU: 1 = one core, 500m = half a core. Memory: 128Mi is binary, 128M is decimal, and lowercase m means milli.
- If only limits are set, requests default to the limits; Guaranteed needs requests equal to limits for CPU and memory in every container.
- QoS classes: Guaranteed, Burstable, BestEffort; BestEffort Pods are evicted first.
Try a question
A LimitRange sets type: Container, defaultRequest: {cpu: 100m} and default: {cpu: 250m}. A Pod is created whose container has no CPU settings. What values does the container get?
- ARequest 100m and limit 250m
- BRequest 250m and limit 100m
- CRequest 100m and no limit
- DNo values, because LimitRange only validates
Show the answer
A. The naming is a frequent source of mistakes: default means default limit and defaultRequest means default request. min, max and maxLimitRequestRatio validate.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Resource Requests, Limits, Quotas and LimitRanges teaches this objective (about 45 minutes), and 14 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.