Eck pvc pending

instlal operator

kubectl apply -f https://download.elastic.co/downloads/eck/1.0.1/all-in-one.yaml

run elasticsearch cluster

cat <<EOF | kubectl apply -f -
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 7.6.2
  nodeSets:
  - name: default
    count: 1
    config:
      node.master: true
      node.data: true
      node.ingest: true
      node.store.allow_mmap: false
EOF

pod pending

[root@master01 ~]# kubectl get pods
NAME                       READY   STATUS    RESTARTS   AGE
quickstart-es-default-0    0/1     Pending   0          2m37s

[root@master01 ~]# kubectl get pvc
NAME                                         STATUS    VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
elasticsearch-data-quickstart-es-default-0   Pending                                               

i need a example for create storage class


[root@master01 ~]# kubectl describe pvc elasticsearch-data-quickstart-es-default-0 
Name:          elasticsearch-data-quickstart-es-default-0
Namespace:     default
StorageClass:  
Status:        Pending
Volume:        
Labels:        common.k8s.elastic.co/type=elasticsearch
               elasticsearch.k8s.elastic.co/cluster-name=quickstart
               elasticsearch.k8s.elastic.co/statefulset-name=quickstart-es-default
Annotations:   <none>
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      
Access Modes:  
VolumeMode:    Filesystem
Mounted By:    quickstart-es-default-0
Events:
  Type    Reason         Age                 From                         Message
  ----    ------         ----                ----                         -------
  Normal  FailedBinding  20s (x62 over 15m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set

my storage class

[root@master01 ~]# kubectl get sc
NAME                        PROVISIONER                                                RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
openebs-device              openebs.io/local                                           Delete          WaitForFirstConsumer   false                  5d19h
openebs-hostpath            openebs.io/local                                           Delete          WaitForFirstConsumer   false                  5d19h
openebs-jiva-default        openebs.io/provisioner-iscsi                               Delete          Immediate              false                  5d19h
openebs-mongodb             openebs.io/provisioner-iscsi                               Delete          Immediate              false                  21m
openebs-snapshot-promoter   volumesnapshot.external-storage.k8s.io/snapshot-promoter   Delete          Immediate              false                  5d19h
openebs-standalone          openebs.io/provisioner-iscsi                               Delete          Immediate              false                  21m
openebs-standard            openebs.io/provisioner-iscsi                               Delete          Immediate              false                  21m
standard                    openebs.io/provisioner-iscsi                               Delete          Immediate              false                  20m

Hi @willes, please see this doc that describes how you can specify your storage class in the yaml manifest: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-volume-claim-templates.html.

yes , but i can't understand what it is , It's not a complete yaml file , i don't know what it tell me , what i should create or what i shoud change, there already have a pending pvc ,how can i Handle it?

should i change the already running statefulset yaml at the pvc option?

kubectl edit sts quickstart-es-default 

but it furbid me to save it .

or should i create a new pvc and pv?

i find the pvc define , but there have no storageclass name

kubectl get sts quickstart-es-default -o yaml

  volumeClaimTemplates:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      creationTimestamp: null
      name: elasticsearch-data
      ownerReferences:
      - apiVersion: elasticsearch.k8s.elastic.co/v1
        blockOwnerDeletion: false
        controller: true
        kind: Elasticsearch
        name: quickstart
        uid: 97946e1d-ea05-4db5-99b5-9d9944135b97
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 1Gi
      volumeMode: Filesystem
    status:
      phase: Pending

i know, delete all ,then rerun

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 7.6.2
  nodeSets:
  - name: default
    count: 3
    config:
      node.master: true
      node.data: true
      node.ingest: true
      node.store.allow_mmap: false
    volumeClaimTemplates:
    - metadata:
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 5Gi
        storageClassName: standard	 
1 Like