elasticsearch-operator
elasticsearch-operator copied to clipboard
Process for changing StorageClass without loosing data
Is there a known path to change the StorageClass without loosing the data? For instance, say we discover our workload needs more IOPS and we want to switch to a higher throughput data store, can we do so without loosing our data?
Perhaps this is outside the scope of what can be done with an abstract storage class, but wanted to ask just in case. Thanks!
The operator currently doesn't support updates in StateFulSet. You can do it manually changing node by node, the steps for increasing disk size on the node es-data-es-data-logging-cluster-eu-west-1a-0 will be something like this:
- Scale operator to 0 replicas
- Scale statefulset
es-data-logging-cluster-eu-west-1ato 0 replica - Dump pvc
es-data-es-data-logging-cluster-eu-west-1a-0to yaml - Delete pvc
es-data-es-data-logging-cluster-eu-west-1a-0 - Recreated pvc with the desired storage size using the dumped file
- Scale statefulset
es-data-logging-cluster-eu-west-1ato 1 replica - Wait until Elasticsearch sync all shards
- Scale operator to 1 replicas
Do it again for all other data nodes!!