# On an Elasticsearch cluster, how to have a node not allocate shards on it?

**URL:** <https://discuss.elastic.co/t/on-an-elasticsearch-cluster-how-to-have-a-node-not-allocate-shards-on-it/153004>\
**Category:** Elasticsearch\
**Created:** [October 18, 2018, 1:10pm UTC](https://discuss.elastic.co/t/on-an-elasticsearch-cluster-how-to-have-a-node-not-allocate-shards-on-it/153004 "2018-10-18T13:10:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr01](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dr01/32/8482_2.png) [@dr01](https://discuss.elastic.co/u/dr01)\
**Post date:** [October 18, 2018, 1:10pm UTC](https://discuss.elastic.co/t/on-an-elasticsearch-cluster-how-to-have-a-node-not-allocate-shards-on-it/153004/1 "2018-10-18T13:10:02Z")

</div>

On an Elasticsearch n-node cluster, how can you flag a node so not to have shards allocated on that node (for instance when you're putting the node into maintenance)?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 18, 2018, 1:26pm UTC](https://discuss.elastic.co/t/on-an-elasticsearch-cluster-how-to-have-a-node-not-allocate-shards-on-it/153004/2 "2018-10-18T13:26:48Z")

</div>

Have a look at [https://www.elastic.co/guide/en/elasticsearch/reference/current/allocation-filtering.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/allocation-filtering.html)

For example:

```auto
PUT _cluster/settings
{
  "transient" : {
    "cluster.routing.allocation.exclude._ip" : "10.0.0.1"
  }
}

```

---

<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 15, 2018, 1:36pm UTC](https://discuss.elastic.co/t/on-an-elasticsearch-cluster-how-to-have-a-node-not-allocate-shards-on-it/153004/4 "2018-11-15T13:36:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
