# Enforcing a 1:1 mapping between pods and cluster nodes for deploying multiple ElasticSearch/Logstash replicas with local storage

**URL:** <https://discuss.elastic.co/t/enforcing-a-1-1-mapping-between-pods-and-cluster-nodes-for-deploying-multiple-elasticsearch-logstash-replicas-with-local-storage/384433>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [January 8, 2026, 10:25am UTC](https://discuss.elastic.co/t/enforcing-a-1-1-mapping-between-pods-and-cluster-nodes-for-deploying-multiple-elasticsearch-logstash-replicas-with-local-storage/384433 "2026-01-08T10:25:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CitizenSteak](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@CitizenSteak](https://discuss.elastic.co/u/CitizenSteak)\
**Post date:** [January 8, 2026, 10:25am UTC](https://discuss.elastic.co/t/enforcing-a-1-1-mapping-between-pods-and-cluster-nodes-for-deploying-multiple-elasticsearch-logstash-replicas-with-local-storage/384433/1 "2026-01-08T10:25:42Z")

</div>

**Context**

I'm deploying the ELK stack (using the eck-stack chart) on a K3s cluster with OpenEBS for local storage. When deploying multiple Elasticsearch or Logstash replicas with local storage (e.g., OpenEBS `ReadWriteOnce` volumes), pods must remain on the same node to retain access to their local data.

**Current workaround**

I'm using the `nodeSets` implementation from eck-elasticsearch chart to enforce a 1:1 mapping between pods and nodes. Example structure :

```yaml
eck-elasticsearch:
  enabled: true
  fullnameOverride: elasticsearch
  nodeSets:
  - name: es-set1
    count: 1
    config:
      node.store.allow_mmap: false
    podTemplate:
      spec:
        nodeSelector:
          kubernetes.io/hostname: node-1
    volumeClaimTemplates:
      - metadata:
          name: elasticsearch-data
        spec:
          accessModes: ["ReadWriteOnce"]
          resources:
            requests:
              storage: 100Gi

  - name: es-set2
    count: 1
    config:
      node.store.allow_mmap: false
    podTemplate:
      spec:
        nodeSelector:
          kubernetes.io/hostname: node-2
    volumeClaimTemplates:
      - metadata:
          name: elasticsearch-data
        spec:
          accessModes: ["ReadWriteOnce"]
          resources:
            requests:
              storage: 100Gi

```

**Limitations**

The issue with this workaround is that the Elastic Operator will create a StatefulSet for each nodeSet, which is probably not optimal. Plus, the eck-logstash chart does not support the `nodeSets` feature. Do you have any better idea for what I'm trying to achieve with my current context ?

---

<div class="post-metadata">

**Author:** ![CitizenSteak](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@CitizenSteak](https://discuss.elastic.co/u/CitizenSteak)\
**Post date:** [February 25, 2026, 4:30pm UTC](https://discuss.elastic.co/t/enforcing-a-1-1-mapping-between-pods-and-cluster-nodes-for-deploying-multiple-elasticsearch-logstash-replicas-with-local-storage/384433/2 "2026-02-25T16:30:02Z")

</div>

**This topic has been resolved here :** [Add nodeSets support for the eck-logstash chart (similar to eck-elasticsearch) · Issue #9061 · elastic/cloud-on-k8s · GitHub](https://github.com/elastic/cloud-on-k8s/issues/9061#issuecomment-3828158086)
