Skip to main content

๐Ÿงญ Kubernetes pod stuck in Pending: why and how to fix it

Pending: Kubernetes has not found a node for the pod. Usual causes: no node has enough CPU or memory, a taint or selector does not match, or a volume cannot attach.

๐Ÿ”Ž Check it by handโ€‹

  1. Read the pod events. Read the Events at the bottom and look for FailedScheduling.
kubectl describe pod <pod> -n <namespace>
  1. List the nodes
kubectl get nodes
  1. Check what a node has free
kubectl describe node <node>

๐ŸŽฏ What kwatch sendsโ€‹

The message reads like this.

Example messageโ€‹

๐ŸŸ  etl in analytics (prod-eu-1) has waited two minutes for a node because no node has enough cpu. It needs 1.5 CPU; the most any node has free is 1.2 CPU, on n1. No node fits: pool general has no node with 1.5 CPU free (best: n1 has 1.2 CPU free); pool bulk has no node with 1.5 CPU free (best: big1 has 1 CPU free). To see the object's state and events, run kubectl describe pod etl-4a6bfd72-a -n analytics

โญ Which editionโ€‹

Community includes scheduling detection.

๐Ÿš€ Install kwatchโ€‹

One command, and it walks you through it.

bash <(curl -fsSL https://kwatch.dev/kwatch.sh)

Community is free forever; Pro is free during early access. See Installation and Community vs Pro.