ElasticSearch add more nodes to cluster

i have Elasticsearch cluster which contains 3 nodes

- node-1 (master-eligible and data node)
- node-2 (master-eligible and data node) 
- node-3 (data node)

and in the elasticsearch.yml config i have following line


discovery.seed_hosts: ["node-1", "node-2", "node-3"] cluster.initial_master_nodes: ["node-1", "node-1"]

but i want to add 2 nodes in this cluster

- node-4 (will be data only node)
- node-5 (will be only master node)

so should i change the cluster.initial.master_nodes parameter and add the node-5, or not? in docs i see You should not use this setting when restarting a cluster or adding a new node to an existing cluster. so this setting should be untouched? and in config on new nodes i should leave this parameter as on "old nodes?"

I believe cluster.initial.master_nodes is only used the first time the cluster is formed and can be removed afterwards.

Yes that's correct, you should remove cluster.initial_master_nodes from the config file on all nodes.

You should also only have master-eligible nodes in discovery.seed_hosts, so should remove node-3.

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