Courseiva
Kubernetes FundamentalshardMultiple ChoiceObjective-mapped

KCNA Kubernetes Fundamentals Practice Question

You have a Pod with a container that runs a web server. The Pod has a memory request of 256Mi and a memory limit of 512Mi. The container attempts to allocate 600Mi of memory. What happens?

⚠ Common exam trap

A common misconception is that memory limits are 'soft' or 'advisory' (like CPU limits), but in Kubernetes, memory limits are hard and enforced by the kernel's OOM killer, causing container termination when exceeded.

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 by the OOM killer, and the Pod enters CrashLoopBackOff

When a container's memory usage exceeds its memory limit (512Mi), the Linux Out-Of-Memory (OOM) killer terminates the container process. Kubernetes then restarts the container based on the Pod's restart policy, but because the container immediately tries to allocate 600Mi again, it is repeatedly killed, resulting in a CrashLoopBackOff state. Memory limits are hard constraints enforced by the kernel via cgroups, not soft 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.

  • The memory limit is automatically increased to 600Mi

    Why it's wrong here

    Limits are not auto-adjusted; they must be changed in the YAML.

  • The container is killed by the OOM killer, and the Pod enters CrashLoopBackOff

    Why this is correct

    Exceeding the memory limit triggers OOM kill; the container restarts and may crash again.

  • The Pod is evicted from the node

    Why it's wrong here

    Eviction happens when the node is under resource pressure, not directly due to a single container exceeding its limit.

  • The container is allowed to use up to 600Mi because the limit is a soft constraint

    Why it's wrong here

    Limits are hard constraints; exceeding them causes termination.

About these practice questions

This KCNA question is part of Courseiva's 833-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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on KCNA

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A developer deploys a pod that continuously restarts. 'kubectl describe pod' shows the container exits with code 137. What is the most likely cause?

medium
  • A.The container is exceeding its memory limit and being OOM-killed.
  • B.The liveness probe is failing and restarting the container.
  • C.The init container is failing and blocking the main container.
  • D.The pod is hitting a resource quota limit at the namespace level.

Why A: Exit code 137 (128 + 9) indicates the container was killed by SIGKILL. In Kubernetes, this most commonly occurs when the container exceeds its memory limit, triggering the OOM (Out-Of-Memory) killer. The kubelet enforces the resource limits specified in the pod spec, and when memory usage surpasses the limit, the kernel terminates the process with SIGKILL, resulting in exit code 137.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This KCNA 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 KCNA exam.