# Elastic in kubernetes - how to gracefully shutdown

**URL:** <https://discuss.elastic.co/t/elastic-in-kubernetes-how-to-gracefully-shutdown/196373>\
**Category:** Elasticsearch\
**Created:** [August 22, 2019, 5:20pm UTC](https://discuss.elastic.co/t/elastic-in-kubernetes-how-to-gracefully-shutdown/196373 "2019-08-22T17:20:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethrbunny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethrbunny/32/34603_2.png) [@ethrbunny](https://discuss.elastic.co/u/ethrbunny)\
**Post date:** [August 22, 2019, 5:20pm UTC](https://discuss.elastic.co/t/elastic-in-kubernetes-how-to-gracefully-shutdown/196373/1 "2019-08-22T17:20:56Z")

</div>

5 data nodes, 5 ingest nodes and a master (+ kibana) running in kubernetes. Looking for a way to tell elastic to close indexes and put away all of its stuff so I can work on k8.

If I just kill it outright when it gets restarted there are dozens of "dangling indexes" and kibana is super unhappy.

---

<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:** [August 26, 2019, 2:22pm UTC](https://discuss.elastic.co/t/elastic-in-kubernetes-how-to-gracefully-shutdown/196373/2 "2019-08-26T14:22:55Z")

</div>

The usual way to get dangling indices is if your master nodes are not using persistent storage, so the cluster state is lost each time the master node(s) restart. Dangling indices are a sign of potential data loss, and you should avoid them at all costs.

---

<div class="post-metadata">

**Author:** ![ethrbunny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ethrbunny/32/34603_2.png) [@ethrbunny](https://discuss.elastic.co/u/ethrbunny)\
**Post date:** [August 26, 2019, 2:59pm UTC](https://discuss.elastic.co/t/elastic-in-kubernetes-how-to-gracefully-shutdown/196373/3 "2019-08-26T14:59:33Z")

</div>

How should I calculate the space requirement(s) for the master node data volume?

---

<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:** [August 26, 2019, 3:20pm UTC](https://discuss.elastic.co/t/elastic-in-kubernetes-how-to-gracefully-shutdown/196373/4 "2019-08-26T15:20:56Z")

</div>

Just measure it. It depends on how large and complex your cluster is, but it's normally less than 1GB.

---

<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:** [September 23, 2019, 3:26pm UTC](https://discuss.elastic.co/t/elastic-in-kubernetes-how-to-gracefully-shutdown/196373/5 "2019-09-23T15:26:09Z")

</div>

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