Interview Prep/Kubernetes/Scheduling and Pending Pods

Pending with `0/3 nodes are available: 3 node(s) were unschedulable.`

BeginnerTroubleshootingScheduling and Pending Pods
Answer

Likely causes → All nodes are cordoned (spec.unschedulable: true), commonly left behind after a maintenance or a failed upgrade script.

Diagnose →

kubectl get nodes      # STATUS shows Ready,SchedulingDisabled

Fix →

kubectl uncordon ip-10-0-1-5.ec2.internal

If the node was cordoned on purpose (being replaced), add capacity instead.

Prevent → Maintenance scripts uncordon in a trap/finally block; alert when a node stays cordoned for more than an hour.

All Kubernetes questions Roadmap: Kubernetes core

More on Scheduling and Pending Pods