# Metadata name in VolumeClaimTemplates

**URL:** <https://discuss.elastic.co/t/metadata-name-in-volumeclaimtemplates/273650>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [May 21, 2021, 9:56am UTC](https://discuss.elastic.co/t/metadata-name-in-volumeclaimtemplates/273650 "2021-05-21T09:56:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkaramol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkaramol/32/22610_2.png) [@pkaramol](https://discuss.elastic.co/u/pkaramol)\
**Post date:** [May 21, 2021, 9:56am UTC](https://discuss.elastic.co/t/metadata-name-in-volumeclaimtemplates/273650/1 "2021-05-21T09:56:51Z")

</div>

Assuming I want to make 1 `nodeSet` of 2-role nodes `masters`/`data` and 1 `nodeSet` with `data` nodes as follows:

```auto
  - name: master
    config:
      node.roles: ["master", "data"]
    count: 3
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 150Gi
        storageClassName: balanced-rwo

```

```auto
  - name: data
    config:
      node.roles: ["data"]
    count: 3
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 150Gi
        storageClassName: balanced-rwo

```

Does the value of the field `volumeClaimTemplates.metadata.name` (`elasticsearch-data` in this example) has to be the **same** in the 2 `nodeSets`? (assuming of course we want the same data in all of them)

---

<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:** [May 21, 2021, 10:30am UTC](https://discuss.elastic.co/t/metadata-name-in-volumeclaimtemplates/273650/2 "2021-05-21T10:30:21Z")

</div>

The data volume claim must always be named `elasticsearch-data`

> **[Volume claim templates | Elastic Cloud on Kubernetes \[1.5\] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/current/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:** [June 18, 2021, 10:30am UTC](https://discuss.elastic.co/t/metadata-name-in-volumeclaimtemplates/273650/3 "2021-06-18T10:30:37Z")

</div>

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