kubernetes scheduling_error ai_generated true

Pod status: Pending — 0/N nodes are available

ID: kubernetes/pod-pending

Also available as: JSON · Markdown
85%Fix Rate
88%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
8 active

Root Cause

Pod can't be scheduled. Insufficient resources, node taints, or affinity constraints.

generic

Workarounds

  1. 92% success Check kubectl describe pod for scheduling failure reason, then fix resources or node capacity
    kubectl describe pod <name> | grep -A5 Events

    Sources: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/

  2. 85% success Scale up node pool or reduce resource requests to fit available capacity
    # Check what's blocking scheduling:
    kubectl describe pod <pod-name> | grep -A 10 Events
    
    # Scale up nodes:
    kubectl scale nodepool <pool> --num-nodes=5  # GKE
    
    # Or reduce resource requests:
    resources:
      requests:
        cpu: "100m"    # was 500m
        memory: "128Mi" # was 512Mi

    Sources: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

Dead Ends

Common approaches that don't work:

  1. Delete and recreate the pod 80% fail

    Same scheduling constraints apply, pod will be Pending again

  2. Remove all resource requests/limits 65% fail

    Pod runs but can OOMKill or starve other workloads

Error Chain

Preceded by: