Changing the cluster name

Elasticsearch version: 5.4.3

I have a single node elasticsearch server and already have few millions of documents indexed. I want to add another node and want to have it as two nodes cluster. While doing so I want to change the cluster name. Let me know is there any implication of changing the cluster name and the precautions needs to be taken.

Yes you can change the cluster name.

I just tested locally that running bin/elasticsearch -Ecluster.name=foo still works and you can still have access to your data.

I'd do this in two steps though:

  1. Update the cluster name, restart node1
  2. Check
  3. Start a new node using that cluster name as well.
1 Like

Great. Thanks David for your quick reply.

Now I have another cluster where I have to change the cluster name. But it has more nodes - Master, Hot and warm nodes, Coordinating nodes including Kibana. So what should be the sequence in which the nodes needs to be restarted after the change in cluster name.

If you want to change the cluster name, the best thing to do is a full cluster restart.

1 Like

Sure. Thanks.

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