简体   繁体   中英

Elasticsearch in Docker container, cluster discovery in AWS

I am trying to set up a two-node Elasticsearch cluster based of 2 Docker containers : the Elasticsearch containers are running in two different EC2 instances.

One way of doing this is by configuring the AWS plugin and then mapping the host address to the Docker container with : --net=host

But, when trying to work with AWS ECS this is no longer possible, the --net argument is not supported "yet".

Is there any other way to make Elasticsearch nodes see each other through Docker containers in different instances ?

Please help :)

Thank you Adrian, your suggestion helped me finding the missing piece.

This is what I was looking for. Besides using the AWS pulign gor Elasticsearch, I had to specify the publish host in elasticsearch.yml file :

network.publish_host: _ec2:privateIp_

Obviously this helps elasticsearch, even inside a docker container, use the IP address of the host EC2 instance.

One can find out more info here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM