# ElasticSearch add more nodes to cluster

**URL:** <https://discuss.elastic.co/t/elasticsearch-add-more-nodes-to-cluster/233542>\
**Category:** Elasticsearch\
**Created:** [May 20, 2020, 1:21pm UTC](https://discuss.elastic.co/t/elasticsearch-add-more-nodes-to-cluster/233542 "2020-05-20T13:21:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linuks](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@linuks](https://discuss.elastic.co/u/linuks)\
**Post date:** [May 20, 2020, 1:21pm UTC](https://discuss.elastic.co/t/elasticsearch-add-more-nodes-to-cluster/233542/1 "2020-05-20T13:21:36Z")

</div>

i have Elasticsearch cluster which contains 3 nodes

```auto
- 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

```auto

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

```auto
- 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?"

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 23, 2020, 9:38pm UTC](https://discuss.elastic.co/t/elasticsearch-add-more-nodes-to-cluster/233542/2 "2020-05-23T21:38:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 24, 2020, 10:44am UTC](https://discuss.elastic.co/t/elasticsearch-add-more-nodes-to-cluster/233542/3 "2020-05-24T10:44:09Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 21, 2020, 10:44am UTC](https://discuss.elastic.co/t/elasticsearch-add-more-nodes-to-cluster/233542/4 "2020-06-21T10:44:18Z")

</div>

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