Pvc resize scaleset

From UVOO Tech Wiki
Jump to navigation Jump to search

https://serverfault.com/questions/955293/how-to-increase-disk-size-in-a-stateful-set

helm uninstall

helm install

kubectl get pvc -n

kubectl edit pvc <pvc-name> -n <namespace>
Under the spec section of your, PVC object increase the desired storage size and do the same with all bound PVCs.



Delete the Statefulset and Recreate the Statefulset
Deleting the Statefulset will not cause downtime as PVC will exist after even after deleting the Statefulset object. You will be able to use your stored volume. If you are using helm to deploy the Statefulset then follow the below step to Delete and recreate the Statefulset object.

To delete StatefulSet use this command

kubectl delete statefulset --cascade=orphan <statefulset_name> -n <namespace> 
–cascade=orphan flag will delete Statefulset only but your pod will remain running.

Now edit the helm chart with the updated PVC and use the below command to reinstall the chart to Recreate Statefulset.

helm upgrade <release_name> <chart_name> -n <namespace>
Now you will be able to see the new Statefulset is created with the updated PVC.