Pages

Topics

Tools

↑↓navigate↵openescclose
All guides

Kubernetes: pod has unbound immediate PersistentVolumeClaims

The scheduler waits on an unbound claim: no provisioner, wrong access mode, mismatched static PV, or a topology-bound volume with Immediate binding.

~5 min readKubernetes
#Kubernetes#Storage#PVC#Troubleshooting
A Kubernetes pod crate blocked by an unbound cyan volume slot, an amber storage class card beside it

Introduction & Quick Summary

text
Events: Warning FailedScheduling 2m default-scheduler 0/3 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.

The scheduler will not place a pod whose PersistentVolumeClaim is still unbound and uses immediate binding. The volume is the blocker, not the nodes: while the PVC is Pending, no node can satisfy the pod, so capacity, taints and affinity are all red herrings in this message.

Read the PVC's own events first; they name the real cause:

bash
kubectl describe pvc data-postgres-0 -n db kubectl get pvc -n db kubectl get storageclass

The five causes that cover most clusters:

  • No provisioner — the StorageClass does not exist, its CSI driver is not installed, or there is no default StorageClass at all.
  • Access mode mismatch — ReadWriteMany requested from a driver that only offers ReadWriteOnce (EBS, local-path, most block storage).
  • Static PV mismatch — capacity, accessModes, volumeMode or selector labels differ between the PV and the claim.
  • Wrong name or namespace — the PVC is created somewhere else, or a claimName typo.
  • Topology-bound volume — a local or zonal volume with Immediate binding cannot bind before a node is chosen.
PVC stateMeaningNext command
Pending, no eventsScheduler/provisioner not watchingkubectl get sc, check CSI pods
Pending, "no volume plugin matched"Missing StorageClasskubectl get sc
Pending, "cannot bind to requested volume"Static PV attributes differkubectl describe pv
Pending, "waiting for first consumer"WaitForFirstConsumerExpected until a pod uses it
LostBound PV disappearedInspect PV, restart controller
Terminating foreverPod still mounts it, or finalizerDelete the pod first

Core Mechanics, Signatures & Reproducible Setup

A PVC is a request. A PV is the supply. Binding happens either dynamically (a provisioner creates a PV for the claim) or statically (the control plane matches an existing PV). volumeBindingMode on the StorageClass decides when binding is attempted:

  • Immediate — bind as soon as the PVC exists, with no knowledge of where the pod will run.
  • WaitForFirstConsumer — bind only after a pod using the claim is scheduled, so node topology can guide provisioning.

The message pod has unbound immediate PersistentVolumeClaims is produced by the scheduler for the first mode. The scheduler's VolumeBinding plugin requires the claim to be bound before it scores nodes, so a Pending immediate claim blocks the pod indefinitely. With WaitForFirstConsumer you see waiting for first consumer to be created before binding instead, which is normal.

A minimal reproduction with the wrong access mode:

apiVersion: v1 kind: PersistentVolumeClaim metadata: name: shared-uploads namespace: web spec: accessModes: ["ReadWriteMany"] resources: requests: storage: 5Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: uploader namespace: web spec: replicas: 3 selector: matchLabels: { app: uploader } template: metadata: labels: { app: uploader } spec: containers: - name: uploader image: ghcr.io/acme/uploader:1.4 volumeMounts: - name: shared mountPath: /data volumes: - name: shared persistentVolumeClaim: claimName: shared-uploads
bash
kubectl describe pvc shared-uploads -n web # Events: no persistent volumes available for this claim and no storage class is set # (or) requested access mode RWX is not supported by the provisioner kubectl get pods -n web # 0/3 nodes are available: pod has unbound immediate PersistentVolumeClaims

The corrected claim depends on the storage that actually exists:

spec: accessModes: ["ReadWriteOnce"] # block storage: one node at a time storageClassName: gp3

Three replicas sharing one RWO volume will not schedule on three nodes either; that requires a shared filesystem class (EFS, NFS, CephFS, Filestore) or object storage.

Key Comparison Table

Access modeSemanticsTypical drivers
ReadWriteOnceOne node, many pods on itEBS, GCE PD, local-path, most CSI block
ReadOnlyManyMany nodes, read-onlySame block volumes, snapshotted
ReadWriteManyMany nodes, read-writeNFS, EFS, CephFS, Longhorn RWX
ReadWriteOncePodOne pod onlyCSI drivers with --enable-rwx-pod support
Binding modeBinds whenGood forFailure signature
ImmediatePVC createdNetwork storage, no topologyThis error when pending
WaitForFirstConsumerPod scheduledLocal disks, zonal diskswaiting for first consumer
ProvisioningRequiresDebug command
DynamicStorageClass + CSI controllerkubectl -n kube-system get pods and grep for csi
StaticPre-created PV with matching speckubectl get pv --show-labels
Default classis-default-class annotationkubectl get sc -o wide

