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.

/bin/bash -c "$(curl -fsSL https://kwatch.dev/kwatch.sh)"

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