# Can't deploy elastic cluster with ECK

**URL:** <https://discuss.elastic.co/t/cant-deploy-elastic-cluster-with-eck/351345>\
**Category:** Elastic Cloud Enterprise (ECE)\
**Created:** [January 18, 2024, 9:56am UTC](https://discuss.elastic.co/t/cant-deploy-elastic-cluster-with-eck/351345 "2024-01-18T09:56:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmz161](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@kmz161](https://discuss.elastic.co/u/kmz161)\
**Post date:** [January 18, 2024, 9:56am UTC](https://discuss.elastic.co/t/cant-deploy-elastic-cluster-with-eck/351345/1 "2024-01-18T09:56:06Z")

</div>

Hello!  
I try to deploy Elasticsearch using ECK.  
But I have problem with Persistence Volume.  
My elastic manifest

```auto
kind: Elasticsearch
metadata:
  name: opencti-elastic
spec:
  version: 8.11.4
  volumeClaimDeletePolicy: DeleteOnScaledownOnly
  nodeSets:
  - name: master
    count: 3
    config:
      node.roles: ["master"]
      node.store.allow_mmap: false
    podTemplate:
      spec:
        containers:
        - name: elasticsearch
          env:
          - name: READINESS_PROBE_TIMEOUT
            value: "10"
          - name: ES_JAVA_OPTS
            value: -Xms2g -Xmx2g
          resources:
            requests:
              memory: 4Gi
              cpu: 1
            limits:
              memory: 4Gi
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data # Do not change this name unless you set up a volume mount for the data path.
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 1Gi
        storageClassName: "local-storage"

```

My persistence volume manifest

```auto
apiVersion: v1
kind: PersistentVolume
metadata:
  name: elasticsearch-data
  labels:
    type: local
spec:
  storageClassName: local-storage
  volumeMode: Filesystem
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"

```

I create pv elasticsearch-data sucessfully, but only one pvc can bound to it

```auto
root@k8s-master-test:~# kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
elasticsearch-data 5Gi RWO Retain Available local-storage 4s

```

```auto
root@k8s-master-test:~# kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
elasticsearch-data-opencti-elastic-es-master-0 Bound elasticsearch-data 5Gi RWO local-storage 11s
elasticsearch-data-opencti-elastic-es-master-1 Pending local-storage 11s
elasticsearch-data-opencti-elastic-es-master-2 Pending local-storage 11s

```

```auto
root@k8s-master-test:~# kubectl get pods
NAME READY STATUS RESTARTS AGE
opencti-elastic-es-master-0 1/1 Running 0 39s
opencti-elastic-es-master-1 0/1 Pending 0 39s
opencti-elastic-es-master-2 0/1 Pending 0 39s

```

```auto
#kubectl describe pods opencti-elastic-es-master-1
...
Events:
  Type Reason Age From Message
  ---- ------ ---- ---- -------
  Warning FailedScheduling 86s (x3 over 90s) default-scheduler 0/5 nodes are available: 1 node(s) had untolerated taint {node-role.kubernetes.io/control-plane: }, 4 node(s) didn't find available persistent volumes to bind. preemption: 0/5 nodes are available: 5 Preemption is not helpful for scheduling..

```

How I can use one PV for several 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:** [February 15, 2024, 9:56am UTC](https://discuss.elastic.co/t/cant-deploy-elastic-cluster-with-eck/351345/2 "2024-02-15T09:56:52Z")

</div>

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