liveBook · Manning

Pending state

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

A pending state is a Kubernetes pod phase in which the pod has been accepted but is not yet running, commonly because it has not been scheduled.

A pending state means a Kubernetes pod has been accepted but is not yet running. When a pod remains unassigned to a node, investigate the scheduler rather than the container first. section 8.2

Use this troubleshooting path:

  • Run kubectl describe to inspect pod events and confirm that scheduling is the blocking step. section 8.2
  • Check the scheduler in the kube-system namespace with kubectl logs and kubectl describe. section 8.2
  • Inspect scheduler manifests under /etc/kubernetes/manifests when a control-plane component failure is suspected. section 8.2

Scaling exposes a scheduler failure

After scaling the prod-app Deployment from one to three replicas, the original pod remains Running while the two new pods remain Pending. This contrast points to scheduling failure rather than an nginx container problem. section 8.2

root@kind-control-plane:/# curl 
https:/ /raw.githubusercontent.com/chadmcrowell/acing-the-cka-
exam/main/ch_08/kube-scheduler.yaml --silent --output 
/etc/kubernetes/manifests/kube-scheduler.yaml
root@kind-control-plane:/# kubectl scale deploy prod-app --replicas 3
deployment.apps/prod-app scaled
root@kind-control-plane:/# kubectl get po
NAME                        READY   STATUS    RESTARTS   AGE
prod-app-85c9dd4f9d-9clfl   0/1     Pending   0          7s
prod-app-85c9dd4f9d-l7fmj   1/1     Running   0          4m21s
prod-app-85c9dd4f9d-mbdk7   0/1     Pending   0          7s

Inspect representative kubectl output showing one Running pod and two Pending replicas after scaling. section 8.2

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Explains scheduler-focused diagnosis with kubectl logs, kubectl describe, events, and static-pod manifests.
Examples
Uses an nginx Deployment whose original replica runs while two replicas remain Pending after scaling.
What it assumes
Assumes familiarity with Kubernetes pods, Deployments, namespaces, nodes, and basic kubectl commands.
What you can do after
Diagnose unscheduled pods with kubectl describe, kubectl logs, pod events, and control-plane manifest inspection.
How it connects
Connects pending state to pods, nodes, the scheduler, control plane, Deployments, and desired state.

Also explained in

Compare how 3 books explain pending state →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Certified Kubernetes Administrator Exam, Second Edition. The section links point to the parts of the book it draws on.