CertLumen

Certified Kubernetes Application Developer (CKAD) · Section 4 · 25% of the exam

Define resource requirements

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 namespace has a quota of count/deployments.apps: 3 and already holds three Deployments. A developer runs kubectl create deployment extra --image=nginx. What happens?

  1. AThe API server rejects the request with 403 Forbidden: exceeded quota
  2. BThe Deployment is created, but its Pods stay Pending until the quota is raised
  3. CThe oldest Deployment is deleted to make room
  4. DThe Deployment is created with replicas: 0
Show the answer

A. Quota is enforced in admission. For compute quota, Deployments can be created while their Pods fail; for count quota on the object itself the object creation fails.

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.

More in this section

← Previous objective · All 24 objectives · Next objective →