Practical Edge Cases, Error Fixes & Deep Dive Code Examples

Case 1: Clusters with no default StorageClass

A PVC without storageClassName uses the default class. Bare metal and self-managed clusters often have none, so the claim stays Pending with no events.

bash
kubectl get sc # NAME PROVISIONER RECLAIMPOLICY # local-path (default) rancher.io/local-path Delete

If the list is empty, install a provisioner or create the class explicitly and mark it default:

apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: local-path annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: rancher.io/local-path volumeBindingMode: WaitForFirstConsumer

"" as storageClassName means "no dynamic provisioning", which is a valid way to force static binding and a common accidental cause of Pending claims copied from another cluster.

Case 2: ReadWriteMany on block storage

EBS, GCE PD and most CSI block drivers implement ReadWriteOnce only. The PVC stays Pending and the pod never schedules. Either relax the claim or move the data to a shared filesystem:

volumes: - name: shared persistentVolumeClaim: claimName: shared-uploads # now RWO

For genuinely shared writes, use the platform's file service and its CSI driver (AWS EFS efs.csi.aws.com, GCP Filestore, Azure Files with ReadWriteMany).

Case 3: A static PV that almost matches

bash
kubectl describe pvc data -n db # Events: cannot bind to requested volume "pv-data": requested PV is too small

Static binding requires every field to match: capacity greater than or equal to the request, accessModes that include the requested one, identical volumeMode, and any selector labels. Inspect both objects side by side:

bash
kubectl get pv pv-data -o yaml | grep -A4 -E 'capacity|accessModes|volumeMode|claimRef' kubectl get pvc data -n db -o yaml | grep -A4 -E 'resources|accessModes|volumeMode|selector'

A stale claimRef from a previous claim keeps the PV in Released and unbindable; remove it only after confirming the old claim is gone:

bash
kubectl patch pv pv-data --type json \ -p '[{"op":"remove","path":"/spec/claimRef"}]'

Case 4: The claim is in another namespace

volumes: - name: data persistentVolumeClaim: claimName: postgres-data

claimName resolves in the pod's namespace. With StatefulSets the claim is usually <volumeClaimTemplate name>-<statefulset>-<ordinal>, so data-postgres-0 is correct and data is not.

Case 5: Local volumes need WaitForFirstConsumer

Local PVs and topology-constrained zonal disks reserve capacity on one node. With Immediate binding the claim is expected to bind before a node is known, which the provisioner cannot do.

apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: local-ssd provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer

Case 6: A PVC stuck Terminating

bash
kubectl get pvc -n db # data-postgres-0 Bound ... 12d Terminating

The claim is protected by kubernetes.io/pvc-protection while any pod still references it, including a completed or crashing pod. Find the consumer, delete it, and let the claim finish:

bash
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}{"\t"}{.spec.volumes[*].persistentVolumeClaim.claimName}{"\n"}{end}' | grep data-postgres-0

Common Compilation/Runtime Mistakes & Version Gotchas

  • Reading the pod event as a capacity problem. 0/3 nodes are available is the scheduler's summary; the cause line above it names the claim.
  • Deleting and recreating the pod. It will schedule again into the same Pending claim. Fix the claim or the class.
  • Assuming WaitForFirstConsumer is broken. A Pending claim with "waiting for first consumer" but no pod is healthy.
  • Default class changed later. A PVC that omitted storageClassName keeps the class resolved at creation; adding a default class does not retrofit existing claims.
  • Capacity in decimal vs binary units. 1G is smaller than 1Gi; a PV of 1G does not satisfy a 1Gi request.
  • volumeMode: Block claims. A block claim cannot be mounted as a filesystem; the pod fails later with a mount error even after it schedules.
  • Cloud zones. A zonal disk in us-east-1a with Immediate binding can bind on the wrong zone and then never schedule; use WaitForFirstConsumer.

Validate edited manifests before applying them with the YAML validator, and compare a working claim with a broken one using the diff tool — a one-line storageClassName or access-mode difference is easy to miss by eye.

Primary references: Persistent Volumes defines binding modes, phases and access modes, and Storage Classes documents volumeBindingMode and default-class annotation.

Official references

primary documentation

The Kubernetes documentation that defines the behaviour this guide explains.

Try matching browser tools

All tools

Small utilities that fit Kubernetes work — they run entirely in this browser tab, so nothing you paste leaves your device.

All Kubernetes guides

More in Kubernetes

All Kubernetes guides

The guides filed next to this one in Kubernetes, in library order.