Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

elasticsearch on kubernetes - discovery of nodes

We are attempting to run Elasticsearch on top of a kubernetes / flannel / coreos cluster.

As flannel does not support multicast, we cannot use Zen multicast discovery to allow the nodes to find each other, form a cluster and communicate.

Short of hard-coding the IP addresses of all the kubernetes nodes into the ES-config-file, is there another method we can utilise to assist in discovery? Possibly using etcd2 or some other kubernetes-compatible discovery service?

like image 703
DrGecko Avatar asked Dec 08 '22 01:12

DrGecko


1 Answers

Version 6.2.0 is supporting kubernetes auto discovery

update your elasticsearch.yml as following

discovery.zen.ping.unicast.hosts: "kubernetes service name"

like image 146
krish Avatar answered Jan 18 '23 20:01

krish