Manage kubernetes StatefulSet
Manage kubernetes StatefulSet
March 23, 2023
Operations
Increase the storage sizes without downtime
We cannot update the resources.storageSize of the StatefulSet to increase the volume sizes. So, we have to follow a few steps to update them.
See this article for more details.
Confirm if the storageclass of persistent volumes has
.allowVolumeExpansion=true
> kubectl get storageclass standard -o yaml | yq .allowVolumeExpansion true ```
Update all PVC to have more storage sizes
Delete the statefulset objects without deleting pods by
kubectl delete statefulset $statefulset_name --cascade=orphan
Recreate the statefulset with the new storage size
Decrease the storage size
Shrinking disk sizes is not supported. official document.
Last updated on