# VolumeClaim emptyDir overwrite not working

**URL:** <https://discuss.elastic.co/t/volumeclaim-emptydir-overwrite-not-working/224809>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [March 24, 2020, 11:00am UTC](https://discuss.elastic.co/t/volumeclaim-emptydir-overwrite-not-working/224809 "2020-03-24T11:00:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TatsuKishi](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TatsuKishi](https://discuss.elastic.co/u/TatsuKishi)\
**Post date:** [March 24, 2020, 11:00am UTC](https://discuss.elastic.co/t/volumeclaim-emptydir-overwrite-not-working/224809/1 "2020-03-24T11:00:07Z")

</div>

Hey, I'm trying to disable the PVC for a client/ingest nodeset like stated in [documentation](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-volume-claim-templates.html), however ECK is still creating the 1gb volume.

nodeSet config:

```
nodesets[client].config.podTemplate.volumes:
  - emptyDir: {}
    name: elasticsearch-data

```

resulting statefulset snippet:

```
 spec.containers.volumes:
   - name: elasticsearch-data  
     persistentVolumeClaim:
       claimName: claim-name-placeholder

```

kubectl get pvc:

```
elasticsearch-data-logs-es-client-0 Bound pvc-xyz 1Gi RWO rbd 25h
```

---

<div class="post-metadata">

**Author:** ![charith-elastic](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@charith-elastic](https://discuss.elastic.co/u/charith-elastic)\
**Post date:** [March 24, 2020, 1:50pm UTC](https://discuss.elastic.co/t/volumeclaim-emptydir-overwrite-not-working/224809/2 "2020-03-24T13:50:45Z")

</div>

It's not clear to me how you have configured the volume as I am not familiar with the notation you have used. Pasting the full YAML manifest here would be helpful to understand what is going wrong.

The following snippet works as expected and does not create a PV:

```auto
---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 7.6.1
  nodeSets:
  - name: default
    count: 1
    podTemplate:
      spec:
        volumes:
          - name: elasticsearch-data
            emptyDir: {}

```

---

<div class="post-metadata">

**Author:** ![TatsuKishi](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@TatsuKishi](https://discuss.elastic.co/u/TatsuKishi)\
**Post date:** [March 24, 2020, 4:07pm UTC](https://discuss.elastic.co/t/volumeclaim-emptydir-overwrite-not-working/224809/3 "2020-03-24T16:07:26Z")

</div>

Ah, I found my mistake. I missed a level of indentation thanks to all the other options that make for a functional cluster.

Thank you for taking a look at this.

---

<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 4, 2022, 7:50am UTC](https://discuss.elastic.co/t/volumeclaim-emptydir-overwrite-not-working/224809/4 "2022-11-04T07:50:29Z")

</div>


