KCNA Kubernetes Fundamentals Practice Question
Which Kubernetes resource can be used to assign a pod to a specific node?
⚠ Common exam trap
A common trap is thinking that a NetworkPolicy or a ConfigMap can influence pod placement, when in fact only scheduling constructs like node affinity, nodeSelector, or taints/tolerations control node assignment.
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
✓
Node affinity rules in the pod spec
Node affinity rules in the pod spec are a set of constraints that define which nodes a pod can be scheduled on, based on node labels. This is a native Kubernetes scheduling feature that allows you to attract pods to specific nodes using required or preferred matching rules, such as `requiredDuringSchedulingIgnoredDuringExecution`. This directly answers the question of assigning a pod to a specific node.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Node affinity rules in the pod spec
Why this is correct
Node affinity in the pod spec constrains scheduling to nodes matching label expressions, such as requiredDuringSchedulingIgnoredDuringExecution with a hostname selector. This assigns the pod to a specific node, unlike taints, which repel pods rather than attract them.
- ✗
A NetworkPolicy
Why it's wrong here
NetworkPolicy governs ingress and egress traffic between pods, not scheduling placement. It is tempting because both resources involve pod-level control, but node assignment is performed by nodeSelector, node affinity or taints and tolerations, which the scheduler evaluates when binding a pod to a node.
- ✗
A Service account
Why it's wrong here
A Service account provides an identity for processes running in a pod to authenticate to the API server; it holds no scheduling semantics. It is tempting because pods reference it in their spec, but assigning a pod to a specific node needs nodeSelector, nodeAffinity or nodeName.
- ✗
A ConfigMap
Why it's wrong here
A ConfigMap supplies configuration data as key-value pairs to containers, and cannot express scheduling constraints. It is tempting because pods consume ConfigMaps declaratively, yet node placement requires nodeSelector or nodeAffinity fields in the pod spec, or a nodeName assignment.
Go deeper
Related to this question
About these practice questions
This KCNA question is part of Courseiva's 930-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 →
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.