Kubernetes FailedScheduling: Taints, Affinity, and Resources
A pod sits Pending and the scheduler quietly logs why it rejected every node. Learn to read that one line and fix the real cause instead of guessing.
Key takeaways
- FailedScheduling means no node passed every scheduler check, and the event message lists why each node failed.
- Run kubectl describe pod, read the tally, then fix the named cause: lower inflated requests, add a toleration, correct a node selector typo, relax required anti-affinity, or use a WaitForFirstConsumer StorageClass.
- Scale nodes only for genuine capacity shortfalls.
On this page
Fix FailedScheduling by reading the event's tally with kubectl describe pod: it says how many nodes failed for each reason. Insufficient cpu means lower requests or add capacity; an untolerated taint needs a toleration; an affinity mismatch is usually a label typo; a volume conflict needs a WaitForFirstConsumer StorageClass. Scale nodes only for real shortfalls.
Verified against
Kubernetes v1.37 (v1.37.2, released October 2026), kubectl v1.37, against the kubernetes.io taints and tolerations, assigning pods to nodes, topology spread constraints and storage classes docs. Checked October 2026.
The event means the scheduler did its job and came up empty. It ran every node through its filters, and not a single node passed all of them. The pod stays Pending. Nothing is broken; the cluster is telling you, in one dense line, that what you asked for and what you have don't line up.
The mistake we see most is scaling the node group the moment a pod sits Pending. Sometimes that's right. Often it's not, and you've just paid for capacity that won't fix a taint or an affinity typo. Read the event first.
Read the event, not the vibes
$ kubectl describe pod api-7f9c8-2xk4p
Scroll to the bottom:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 47s default-scheduler 0/5 nodes are available: 3 Insufficient cpu, 2 node(s) had untolerated taint {dedicated: gpu}. preemption: 0/5 nodes are available: 3 No preemption victims found, 2 Preemption is not helpful for scheduling.
That message is a manifest. 0/5 nodes are available is the headline. The comma-separated list is a tally of why each node failed, and the counts add up to your node total. Here: three nodes had no CPU room, two carried a taint the pod didn't tolerate. Five nodes, zero fits.
Learn to parse each phrase. Below are the ones you'll actually meet.
Insufficient cpu / Insufficient memory
0/5 nodes are available: 5 Insufficient cpu.
The pod's total CPU requests (not limits, requests) exceed what's free on every node. Free means allocatable minus what's already reserved by other pods, whether or not they're using it. A node can sit at 10% real utilization and still reject a pod because everything on it over-requested.
Two fixes. If the request is honest, add capacity. If it's inflated (and a lot of resources.requests are copy-pasted guesses), lower it:
# deployment.yaml (container spec)
resources:
requests:
cpu: "250m" # was "2" because nobody measured
memory: "256Mi"
Check what's actually free before you decide:
$ kubectl describe node ip-10-0-1-14 | grep -A5 "Allocated resources"
This is the same territory as a pod Pending that never gets placed: resource math is the most common root cause.
Untolerated taint
2 node(s) had untolerated taint {dedicated: gpu: NoSchedule}.
Someone tainted those nodes to keep general workloads off them. Your pod isn't allowed there unless it carries a matching toleration. If this pod should run there:
# pod spec
tolerations:
- key: "dedicated"
operator: "Equal"
value: "gpu"
effect: "NoSchedule"
If it shouldn't, the event is doing its job: those nodes are reserved and the pod belongs elsewhere. A toleration only grants permission; it doesn't pull the pod onto the node. That's affinity's job.
Node affinity / nodeSelector didn't match
0/5 nodes are available: 5 node(s) didn't match Pod's node affinity/selector.
You asked for nodes with a label none of them carry. Ninety percent of the time it's a typo or a zone that doesn't exist. Print the labels:
$ kubectl get nodes -L topology.kubernetes.io/zone,node.kubernetes.io/instance-type
Then reconcile your selector with reality:
# pod spec
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node.kubernetes.io/instance-type
operator: In
values: ["m6i.large", "m6i.xlarge"]
Use required when the pod genuinely cannot run elsewhere. Reach for preferredDuringScheduling when it's a nudge, not a law. required plus a label typo is how you strand a pod forever.
Pod affinity / anti-affinity
0/5 nodes are available: 5 node(s) didn't satisfy existing pods anti-affinity rules.
Common with a StatefulSet that spreads replicas one-per-node using requiredDuringScheduling anti-affinity. Ask for four replicas on a three-node cluster and the fourth has nowhere legal to sit. Either add a node or loosen the rule to preferred:
# statefulset.yaml (pod template spec)
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: cache
topologyKey: kubernetes.io/hostname
preferred still spreads pods when it can, but it won't wedge the deploy when it can't.
Volume zone conflict
0/3 nodes are available: 3 node(s) had volume node affinity conflict.
This one trips everybody. An EBS volume lives in one availability zone. A pod bound to that PVC can only schedule onto nodes in the same zone. If your only free capacity is in us-east-1b and the volume is in us-east-1a, no dice. Check the PV:
$ kubectl get pv <name> -o jsonpath='{.spec.nodeAffinity}'
The durable fix is a WaitForFirstConsumer StorageClass so the volume is provisioned after the scheduler picks a zone, not before:
# storageclass.yaml
volumeBindingMode: WaitForFirstConsumer
If the claim itself never binds, that is a different event; fixing a PVC stuck in Pending covers the provisioner side.
Unschedulable / cordoned nodes
0/5 nodes are available: 2 node(s) were unschedulable, 3 Insufficient cpu.
unschedulable means someone ran kubectl cordon (or a drain in progress) and those nodes won't accept new pods. Sometimes that's a forgotten cordon from last week's maintenance. Confirm and uncordon:
$ kubectl get nodes | grep SchedulingDisabled
$ kubectl uncordon ip-10-0-1-22
Topology spread constraints
0/6 nodes are available: 3 node(s) didn't match pod topology spread constraints.
You've asked the scheduler to balance replicas across zones or nodes within a maxSkew, and honoring it would break the limit. With whenUnsatisfiable: DoNotSchedule, the pod waits. If even spread matters less than getting the pod running, switch to ScheduleAnyway:
# deployment.yaml (pod template spec)
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: api
Questions people ask
What does "0/3 nodes are available" mean in Kubernetes?
It means the scheduler checked all three nodes and none passed every filter for this pod, so the pod stays Pending. The rest of the message lists a reason and a count for each failure, such as 2 Insufficient cpu or 1 node(s) had untolerated taint. The counts cover every node, so the largest group usually names the fix. Read it with kubectl describe pod <name>.
Does a toleration force a pod onto a tainted node?
No. A toleration only permits scheduling onto a node with a matching taint; the Kubernetes docs say tolerations allow scheduling but don't guarantee it. To steer a pod onto dedicated nodes, combine the toleration with node affinity or a nodeSelector that matches a label on those nodes. The taint keeps other workloads off, and the affinity pulls yours on.
Will the cluster autoscaler fix FailedScheduling?
Only when adding a node would actually let the pod fit. The autoscaler simulates scheduling on a new node from your node groups, so it helps with Insufficient cpu or Insufficient memory. It cannot fix a label typo, a missing toleration, a volume pinned to another zone, or required anti-affinity that no new node satisfies. Fix those in the manifest instead.
The call we'd make
Read the tally before you touch anything. The count after each phrase tells you how many nodes failed for that reason, and that alone usually points at the fix: taints and affinity are almost always a manifest problem you solve in the YAML, while Insufficient cpu split evenly across every node is the one case where scaling is honest. Fix inflated requests before you add nodes: measured requests fix more Pending pods than a bigger cluster ever will. And keep required rules for things that are genuinely required; everything softer belongs in preferred, where a bad label can't strand a workload. For the wider map of failure modes, our Kubernetes troubleshooting guide connects the events that tend to show up together.
Sources
Cite this article
Kiril Urbonas (2026). Kubernetes FailedScheduling: Taints, Affinity, and Resources. DevOpsNess. Updated 2026-10-31. https://www.devopsness.com/blog/fix-failedscheduling
[Kubernetes FailedScheduling: Taints, Affinity, and Resources](https://www.devopsness.com/blog/fix-failedscheduling) (Kiril Urbonas, DevOpsNess, updated 2026-10-31)
More from DevOps
Explore more articles in this category
kaniko CVE-2026-105769: Lookalike ACR Hosts Get Your Azure Token. Rebuild on v1.25.20
A FROM line pointing at a host like x.azurecr.io.attacker.com is enough to make kaniko hand the build's Entra ID token to that host. Which kaniko forks and images are affected, how to find Azure identities in your build pods, and what to rotate.
Sign Container Images With Cosign: Keyless GitHub Actions Workflow, SBOM and In-Cluster Checks
One workflow that builds, signs keylessly with GitHub OIDC, attaches an SBOM and SLSA provenance, plus the Kyverno policy that refuses anything unsigned. Copy it, change three names, ship it.
GitLab CVE-2026-110264: A Second CVSS 10 RCE in Nine Days. Patch to 19.5.1
An unauthenticated regex-compiler RCE reaching back to GitLab 7.0, no workaround, and backports on older branches that fix only the critical bug. The exact version per branch and the commands to get there.
You might have missed
Evergreen posts worth revisiting.