pires / kubernetes-elasticsearch-cluster

Elasticsearch cluster on top of Kubernetes made easy.
Apache License 2.0
1.51k stars 690 forks source link

Why master nodes are not defined as StatefulSet ? #192

Closed Li-Yanzhi closed 6 years ago

Li-Yanzhi commented 6 years ago

I saw data node can be defined as StatefulSet, so when one of data node(POD) fails, then another Pod with same name will be created and to take over the same data volume, so the data and status is consistency.

But master & client node are defined as Deployment(ReplicaSets), if one of nodes fails, then another Pod will be created, however, the new Pod's name is not same as the failed one, and the attached data volume is different too (I cannot confirm).

So my question is how to keep the master nodes' data consistency when some of them failed in such architecture?

pires commented 6 years ago

Master and client nodes do not store data and that's why they don't need data consistency.