Why Preemption Doesn't Help With This Error
You raise the pod's priorityClassName, expecting the scheduler to evict lower-priority pods and make room. Nothing happens. The pod stays Pending, the events still say pod has unbound immediate PersistentVolumeClaims, and no preemption victims are nominated. Preemption resolves resource contention. A storage binding failure is not resource contention, so it's the wrong tool.
The fastest way forward is to stop looking at priority classes and start looking at PV topology and binding constraints.
Confirm It's a Binding Problem, Not Resource Pressure
Run kubectl describe pod <name> and read the event message exactly. The two cases look like this:
0/5 nodes are available: 5 Insufficient cpu.This is a real resource shortage. Preemption is the right tool.0/5 nodes are available: pod has unbound immediate PersistentVolumeClaims.This is a binding failure. Preemption cannot help.
If you see both reasons, you have two separate problems. Fix the storage one first, because it can hide whether the resource shortage still exists.
How the Scheduler Classifies This Failure
Scheduler plugins return one of two statuses when they reject a pod or node:
- Unschedulable: the current cluster state doesn't allow placement, but a change such as evicting a pod might.
- UnschedulableAndUnresolvable: no cluster change at this point in the scheduling cycle will make placement succeed. Preemption skips these cases.
The VolumeBinding plugin reports UnschedulableAndUnresolvable for the storage failures discussed here. Two checks matter:
- Unbound immediate PVCs. A PVC using an
ImmediateStorageClass has no bound PV, and the plugin rejects the pod before node-level evaluation. Freeing CPU or memory doesn't bind the claim. - PV node affinity conflicts. A bound PV's
nodeAffinityexcludes a candidate node. Evicting pods on that node doesn't change the PV's zone or labels.
This is why a PriorityClass has no effect here. Priority decides which pod wins a resource contention. It has no bearing on whether a PVC can bind.
The Most Common Cause: Zone and Node-Affinity Mismatch
On cloud providers, unbound-PVC failures that survive basic StorageClass checks usually come down to topology. Block storage such as EBS, Persistent Disk, and Azure Disk is typically zonal. A volume created in us-east-1a can only attach to nodes in us-east-1a.
The usual sequence:
- A PVC is dynamically provisioned, and the resulting PV gets a
nodeAffinitypinning it to the zone where the disk was created. - Later, capacity in that zone shrinks or disappears. The cluster autoscaler may remove nodes there, or the pod may need to be rescheduled elsewhere.
- The scheduler finds no node that satisfies the PV's
nodeAffinityand reports the failure.
Confirm it:
kubectl get pv <pv-name> -o yaml
Check spec.nodeAffinity.required.nodeSelectorTerms. Then compare those zone labels with the schedulable nodes:
kubectl get nodes -L topology.kubernetes.io/zone
If no schedulable node matches, the PV has nowhere valid to attach. Preemption, priority changes, and cordoning other workloads won't fix this.
This is a close cousin of general scheduling failures where a pod won't land on a node that looks free. If you haven't already, read why a pod won't schedule to a specific free node. The predicate-failure model is nearly identical, just with a different filter plugin failing.
A Common Cause: Immediate Binding Mode
The word "immediate" refers to the volumeBindingMode field on the StorageClass, not to urgency. There are two modes:
Immediate: the PVC is bound or provisioned as soon as it's created, before the scheduler has chosen a node for the pod. The volume may be created in a zone where the pod can't run.WaitForFirstConsumer: binding is delayed until a pod uses the PVC. The provisioner sees the scheduler's node choice and creates the volume in a compatible zone.
Check the mode:
kubectl get storageclass <name> -o jsonpath='{.volumeBindingMode}'
If it returns Immediate and your cluster spans multiple zones with zonal disks, change new StorageClasses to WaitForFirstConsumer. Keep in mind:
- The change applies only to PVCs created after the StorageClass is updated. Existing PVCs and their PVs keep their zone.
- Fixing an existing volume's zone usually means creating a new PVC and migrating the data, or deleting and recreating the PV/PVC.
Static Provisioning: A Different Cause
With pre-created (static) PVs, the failure usually comes from one of these:
- The PV's
claimRefalready points at a different PVC. - The PV's
nodeAffinitywas written by hand and matches no real node label. - The PV's capacity is smaller than the PVC's request. A PVC never binds to a smaller PV.
accessModesorstorageClassNamedon't match.
StatefulSets are a common place to hit this. Each replica from a volumeClaimTemplates entry needs its own matching PV, so one mismatched PV blocks that replica while the others run.
List the PVs:
kubectl get pv -o custom-columns=NAME:.metadata.name,STATUS:.status.phase,CLAIM:.spec.claimRef.name,CAPACITY:.spec.capacity.storage
An Available PV with no claim, next to a Pending PVC, usually points to a label, capacity, access-mode, or class mismatch rather than a zone problem. Compare each field against the PVC.
Verifying the Fix
After correcting the PV's node affinity, the StorageClass, or a capacity or access-mode mismatch, watch the PVC:
kubectl get pvc -w
STATUS should move from Pending to Bound. Once it does, the pod's events stop citing VolumeBinding and the scheduler evaluates CPU and memory. Only then do priority classes and preemption become relevant again, if they are at all.
FAQ
Why don't cordoning nodes or evicting pods help? The failure isn't about free CPU or memory. The VolumeBinding plugin checks whether a PV compatible with the candidate node exists. Emptying a node doesn't move a disk to another zone or change the labels a PV requires.
Can I make the scheduler ignore a PV's nodeAffinity?
Not safely. For zonal block storage, the affinity reflects a real constraint: the disk can't attach outside its zone. The fixes are to provision new volumes with WaitForFirstConsumer, or to use storage that isn't tied to a single zone, such as regional disks where your provider offers them.
How do I tell whether autoscaler scale-down caused this?
Find the zone label on the PV and check whether nodes in that zone were removed around the time the PVC started failing. Note that kubectl get nodes only shows nodes that still exist, so a node removed by the autoscaler won't appear in the list. Check the cluster autoscaler's logs or your cloud provider's instance history for scale-down events. If scale-down is the trigger, keep a minimum node count per zone or use regional storage.