# Persistent Volume mapping in ES cluster using Kubernetes

**URL:** <https://discuss.elastic.co/t/persistent-volume-mapping-in-es-cluster-using-kubernetes/94205>\
**Category:** Elasticsearch\
**Created:** [July 22, 2017, 1:07pm UTC](https://discuss.elastic.co/t/persistent-volume-mapping-in-es-cluster-using-kubernetes/94205 "2017-07-22T13:07:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhopu\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhopu_k/32/43820_2.png) [@Dhopu\_K](https://discuss.elastic.co/u/Dhopu_K)\
**Post date:** [July 22, 2017, 1:07pm UTC](https://discuss.elastic.co/t/persistent-volume-mapping-in-es-cluster-using-kubernetes/94205/1 "2017-07-22T13:07:46Z")

</div>

We plan to set up a ES cluster using Kubernetes. The k8s pod will consist of 3 data nodes and we intend to have persistent volume mapping for the data. In a pod, a volume is usually shared but as I understand, in this case, we should not share the data of the 3 instances. What is the best way to achieve volume mapping for a pod. If I have 3 instance s, should I map each separately like /node1/data, /node2/data or should I just map to a single volume '/data' and ES will ensure that that data between the instances is isolated? I am not sure if mapped volume should have node names like node1, node2 etc as explained above. What happens if the pod is terminated and a new pod is created? Should there be a strong binding between the mapped volume and nodename. What is the best practice to achieve this?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 24, 2017, 1:03am UTC](https://discuss.elastic.co/t/persistent-volume-mapping-in-es-cluster-using-kubernetes/94205/2 "2017-07-24T01:03:56Z")

</div>

You'd probably be better off running a single instance in a pod, otherwise if your pod disappears then you lose the entire cluster. With each node in a unique pod you get HA if you do lose one of the pods.

---

<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:** [August 21, 2017, 1:04am UTC](https://discuss.elastic.co/t/persistent-volume-mapping-in-es-cluster-using-kubernetes/94205/3 "2017-08-21T01:04:08Z")

</div>

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