# Stuck pending elasticdeployment pods

**URL:** <https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [September 21, 2020, 2:58pm UTC](https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384 "2020-09-21T14:58:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![javig12](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javig12/32/73523_2.png) [@javig12](https://discuss.elastic.co/u/javig12)\
**Post date:** [September 21, 2020, 2:58pm UTC](https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384/1 "2020-09-21T14:58:32Z")

</div>

Hello community,

Executing the command: kubectl get eventss -w

got this events:

0s Warning FailedScheduling pod/quickstart-es-default-0 **0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims.**  
0s Normal FailedBinding **persistentvolumeclaim/elasticsearch-data-quickstart-es-default-0 no persistent volumes available for this claim and no storage class is set**

do I need to create pv and pvc or Need to edit the deployment. so if yo show me the commands help me a lot of.

hope your comments.

---

<div class="post-metadata">

**Author:** ![dkow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dkow/32/47340_2.png) [@dkow](https://discuss.elastic.co/u/dkow)\
**Post date:** [September 21, 2020, 3:58pm UTC](https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384/2 "2020-09-21T15:58:16Z")

</div>

Hi @javig12, thanks for your question.

Can you show the manifest you are using (output of `kubectl get -o yaml es quickstart`)? From the error I'd guess that either the storage class you specified doesn't exist or maybe there is no (default) storage class defined? You can check both with `kubectl get sc`.

There should be no need to create PV/PVC manually nor edit the `Deployment` resource.

---

<div class="post-metadata">

**Author:** ![javig12](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javig12/32/73523_2.png) [@javig12](https://discuss.elastic.co/u/javig12)\
**Post date:** [September 21, 2020, 6:22pm UTC](https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384/3 "2020-09-21T18:22:57Z")

</div>

Hello dkow, thanks for you response.

Here the results, kubetctl get -o yaml es quickstart:

```auto

```

apiVersion: [elasticsearch.k8s.elastic.co/v1](http://elasticsearch.k8s.elastic.co/v1)  
kind: Elasticsearch  
metadata:  
annotations:  
[common.k8s.elastic.co/controller-version:](http://common.k8s.elastic.co/controller-version:) 1.2.1  
[elasticsearch.k8s.elastic.co/initial-master-nodes:](http://elasticsearch.k8s.elastic.co/initial-master-nodes:) quickstart-es-default-0  
[kubectl.kubernetes.io/last-applied-configuration:](http://kubectl.kubernetes.io/last-applied-configuration:) |  
{"apiVersion":"[elasticsearch.k8s.elastic.co/v1","kind":"Elasticsearch","metadata":{"annotations":{},"name":"quickstart","namespace":"default"},"spec":{"nodeSets":[{"count":1,"name":"default","podTemplate":{"spec":{"containers":[{"env":[{"name":"ES\_JAVA\_OPTS","value":"-Xms2g](http://elasticsearch.k8s.elastic.co/v1%22,%22kind%22:%22Elasticsearch%22,%22metadata%22:%7B%22annotations%22:%7B%7D,%22name%22:%22quickstart%22,%22namespace%22:%22default%22%7D,%22spec%22:%7B%22nodeSets%22:%5B%7B%22count%22:1,%22name%22:%22default%22,%22podTemplate%22:%7B%22spec%22:%7B%22containers%22:%5B%7B%22env%22:%5B%7B%22name%22:%22ES_JAVA_OPTS%22,%22value%22:%22-Xms2g) -Xmx2g"}],"name":"elasticsearch","resources":{"limits":{"cpu":2,"memory":"4Gi"},"requests":{"cpu":0.5,"memory":"4Gi"}}}]}}}],"version":"7.9.1"}}  
creationTimestamp: "2020-09-21T16:00:23Z"  
generation: 2  
managedFields:

- apiVersion: [elasticsearch.k8s.elastic.co/v1](http://elasticsearch.k8s.elastic.co/v1)  
fieldsType: FieldsV1  
fieldsV1:  
f:metadata:  
f:annotations:  
.: {}  
f:kubectl.kubernetes.io/last-applied-configuration: {}  
f:spec:  
.: {}  
f:version: {}  
manager: kubectl-client-side-apply  
operation: Update  
time: "2020-09-21T16:00:23Z"
- apiVersion: [elasticsearch.k8s.elastic.co/v1](http://elasticsearch.k8s.elastic.co/v1)  
fieldsType: FieldsV1  
fieldsV1:  
f:metadata:  
f:annotations:  
f:common.k8s.elastic.co/controller-version: {}  
f:elasticsearch.k8s.elastic.co/initial-master-nodes: {}  
f:spec:  
f:auth: {}  
f:http:  
.: {}  
f:service:  
.: {}  
f:metadata:  
.: {}  
f:creationTimestamp: {}  
f:spec: {}  
f:tls:  
.: {}  
f:certificate: {}  
f:nodeSets: {}  
f:transport:  
.: {}  
f:service:  
.: {}  
f:metadata:  
.: {}  
f:creationTimestamp: {}  
f:spec: {}  
f:updateStrategy:  
.: {}  
f:changeBudget: {}  
f:status:  
.: {}  
f:health: {}  
f:phase: {}  
manager: elastic-operator  
operation: Update  
time: "2020-09-21T16:00:27Z"  
name: quickstart  
namespace: default  
resourceVersion: "643953"  
selfLink: /apis/elasticsearch.k8s.elastic.co/v1/namespaces/default/elasticsearches/quickstart  
uid: 3204d30f-48c1-4df7-823b-c9694a5a2c52  
spec:  
auth: {}  
http:  
service:  
metadata:  
creationTimestamp: null  
spec: {}  
tls:  
certificate: {}  
nodeSets:
- count: 1  
name: default  
podTemplate:  
metadata:  
creationTimestamp: null  
spec:  
containers:  
- env:  
- name: ES\_JAVA\_OPTS  
value: -Xms2g -Xmx2g  
name: elasticsearch  
resources:  
limits:  
cpu: "2"  
memory: 4Gi  
requests:  
cpu: 500m  
memory: 4Gi  
transport:  
service:  
metadata:  
creationTimestamp: null  
spec: {}  
updateStrategy:  
changeBudget: {}  
version: 7.9.1  
status:  
health: unknown  
phase: ApplyingChanges

```auto

```

* * *

Result `kubectl get sc`

No resources found

---

<div class="post-metadata">

**Author:** ![dkow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dkow/32/47340_2.png) [@dkow](https://discuss.elastic.co/u/dkow)\
**Post date:** [September 22, 2020, 5:31am UTC](https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384/4 "2020-09-22T05:31:36Z")

</div>

Your Elasticsearch resource looks fine, but the issue seems to be that there are is no storage class defined. You can read more in our [docs](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-volume-claim-templates.html). If you just want to get it running right now, you can consider using `emptyDir` - see the bottom of the page I've linked. Note that this is not recommended for any production use, but can unblock you until you figure out the storage class part.

---

<div class="post-metadata">

**Author:** ![javig12](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javig12/32/73523_2.png) [@javig12](https://discuss.elastic.co/u/javig12)\
**Post date:** [September 23, 2020, 3:24pm UTC](https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384/5 "2020-09-23T15:24:36Z")

</div>

Hello dkow,

Got this error now:  
`"0/3 nodes are available: 3 node(s) didn't find available persistent volumes to bind"`

So, as doc says, I've created storageclass and pv (Local Storage):

```auto

```

NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE  
persistentvolume/elasticsearch 5Gi RWO Retain Available local-storage 49m  
persistentvolume/elasticsearch-data 5Gi RWO Retain Available local-storage 20h

NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE  
elasticsearch [kubernetes.io/no-provisioner](http://kubernetes.io/no-provisioner) Delete WaitForFirstConsumer false 19h  
elasticsearch-data [kubernetes.io/no-provisioner](http://kubernetes.io/no-provisioner) Delete WaitForFirstConsumer false 19h

```auto

```

So I dont know what else I need. this my storageclass:

```auto

```

apiVersion: [storage.k8s.io/v1](http://storage.k8s.io/v1)  
kind: StorageClass  
metadata:  
name: elasticsearch  
provisioner: [kubernetes.io/no-provisioner](http://kubernetes.io/no-provisioner)  
volumeBindingMode: WaitForFirstConsumer

```auto

```

hope comments.  
Regards

---

<div class="post-metadata">

**Author:** ![dkow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dkow/32/47340_2.png) [@dkow](https://discuss.elastic.co/u/dkow)\
**Post date:** [September 24, 2020, 8:14am UTC](https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384/6 "2020-09-24T08:14:35Z")

</div>

The storage class looks fine. If the persistent volume is correct (how did you create it?), you should make sure that your Elasticsearch resource contains `volumeClaimTemplates` part and it references your storage class name (see below). I didn't see it added in the output you've posted.

```auto
spec:
  nodeSets:
  - name: default
    count: 3
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 5Gi
        storageClassName: elasticsearch

```

Also, can you format any output using ````output goes here````? It'll be much easier to read.

---

<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, 8:13am UTC](https://discuss.elastic.co/t/stuck-pending-elasticdeployment-pods/249384/7 "2022-11-04T08:13:38Z")

</div>


