1

How to rename the current cluster in elasticsearch config?

i want to rename the cluster without it going down if possible.

Amogh Banta
  • 11
  • 1
  • 1
  • 5

2 Answers2

6

Make edits in the elasticsearch.yml file. By default the es cluster name is elasticsearch and the cluster.name field in the yml file is commented out. So first uncomment it, then give a name and restart es.

Claus Wilke
  • 16,992
  • 7
  • 53
  • 104
Abhijith Anil
  • 119
  • 1
  • 2
4

If you are having multi nodes cluster means, you can try updating cluster names in config file & directory name (if replicas enabled) one by one nodes; which is similar to rolling upgrade of the Elasticsearch.

if you are using single node cluster means, you can attempt changing the cluster name in config file but restart of cluster will be needed to take effect change.

Pandiyan Cool
  • 6,381
  • 8
  • 51
  • 87
  • 1
    i have an existing ES with clusterName: x, i have updated the name to y in elasticsearch.yml but cannot see indices anymore, could you suggest ? – Lasit Pant Feb 23 '20 at 02:53
  • @LasitPant did you restart your nodes? – Pandiyan Cool Feb 24 '20 at 04:06
  • i did, i didn't change the cluster name on elasticsearch.yml file only, i didn't make the changes (data_directory name) and hence i suspect no data was coming up – Lasit Pant Feb 24 '20 at 09:52