Lets say I have 3 replicas, each with persistent disk of 10G.
Then I need to increase the disks to 100G.
Any recommendations what is the best way to increase the storage size ? Example for google cloud.
It seems in GKE is pretty simple, just edit the cr.yaml - increase the volume size, and then for each of the pvc, edit them “kubectl edit pvc thenameofthepvc” and shortly they will be resized.
Hello @Darko ,
yes, your way would work for Google Cloud.
But as long as there are many Container Storage Interfaces (CSIs) with different capabilities, it is hard for us to come up with the solution that would work for all of them.
I wrote a blog post some time ago that should work for any CSI.
It just scales up the cluster with new storage class (or size) and then you can rotate other nodes one by one.
Hello @Sergey_Pronin!
Would it work in a same way for mongodb cluster managed by mongodb-operator with a 3 replicas?
- Change storage class in cr
- Re-create STS keeping pods running
- Scale up yo 5 replicas
- Wait for sync of 2 new replicas
- Rotate old 3 replicas by deletion/resync
- Scale dwon back to 3 replicas