# Discovery with ECS, Dynamic Initial Master Nodes

**URL:** <https://discuss.elastic.co/t/discovery-with-ecs-dynamic-initial-master-nodes/183149>\
**Category:** Elasticsearch\
**Created:** [May 28, 2019, 4:50pm UTC](https://discuss.elastic.co/t/discovery-with-ecs-dynamic-initial-master-nodes/183149 "2019-05-28T16:50:52Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 28, 2019, 5:58pm UTC](https://discuss.elastic.co/t/discovery-with-ecs-dynamic-initial-master-nodes/183149/10 "2019-05-28T17:58:52Z")

</div>

> [@brhardwick](#):
>
> Would the config look something like this?

Yes, that looks about right (except `discovery.zen.hosts_provider -> discovery.seed_providers`).

Note that you wouldn't set `cluster.initial_master_nodes` at all on any other nodes in this case.

You might also like to call [this API](https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-discovery-adding-removing-nodes.html#modules-discovery-removing-nodes) before shutting the election node down:

```auto
POST /_cluster/voting_config_exclusions/election_node

```

and then this after it's gone:

```auto
DELETE /_cluster/voting_config_exclusions

```

That'll make sure that the cluster is ready to lose this node before it goes away. Otherwise there's a risk that you shut it down too soon leaving the other nodes without a master.

---

_[View the full topic](https://discuss.elastic.co/t/discovery-with-ecs-dynamic-initial-master-nodes/183149)._
