# Making elasticdb container persistant in EKS

**URL:** <https://discuss.elastic.co/t/making-elasticdb-container-persistant-in-eks/296158>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [February 3, 2022, 8:52am UTC](https://discuss.elastic.co/t/making-elasticdb-container-persistant-in-eks/296158 "2022-02-03T08:52:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaurav.mittal](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gaurav.mittal](https://discuss.elastic.co/u/gaurav.mittal)\
**Post date:** [February 3, 2022, 8:52am UTC](https://discuss.elastic.co/t/making-elasticdb-container-persistant-in-eks/296158/1 "2022-02-03T08:52:28Z")

</div>

Hi,

We are deploying the Elasticsearch and one of the container is for elasticdb. the default location for the database is under "/usr/share/Elasticsearch" it creates a data directory and database is created here. How to change this default location to a mounted volume path so that it can be persistent over upgrade.

We added as below in deployment.yaml  
\<  
volumeMounts:  
- mountPath: /Elasticsearch/data  
name: elasticdb-data

volumes:

- name: elasticdb-data  
hostPath:  
path: /data  
/\>

But still the data base is not created here. kindly suggest if any parameter needs to be updated.

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [February 7, 2022, 10:01am UTC](https://discuss.elastic.co/t/making-elasticdb-container-persistant-in-eks/296158/2 "2022-02-07T10:01:38Z")

</div>

Are you using the ECK operator? If not I would recommend doing that and then the operator would generate a PersistentVolumeClaim for you that you adjust to your needs as documented here [Volume claim templates | Elastic Cloud on Kubernetes [1.9] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/1.9/k8s-volume-claim-templates.html)

---

<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:** [March 7, 2022, 10:02am UTC](https://discuss.elastic.co/t/making-elasticdb-container-persistant-in-eks/296158/3 "2022-03-07T10:02:07Z")

</div>

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