Courseiva
Container OrchestrationhardMultiple ChoiceObjective-mapped

KCNA Container Orchestration Practice Question

An administrator wants to ensure that a specific pod only runs on nodes that have solid-state drives (SSDs). Nodes with SSDs are labeled with 'disktype=ssd'. Which pod specification field should be used?

⚠ Common exam trap

A common mix-up: candidates confuse `nodeSelector` with `nodeAffinity` and choose `nodeAffinity` because it sounds more powerful, but the question explicitly asks for the field that ensures a specific pod only runs on nodes with SSDs, and `nodeSelector` is the correct, minimal field for a simple label match.

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

nodeSelector

The `nodeSelector` field in a Pod spec is the simplest and most direct way to constrain a Pod to nodes with specific labels. By setting `nodeSelector: { disktype: ssd }`, the scheduler will only place the Pod on nodes that have the label `disktype=ssd`, which matches the administrator's requirement exactly. This field is a hard constraint that does not support complex expressions, but it is ideal for straightforward label-based node selection.

Answer analysis

Option-by-option breakdown

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

  • nodeSelector

    Why this is correct

    nodeSelector directly matches node labels and is the simplest approach for this requirement.

  • container resource limits

    Why it's wrong here

    Resource limits control CPU/memory usage, not node selection.

  • tolerations

    Why it's wrong here

    Tolerations are used to allow scheduling on tainted nodes, not to select nodes by label.

  • nodeAffinity

    Why it's wrong here

    `nodeAffinity` is the correct *mechanism* for scheduling pods based on node labels, including the 'disktype=ssd' requirement. However, the question asks for the specific *field* within the pod specification. `nodeAffinity` is itself a sub-field of the broader `affinity` field (`spec.affinity.nodeAffinity`). While `nodeAffinity` is where the rules are defined, `affinity` is the top-level field that encapsulates all node and pod affinity/anti-affinity rules, making it the more encompassing and direct answer for the *field* to configure.

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

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.