# How to add node in Elastic search cluster

**URL:** <https://discuss.elastic.co/t/how-to-add-node-in-elastic-search-cluster/213311>\
**Category:** Elasticsearch\
**Created:** [December 30, 2019, 6:31am UTC](https://discuss.elastic.co/t/how-to-add-node-in-elastic-search-cluster/213311 "2019-12-30T06:31:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krushnakantB](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@krushnakantB](https://discuss.elastic.co/u/krushnakantB)\
**Post date:** [December 30, 2019, 6:31am UTC](https://discuss.elastic.co/t/how-to-add-node-in-elastic-search-cluster/213311/1 "2019-12-30T06:31:22Z")

</div>

Hi All,

I am using Elasticsearch 7.2.0 as a stand-alone machine. Now I have a requirement to make it as a cluster. How could I perform the same? To do the same I've perform below steps, but It doesn't work for me.

Step1:

node1 configuration:-

cluster.name: "test\_cluster"  
node.name: node1  
network.host: node1  
discovery.seed\_hosts: ["node1","node2"]  
cluster.initial\_master\_nodes: ["node1", "node2"]  
gateway.recover\_after\_nodes: 2

node2 configuration:

cluster.name: "test\_cluster"  
node.name: node2  
network.host: node2  
discovery.seed\_hosts: ["node1","node2"]  
cluster.initial\_master\_nodes: ["node1", "node2"]  
gateway.recover\_after\_nodes: 2

In these steps after cluster node up, but it is working as a single node only, not like a cluster

Step 2:  
In the above steps, I have also tried below settings

cluster.initial\_master\_nodes: ["node1"]

in both node1 and node2, still, it is not working.

Note: node1 has data and node2 is a fresh machine.

Please help me to resolve this issue.

---

<div class="post-metadata">

**Author:** ![krushnakantB](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@krushnakantB](https://discuss.elastic.co/u/krushnakantB)\
**Post date:** [December 30, 2019, 9:46am UTC](https://discuss.elastic.co/t/how-to-add-node-in-elastic-search-cluster/213311/2 "2019-12-30T09:46:25Z")

</div>

Hi All,

It is solved...

I have added 2 more configuration parameter.

node.master: true  
node.data: true

after configuration, I have rename old data folder and restart the service.  
so new data folder generated. In this new folder I've just copied "indices" directory and change permission to elasticsearch:elasticsearch and then again restart the elasticsearch service.

Now cluster is up with 2 nodes and it is working ok.

---

<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:** [January 27, 2020, 9:46am UTC](https://discuss.elastic.co/t/how-to-add-node-in-elastic-search-cluster/213311/3 "2020-01-27T09:46:28Z")

</div>

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