Recreate a cluster with the same cluster_uuid in k8s stetefullset configuration

Hello , i'm able to upgrade eleasticsearch from v 6.6.0 to 7.1.1 using the officially provided docker in a stetefull set in kubernetes without a problem. After applying the cluster.initial_master_nodes with a list of 3 hosts the master is elected and everything works fine. After i redeploy the same version the pods are recreated and they complain about being part of the previous cluster ( referencing the old cluster_uuid ) and that they cannot form a new cluster .
The setup is: 3 pods / nodes acting as masters + 2 data nodes
My questions are the following :

  1. I would like to avoid storing the /data folder from the master nodes ( pods ) on a persistent volume, so is it possible to inject the same cluster_uuid into the configuration when recreating the masters , or maybe i'll need to pass more metadata ?

  2. Since version 7 i can see that there are a lot of changes in cluster formation. Can you share what are the best practices in using the kubernetes environment and keeping stuff agile and stable at the same time ?

Thank you !

It is essential that the master nodes have persistent storage. From the docs:

Master nodes must have access to the data/ directory (just like data nodes) as this is where the cluster state is persisted between node restarts.

2 Likes

Thanks David for your quick reply, i'll change the config and try to keep the data folder.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.