A StatefulSet update to increase `volumeClaimTemplates` storage fails with `Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden`.
AdvancedTroubleshootingStorage and volumes
Answer
Likely causes → volumeClaimTemplates is immutable on an existing StatefulSet.
Diagnose →
kubectl get pvc -l app=db
Fix → Resize each PVC directly, then recreate the StatefulSet object without deleting its Pods so the template matches:
for i in 0 1 2; do kubectl patch pvc data-db-$i -p '{"spec":{"resources":{"requests":{"storage":"200Gi"}}}}'; done
kubectl delete sts db --cascade=orphan
kubectl apply -f db-statefulset.yaml # with the new size in volumeClaimTemplates
Prevent → Document this procedure; Helm upgrades that change the template will fail the same way.
More on Storage and volumes
A PVC is `Pending` with `no persistent volumes available for this claim and no storage class is set`.BeginnerA PVC sits `Pending` with event `waiting for first consumer to be created before binding`. Is something broken?BeginnerA PVC is stuck with `waiting for a volume to be created, either by external provisioner "ebs.csi.aws.com" or manually created by system administrator`.IntermediateA Pod is stuck `ContainerCreating` with `Multi-Attach error for volume "pvc-3f1c..." Volume is already exclusively attached to one node and can't be attached to another`.IntermediateA Deployment with one replica and an RWO PVC gets `Multi-Attach error` on every rollout.BeginnerVolume attach fails with `AttachVolume.Attach failed for volume "pvc-..." : rpc error: code = Internal desc = Could not attach volume ... UnauthorizedOperation: You are not authorized to perform this operation`.Intermediate