Elastic cluster in Kubernetes using statefulsets ,data lost during cluster restart


We have a Kubernetes statefulset Elastic cluster with 3 master nodes and 2 data nodes.Elastic version being 6.4.2.After a cluster restart none of the old data i.e indices are present and only new data is being displayed even though It is being attached to the same pvc after the restart.It happens each time during cluster restart.Any idea on how to resolve this issue?

(David Turner) #2

This has come up a few times before and in each case the cause was that Elasticsearch wasn't configured to use the correct data path: a persistent volume was being mounted, but Elasticsearch wasn't using it and was putting its data somewhere ephemeral. Make sure that path.data is set correctly and that there is data being written to the persistent volume.


It's fixed now! thanks!