Here is step by step guideline to add new node in existing elasticsearch cluster.
1) Elasticsearch Installation:
Install elasticsearch in new node. Elasticsearch version should be same as existing cluster nodes. If you are not aware then you may refer my these guideline
# Must be existing cluster name
cluster.name: techieroop
– Configure node name and type of the node
node.name: newnode
# If add node only as a data node. If you want to add node as master then keep this value "true"
node.master: false
node.data: true
– Configure number of shard and replicas
# Shard and replica value should be same as existing node configuration.
index.number_of_shards: 5
index.number_of_replicas: 1
– Discovery settings
This is the most important configuration. Write your master node ip or host name(in my example it is 127.0.0.2) . So that your new node can join to your master node.
# 2. Configure an initial list of master nodes in the cluster
# to perform discovery when new nodes (master or data) are started:
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2:port"]
discovery.zen.ping.unicast.hosts: ['127.0.0.2']
3) Restart the Elasticsearch node.
These are the important config changes we should do while installation Elasticsearch. After the successfully installation you can check new node through Cluster API.
How to add new node in elasticsearch cluster?
Here is step by step guideline to add new node in existing elasticsearch cluster.1) Elasticsearch Installation:Install elasticsearch in new node. Elasticsearch version should be same as existing cluster nodes. If you are not aware then you may refer my these guidelinehttp://techieroop.com/install-elasticsearch-5-on-centos-rhel/2) Config changes:update...
<h2>How to add new node in elasticsearch cluster?</h2>
Here is step by step guideline to add new node in existing elasticsearch cluster.<strong>1) Elasticsearch Installation:</strong>Install elasticsearch in new node. Elasticsearch version should be same as existing cluster nodes. If you are not aware then you may refer my these guidelinehttp://techieroop.com/install-elasticsearch-5-on-centos-rhel/<strong>2) Config changes:</strong>update your <strong>elasticsearch.yml</strong> in these section.<strong>- Change Cluster Name</strong>
<pre># Must be existing cluster name
cluster.name: techieroop</pre>
<strong>- Configure node name and type of the node</strong>
<pre>node.name: newnode
# If add node only as a data node. If you want to add node as master then keep this value "true"
node.master: false
node.data: true</pre>
<strong>- Configure number of shard and replicas</strong>
<pre># Shard and replica value should be same as existing node configuration.
index.number_of_shards: 5
index.number_of_replicas: 1</pre>
<strong>- Discovery settings</strong>This is the most important configuration. Write your master node ip or host name(in my example it is 127.0.0.2) . So that your new node can join to your master node.
<pre># 2. Configure an initial list of master nodes in the cluster
# to perform discovery when new nodes (master or data) are started:
#
#discovery.zen.ping.unicast.hosts: ["host1", "host2:port"]
discovery.zen.ping.unicast.hosts: ['127.0.0.2']</pre>
<strong>3) Restart the Elasticsearch node.</strong>These are the important config changes we should do while installation Elasticsearch. After the successfully installation you can check new node through <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html" target="_blank">Cluster API</a>.
<pre class="programlisting prettyprint lang-js prettyprinted"><span class="pln">curl </span><span class="pun">-</span><span class="pln">XGET </span><span class="str">'http://localhost:9200/_nodes'</span></pre>
That's it.
Roopendrahttps://plus.google.com/+TechieroopendraRoopendraVishwakarmaroopendramca@gmail.comAdministratorI'm Roopendra Vishwakarma, a DevOps Engineer and Blogger from India. I have experience in DevOps, Web Development and various Open Source Technology. I mostly write about latest technology, getting started tutorial and tricks and tips.TechieRoop
I'm Roopendra Vishwakarma, a DevOps Engineer and Blogger from India. I have experience in DevOps, Web Development and various Open Source Technology. I mostly write about latest technology, getting started tutorial and tricks and tips.