Courseiva
easyMultiple ChoiceObjective-mapped

XK0-006 Practice Question: The sysadmin receives the error shown in the…

Exhibit

Refer to the exhibit.

$ cat config.yaml
apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - name: nginx
    image: nginx
    resources:
      requests:
        memory: "256Mi"
        cpu: "250m"

$ kubectl apply -f config.yaml
Error: The Pod "nginx" is invalid: spec.containers[0].resources.limits: Required value: must specify limits for cpu and memory

The sysadmin receives the error shown in the exhibit. What is the most likely fix?

⚠ Common exam trap

Candidates often confuse resource requests (which guarantee minimum resources) with limits (which cap usage), and mistakenly think removing requests or adding probes will fix an OOM error, when only a memory limit prevents the container from exhausting node memory.

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

Add limits to the resources section.

The error indicates the container was killed due to an Out Of Memory (OOM) condition. Adding limits to the resources section constrains the container's memory usage, preventing it from exceeding the node's capacity and being terminated by the kernel OOM killer.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Add a readiness probe to the container.

    Why it's wrong here

    A readiness probe is not related to resource limits.

  • Change the image tag to :latest.

    Why it's wrong here

    The image tag is not related to the error.

  • Remove the requests section.

    Why it's wrong here

    Removing requests does not add the required limits.

  • Add limits to the resources section.

    Why this is correct

    The error explicitly requires limits to be specified.

About these practice questions

This XK0-006 question is part of Courseiva's 979-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

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.