Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent data management #436

Open
mabilinab opened this issue Aug 24, 2024 · 1 comment
Open

Persistent data management #436

mabilinab opened this issue Aug 24, 2024 · 1 comment

Comments

@mabilinab
Copy link

Hi there,
I have found very little info on how the operator manages data.
I have used volumeClaimTemplates to dynamically provision storage, however, I'm not quite sure of how the operator manages pvcs:

  • It seems like when you change the volumeClaimTemplate storage, it is not taken into account and the pods keep using the same PVC which is not updated
  • When scaling down the number of nodes, does the operator take care of redistributing data from the exiting data node to other nodes?
  • When you decrease the number of replicas, the operator does not delete the PVC, which creates additional cost for unused provisioned volumes that stay unattached (hetzner volumes). Is this normal?

Does anyone have any tips or info on this? Thank you!

@otrosien
Copy link
Member

otrosien commented Aug 26, 2024

Hello @mabilinab,

the thing is, ES-Operator doesn't actually manage any persistent volumes, it all gets delegated to the underlying StatefulSet. You should check the StatefulSet properties so that the volumeClaim gets removed (I'm not too deep into this).

Resizing is something not every Kubernetes installation supports, but you can find discussions with how-tos, for example here: https://serverfault.com/questions/955293/how-to-increase-disk-size-in-a-stateful-set

ES-Operator defaults to draining the node before termination, which is different from what the ECK does. If I'm not mistaken, ECK assumes persistent volumes and considers a temporary reduced availability of data being fine while the data node is supposed to come back online. When draining, the redistribution of data is delegated to Elasticsearch itself. It tries to keep a balanced shard-per-node ratio, based on a heuristic that can be tweaked, but they don't recommend you to do so: https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html#shards-rebalancing-heuristics

There are other constraints that will cause Elasticsearch not to colocate more shards onto the same node. Amongst them:

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants