Courseiva
Kubernetes Fundamentals →easyMultiple Choice

KCNA Kubernetes Fundamentals Practice Question

A platform engineer wants to restrict a Pod so that it runs only on nodes that have the label disktype=ssd. The engineer adds a nodeSelector field to the Pod specification. Which statement best describes the effect of nodeSelector in this scenario?

⚠ Common exam trap

Candidates often confuse nodeSelector's hard filter with node affinity's soft preference, leading to the belief that non-matching nodes are still usable with lower priority.

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 Pod is scheduled only onto nodes whose labels match all specified key-value pairs.

nodeSelector is a hard constraint that filters the node set to those containing all specified labels. The scheduler binds the Pod only to a matching node; otherwise the Pod remains Pending. This makes it suitable for simple placement requirements such as selecting SSD-backed nodes. The other descriptions confuse nodeSelector with soft preferences, kubelet behavior, or label existence checks, all of which are inaccurate.

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 Pod is scheduled only onto nodes that have at least one label, regardless of the label value.

    Why it's wrong here

    nodeSelector requires exact key-value matching, not merely the presence of any label. A node labeled disktype=hdd or with unrelated labels would not satisfy disktype=ssd. The scheduler compares both the key and the value, so the statement that any label suffices is technically wrong and would not achieve the engineer's goal.

  • ✗

    The Pod is scheduled onto any node, but nodes without the label are given lower priority.

    Why it's wrong here

    nodeSelector does not implement preferences or scoring; it is a strict filter. Nodes that lack the required label are excluded entirely from scheduling, not merely deprioritized. Affinity with preferredDuringSchedulingIgnoredDuringExecution would express a soft preference, but nodeSelector itself provides no such fallback behavior, so this description is incorrect.

  • ✓

    The Pod is scheduled only onto nodes whose labels match all specified key-value pairs.

    Why this is correct

    nodeSelector is a hard scheduling constraint expressed as a map of labels. The scheduler filters nodes and only considers those that contain every label key-value pair listed in nodeSelector. If no node matches, the Pod remains Pending. In this scenario, only nodes labeled disktype=ssd are eligible, which is exactly the intended behavior.

  • ✗

    The Pod can run on any node, but the kubelet on unlabeled nodes refuses to start the container.

    Why it's wrong here

    Scheduling decisions are made by kube-scheduler before a Pod is bound to a node, not by the kubelet rejecting containers. If nodeSelector does not match any node, the Pod stays Pending and is never assigned. The kubelet does not perform label-based admission for nodeSelector, so this description misrepresents where the constraint is enforced.

About these practice questions

Courseiva writes every KCNA question from scratch — 930 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CNCF exam blueprint

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.