virtualMachineelasticsearch

Add nodes to an Elasticsearch cluster

To add additional nodes to a cluster, update the following configuration parameters in the node’s /opt/bitnami/elasticsearch/conf/elasticsearch.yml file:

  • cluster.name: All the nodes should have the same cluster name to work properly.

  • node.name: The name of each node should be unique. Set meaningful names to your nodes according to their functions so it will be easier to identify them.

  • network.publish_host: The host name that a node publishes to other nodes for communication. This host should be accessible at least from the master node.

  • discovery.zen.ping.unicast.hosts: When nodes are in the same sub-network, they will auto-configure themselves into a cluster. In other cases, specify a list with your nodes in this parameter.

Two nodes created using the same OVA will have the same GUID. In order to avoid conflicts, remove the /opt/bitnami/elasticsearch/data/nodes/0/_state directory and restart Elasticsearch to regenerate a new unique GUID:

$ sudo /opt/bitnami/ctlscript.sh restart elasticsearch

Refer to the Elasticsearch official documentation for more information.

Last modification May 31, 2021