Skip to content
Latchkey

Kubernetes "0/N nodes available: Insufficient cpu/memory" in CI

The scheduler could not place the pod because no node has enough unreserved CPU or memory to satisfy its requests. The pod stays Pending until capacity frees up or you lower the request.

What this error means

A pod is stuck Pending. kubectl describe pod shows a FailedScheduling event: 0/N nodes are available: N Insufficient cpu (or memory). The rollout stalls waiting for a node that fits.

kubectl describe pod
Warning  FailedScheduling  default-scheduler  0/4 nodes are available:
4 Insufficient cpu, 2 Insufficient memory.

Common causes

Requests larger than any node’s free capacity

The sum of already-scheduled requests plus this pod’s requests exceeds every node’s allocatable CPU/memory, so none can fit it.

Over-large or accidental requests

A request set far above what the app needs (e.g. cpu: "8") makes the pod unschedulable on smaller nodes even when actual usage is low.

How to fix it

Compare the request to node allocatable

See the pod’s requests against what nodes actually have free.

Terminal
kubectl get pod <pod> -o jsonpath='{.spec.containers[*].resources.requests}'; echo
kubectl describe nodes | grep -A5 'Allocated resources'

Lower the request or add capacity

  1. Set requests to the app’s real steady-state usage, not its peak.
  2. If the workload genuinely needs it, add nodes or a larger node pool.
  3. With cluster autoscaler, ensure a node group exists whose size can satisfy the request.

How to prevent it

  • Base CPU/memory requests on measured usage, not guesses.
  • Keep node sizes large enough for your biggest single pod’s requests.
  • Run a cluster autoscaler so capacity scales with pending pods.

Frequently asked questions

What causes ""Insufficient cpu/memory""?
The sum of already-scheduled requests plus this pod’s requests exceeds every node’s allocatable CPU/memory, so none can fit it.
How do I fix "Insufficient cpu/memory"?
See the pod’s requests against what nodes actually have free.

Related guides

References

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