Statefulset expand pvc

From UVOO Tech Wiki
Jump to navigation Jump to search

https://developer.harness.io/docs/self-managed-enterprise-edition/advanced-configurations/increase-pv-size-statefulsets/#:~:text=Identify%20the%20PV%20that%20corresponds,with%20the%20desired%20storage%20size.&text=Verify%20that%20the%20PV%20and,updated%20with%20the%20new%20size.

kubectl patch pvc storage-volume-prometheus-server-0 -p '{"spec":{"resources":{"requests":{"storage":"10G"}}}}'

Wait for a while and check size

Mote

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

kubectl edit pvc influxdb-data-influxdb-0 -n influxdb  #edit size
kubectl delete sts --cascade=orphan influxdb -n influxdb
helm upgrade --install influxdb influxdata/influxdb -f v1/values.yaml --namespace influxdb
kubectl -n influxdb exec -it influxdb-0 -- df -h | grep influx
 kubectl rollout restart sts influxdb -n influxdb

kubectl -n influxdb exec -it influxdb-0 -- df -h | grep influx
kubectl get pvc -A | grep influx
Error: UPGRADE FAILED: cannot patch "influxdb" with kind StatefulSet: StatefulSet.apps "influxdb" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#cascading-delete

Use kubectl delete to delete the StatefulSet. Make sure to supply the --cascade=orphan parameter to the command. This parameter tells Kubernetes to only delete the StatefulSet, and to not delete any of its Pods.

https://mongodb97.rssing.com/chan-17907102/latest.php resizing statefulset

https://github.com/elastic/helm-charts/issues/893

https://github.com/kubernetes/enhancements/pull/3412

https://learn.microsoft.com/en-us/azure/azure-arc/data/resize-persistent-volume-claim

Kubegres looks like it works in azure if you edit pvc size direct.