`0/3 nodes are available: 3 node(s) didn't match Pod's node affinity/selector.`
BeginnerTroubleshootingScheduling and Pending Pods
Answer
Likely causes → The Pod's nodeSelector or required node affinity references a label no node has: typo, label removed after a node pool was replaced, or a deprecated label (beta.kubernetes.io/arch, failure-domain.beta.kubernetes.io/zone).
Diagnose →
kubectl get pod web-x -o jsonpath='{.spec.nodeSelector}{"\n"}{.spec.affinity.nodeAffinity}'
kubectl get nodes --show-labels | tr ',' '\n' | grep -E 'pool|zone|arch'
Fix → Correct the selector, or label nodes: kubectl label node ip-10-0-1-5 pool=general. Better, set labels in the node group / Karpenter NodePool definition so new nodes get them.
Prevent → Use well-known labels (topology.kubernetes.io/zone, kubernetes.io/arch) and define pool labels in IaC, never by hand.
More on Scheduling and Pending Pods
Pods are Pending with `0/5 nodes are available: 5 Insufficient cpu. preemption: 0/5 nodes are available: 5 No preemption victims found for incoming pod.`Beginner`kubectl top nodes` shows nodes at 20% CPU, yet new Pods fail with `Insufficient cpu`. Explain it to a developer.Beginner`0/4 nodes are available: 1 node(s) had untolerated taint {node-role.kubernetes.io/control-plane: }, 3 node(s) had untolerated taint {dedicated: gpu}`.BeginnerA StatefulSet Pod is Pending with `pod has unbound immediate PersistentVolumeClaims`.BeginnerA 6-replica Deployment has 3 Pods Running and 3 Pending: `0/3 nodes are available: 3 node(s) didn't match pod anti-affinity rules`.IntermediatePods are Pending with `node(s) didn't match pod topology spread constraints` even though one zone has lots of free capacity.Intermediate