# Elasticsearch on kubernetes

**URL:** <https://discuss.elastic.co/t/elasticsearch-on-kubernetes/244214>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Tags:** docker\
**Created:** [August 7, 2020, 7:32pm UTC](https://discuss.elastic.co/t/elasticsearch-on-kubernetes/244214 "2020-08-07T19:32:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aamir\_A](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aamir_a/32/46023_2.png) [@Aamir\_A](https://discuss.elastic.co/u/Aamir_A)\
**Post date:** [August 7, 2020, 7:32pm UTC](https://discuss.elastic.co/t/elasticsearch-on-kubernetes/244214/1 "2020-08-07T19:32:26Z")

</div>

Hello,

I am trying to understand the master election process on multimaster Elasticsearch cluster on kubernetes. I found one github repo where he demonstrate how to run Elasticsearch on top of Kubernetes. [https://github.com/pires/kubernetes-elasticsearch-cluster](https://github.com/pires/kubernetes-elasticsearch-cluster)

However, I am coming from docker swarm background now we are in process to port our services on Kubernetes.

In Docker Swarm "dnsrr" is the key which tell the Elasticsearch how many master containers/ip running for the services.

But in Kubernetes I don't find such config. Any info would really appreciated, it's not blocker for me I can able to run the ES on K8s but trying to understand internals.

---

<div class="post-metadata">

**Author:** ![nitzang1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nitzang1/32/74807_2.png) [@nitzang1](https://discuss.elastic.co/u/nitzang1)\
**Post date:** [September 7, 2020, 6:35am UTC](https://discuss.elastic.co/t/elasticsearch-on-kubernetes/244214/2 "2020-09-07T06:35:03Z")

</div>

Hi Aamir\_A,

Not sure if it answers your question, but AFAIK, ECK manages the election for you.  
You can see the list of settings that are being managed by ECK here:  
[https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-reserved-settings.html](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-reserved-settings.html)

In addition, you can see in this quickstart example that the deployment spins up 3 master nodes and no need to specify anything:  
[https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-advanced-node-scheduling.html](https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-advanced-node-scheduling.html)

Hope it make sense

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 4, 2022, 8:09am UTC](https://discuss.elastic.co/t/elasticsearch-on-kubernetes/244214/3 "2022-11-04T08:09:16Z")

</div>


