A developer runs `kubectl get pods` and notices that one Pod is stuck in the `Pending` state. The Pod's resource requests are modest, and the node has sufficient CPU and memory. Which of the following is the MOST likely reason the Pod is not being scheduled?
A nodeSelector restricts scheduling to nodes with matching labels. If no node has the specified label, the scheduler cannot place the Pod, leaving it Pending. Other factors like resource availability are not the issue here, so this is the most likely cause.
Why this answer
The scheduler assigns Pods to nodes based on resource requests, node selectors, affinity rules, and taints/tolerations. When a Pod remains Pending despite adequate resources, a nodeSelector mismatch is a common cause. The scheduler cannot find a node that satisfies the label constraint, so it leaves the Pod unscheduled until a suitable node becomes available or the selector is corrected.
Exam trap
The trap here is assuming that Pending always means insufficient resources, while ignoring scheduling constraints like nodeSelector or affinity.