jakubhajek/elasticsearch-docker-swarm

Question: elasticserach hostname for kibana in swarm mode

constantx opened this issue · 3 comments

Hi @jakubhajek,

I see in the compose file, the kibana service has this "ELASTICSEARCH_URL=http://data1:9200".

I've been trying to setup a swarm cluster as well, and curious how data1 will be recognized since all the containers in the swarm node has different name?

Hi @constantx

It is a built-in feature in Docker Swarm. Once you create a cluster you can use the name of the service as a recognizable hostname. I added to my configuration a service name called data1

that means that I can point Kibana to connect to this host data1.
It is also true for other services name: master1, master2, master3, data1, data2, data3, and data4.

Hope that helps, let me know.

I thought that's how it works too! Maybe my cluster setup's issue is somewhere else ;) Will recheck.

Thanks @jakubhajek

@constantx Let me know if you need support with Docker support :)