Courseiva
Kubernetes FundamentalsmediumMultiple SelectObjective-mapped

KCNA Kubernetes Fundamentals Practice Question

Which TWO of the following are valid ways to assign a pod to a specific node?

⚠ Common exam trap

CNCF often tests the distinction between mechanisms that *constrain* scheduling (like nodeSelector and nodeAffinity) versus mechanisms that *permit* scheduling (like tolerations), and candidates mistakenly think tolerations can force a pod to a specific node when they only allow it to be scheduled on tainted nodes.

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

`nodeSelector` is a simple, built-in field in the Pod spec that matches the pod to nodes with specific labels. When you add a `nodeSelector` with a key-value pair, the scheduler only places the pod on nodes that have that exact label. This is the most straightforward way to constrain a pod to a subset of nodes.

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

    Node selector uses labels to match nodes.

  • affinity: nodeAntiAffinity

    Why it's wrong here

    Anti-affinity prevents scheduling on nodes, does not assign.

  • tolerations

    Why it's wrong here

    Tolerations allow scheduling on tainted nodes but do not assign to a specific node.

  • nodeName

    Why this is correct

    nodeName directly specifies the node.

  • podSelector

    Why it's wrong here

    PodSelector is used for network policies or pod affinity, not node assignment.

About these practice questions

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