Skip to content
Latchkey

Kubernetes "0/3 nodes are available: insufficient cpu/memory" in CI - Fix it

The scheduler checked every node and none has enough unreserved CPU or memory to satisfy the pod's requests. The pod stays Pending with a FailedScheduling event, and the rollout never completes. This is capacity versus requests, not a crash.

What this error means

After a deploy, pods stay Pending and kubectl describe pod shows 0/3 nodes are available: 3 Insufficient cpu (or Insufficient memory).

kubectl
Warning  FailedScheduling  default-scheduler  0/3 nodes are available:
3 Insufficient cpu. preemption: 0/3 nodes are available: 3 No preemption victims found.

Common causes

Requests exceed available node capacity

The summed requests of pods on every node leave no room for the new pod, so none can host it.

Over-large requests on a small node pool

A single pod requests more CPU/memory than any node has allocatable, so it can never be placed.

How to fix it

Right-size requests or add capacity

  1. Read the FailedScheduling event to see whether cpu or memory is short.
  2. Lower the pod's requests if they are inflated, or add/grow nodes.
  3. Re-check that a node now has room and the pod schedules.
Terminal
kubectl describe pod <pod> | sed -n '/Events/,$p'
kubectl describe nodes | grep -A3 'Allocated resources'

Set realistic resource requests

Requests reserve capacity; set them to what the workload actually needs so the scheduler can place it.

deployment.yaml
resources:
  requests:
    cpu: "250m"
    memory: "256Mi"

How to prevent it

  • Base requests on measured usage so they fit node capacity.
  • Enable cluster autoscaling for bursty deploys.
  • Watch node allocatable headroom before large rollouts.

Frequently asked questions

What causes ""0/N nodes are available: insufficient cpu/memory""?
The summed requests of pods on every node leave no room for the new pod, so none can host it.
How do I fix "0/N nodes are available: insufficient cpu/memory"?
Right-size requests or add capacity

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card