CKA Workloads and Scheduling Practice Question
A container requests 256Mi memory and has a limit of 512Mi. The container tries to allocate 600Mi. What happens?
⚠ Common exam trap
Many exam-takers confuse memory limits with node-level memory pressure or CPU throttling, leading candidates to think the container can burst beyond its limit if node memory is available, or that memory usage is throttled like CPU.
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
✓
The container is killed with OOMKilled and restarted
The container's memory limit is 512Mi, and it attempts to allocate 600Mi, which exceeds the limit. Kubernetes enforces memory limits via cgroups; when a container exceeds its memory limit, the kernel's OOM killer terminates the process, resulting in an OOMKilled status. The container will then be restarted according to its restart policy (e.g., Always).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The container is allowed to use up to 600Mi if the node has free memory
Why it's wrong here
Kubernetes strictly enforces configured memory limits via the container runtime and cgroups. Even if the underlying node has abundant free memory, any container that attempts to allocate memory beyond its defined limit of 512Mi will be immediately terminated rather than allowed to burst.
- ✗
The kernel throttles the container's memory usage
Why it's wrong here
Unlike CPU resources, which can be throttled or rate-limited by the CFS scheduler when limits are exceeded, memory is a non-compressible resource. The Linux kernel cannot throttle memory allocations; instead, it must reclaim memory or terminate the offending process using the Out-Of-Memory (OOM) killer.
- ✓
The container is killed with OOMKilled and restarted
Why this is correct
When a container exceeds its 512Mi memory limit, the kernel's OOM killer terminates the process, resulting in an OOMKilled status. Because the default restartPolicy for Pods is Always, the kubelet will automatically restart the container in an attempt to restore the application's availability.
- ✗
The container is evicted from the node
Why it's wrong here
Pod eviction is a node-level pressure relief mechanism triggered by the kubelet when the entire node runs low on resources like memory or disk space. A single container exceeding its own local limit does not trigger a node-wide eviction; it is handled locally and immediately by the cgroup OOM killer.
Go deeper
Related to this question
Learn chapter
Kubernetes Architecture Overview
Key term
Ingress Resources
Ingress Resources are Kubernetes API objects that manage external access to services inside a cluster, typically HTTP and HTTPS traffic, by defining rules for routing requests based on hostnames and paths.
Key term
Network Policies
A Kubernetes resource that controls how pods communicate with each other and with other network endpoints, acting as a firewall for pod-to-pod traffic.
About these practice questions
This CKA question is part of Courseiva's 726-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 CKA 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 CKA exam.