Back to all scenarios
Scenario #357
Storage
Kubernetes v1.25

ReplicaSet Using PVCs Fails Due to VolumeClaimTemplate Misuse

Developer tried using volumeClaimTemplates in a ReplicaSet manifest, which isn’t supported.

Find this helpful?
What Happened

Deployment applied, but pods failed to create PVCs.

Diagnosis Steps
  • 1Controller logs: volumeClaimTemplates is not supported in ReplicaSet.
  • 2No PVCs appeared in kubectl get pvc.
Root Cause

volumeClaimTemplates is only supported in StatefulSet.

Fix/Workaround
• Refactored ReplicaSet to StatefulSet.
Lessons Learned

Not all workload types support dynamic PVCs.

How to Avoid
  • 1Use workload reference charts during manifest authoring.
  • 2Validate manifests with policy engines like OPA.