Study. uk . com
  1. Home
  2. All questions
  3. Question 682

CKA study material · question 682 of 1000

A Pod sets both a nodeSelector for disk=ssd and a required node affinity for zone in [a, b]. Which nodes are eligible?

  1. Nodes matching either condition
  2. Nodes matching both conditions
  3. Nodes matching the affinity only, since it overrides nodeSelector
  4. None; the two fields are mutually exclusive
Show the answer

Answer: B. Nodes matching both conditions

nodeSelector and node affinity are combined rather than treated as alternatives, so a node has to satisfy both for the Pod to be placed there.

Source: Assigning Pods to Nodes (Kubernetes) — Affinity and anti-affinity › Node affinity

Challenge yourself on this topic → Study as cards