Skip to content

Pod Scheduling Failed

Error message

                0/3 nodes are available: 3 node(s) had taints that the pod didn't tolerate
              

Quick summary

The scheduler cannot place the Pod on any node due to taints, resource limits, affinity rules, or node selectors.

Why this happens

  • Node taints prevent the Pod from being scheduled on available nodes

  • Node selector or node affinity rules do not match any node

  • Pod anti-affinity rules prevent co-location with existing Pods

  • Insufficient resources on all matching nodes

Minimal example

✗ Broken code
spec:
  nodeSelector:
    disktype: ssd  # no nodes have this label
✓ Fixed code
spec:
  nodeSelector:
    disktype: ssd
  tolerations:
    - key: dedicated
      operator: Equal
      value: gpu
      effect: NoSchedule

The Pod cannot be scheduled because no nodes match the selector or tolerate the taints. The fix adds tolerations.

How to diagnose

  • Describe the Pod: kubectl describe pod <pod> — check the Events section

  • Check node taints: kubectl get nodes -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taints

  • Verify nodeSelector, affinity, and tolerations in the Pod spec

  • Check available resources on nodes: kubectl describe nodes

How to fix

  • Add tolerations to the Pod spec for the node taints

  • Adjust nodeSelector or affinity rules to match available nodes

  • Add more nodes or remove taints from existing nodes

  • Reduce resource requests so the Pod fits on an available node

How to prevent

  • Document node taints and required tolerations

  • Test Pod specs against cluster constraints before deploying

  • Monitor scheduling failures and alert on them

Related Resources

Related Glossary

← Back to language