Back to all scenarios
Scenario #341
Storage
Kubernetes v1.25, AWS EBS, StatefulSet with anti-affinity

Cross-Zone Volume Binding Fails with StatefulSet

Pods in a StatefulSet failed to start due to volume binding constraints when spread across zones.

Find this helpful?
What Happened

Each pod had a PVC, but volumes couldn’t be bound because the preferred zones didn't match pod scheduling constraints.

Diagnosis Steps
  • 1Pod events: failed to provision volume with StorageClass "gp2" due to zone mismatch.
  • 2kubectl describe pvc showed Pending.
  • 3StorageClass had allowedTopologies defined, conflicting with affinity rules.
Root Cause

StatefulSet pods with zone anti-affinity clashed with single-zone EBS volume provisioning.

Fix/Workaround
• Updated StorageClass to allow all zones.
• Aligned affinity rules with allowed topologies.
Lessons Learned

StatefulSets and volume topology must be explicitly aligned.

How to Avoid
  • 1Use multi-zone-aware volume plugins like EFS or FSx when spreading pods.