CKAD Practice Question: Application Environment, Configuration and Security
Which of the following is the correct way to set a CPU request of 250 millicores and a memory limit of 512 Mi in a container?
⚠ Common exam trap
It's easy for candidates to confuse the 'M' (Megabyte, decimal) and 'Mi' (Mebibyte, binary) suffixes, or forget that CPU values without 'm' are interpreted as whole cores, leading to accidentally requesting 250 CPUs instead of 0.25.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
resources: requests: cpu: 250m limits: memory: 512Mi
In Kubernetes, CPU requests are specified in millicores (e.g., 250m) and memory limits use binary units like Mi (Mebibytes). The value '250m' equals 0.25 CPU cores, and '512Mi' is 512 Mebibytes (512 * 1024^2 bytes), which is the standard unit for memory limits.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
resources: requests: cpu: 250 limits: memory: 512M
Why it's wrong here
This sets cpu to 250, which without a suffix is interpreted as 250 whole CPU cores, not 250 millicores. Additionally, memory uses '512M'; while 'M' is a valid decimal SI suffix (megabytes), the 'B' is not part of Kubernetes' resource quantity grammar, and the intended amount should use 'Mi' for mebibytes.
- ✗
resources: requests: cpu: 250 limits: memory: 512MB
Why it's wrong here
The cpu value of 250 is again 250 full cores, a grossly oversized request for most containers. The memory '512MB' is also invalid because Kubernetes does not recognize the 'B' suffix; resource quantities use plain 'M' (megabytes) or 'Mi' (mebibytes), not 'MB'.
- ✗
resources: requests: cpu: 0.25 limits: memory: 512MB
Why it's wrong here
The cpu request of 0.25 is valid and equals 250 millicores, so the problem is not with cpu. The memory limit '512MB' is non-standard: Kubernetes resource quantities do not accept 'MB'; use 'Mi' for mebibytes or 'M' for megabytes, with '512Mi' being the correct representation for this example.
- ✓
resources: requests: cpu: 250m limits: memory: 512Mi
Why this is correct
This is the only correct option. '250m' specifies 250 millicores, i.e., 0.25 of a CPU core, which is the proper fractional-core notation. '512Mi' uses the binary suffix 'Mi' to request 512 mebibytes, a standard and unambiguous Kubernetes memory limit.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CKAD question from scratch — 826 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.