Setting up ES multi-node on multiple hosts

Hi all,

When creating an Elasticsearch cluster using Docker with multiple nodes, where each one runs on its own host, a problem arises when forming the cluster when the containers are raised, because it cannot be formed correctly due to not being able to perform the discovery between the nodes.

In the case of using a Host or Bridge type network, it is generated because the values of the Discovery.seed_hosts and cluster.initial_master_nodes properties do not match those of the containers.

Could you suggest a way to solve this problem?

Check this answer on a similar question.

Basically you need to have the network.publish_host with the IP address of your docker host, and also use network.bind_host as 0.0.0.0.

Something like this in each compose:

- network.bind_host=0.0.0.0
- network.publish_host=DOCKER-HOST-IP

The documentation for these settings are here.

Thank you very much for the help :slight_smile: