Pod has unbound immediate PersistentVolumeClaims

Hello,

I'm trying to deploy ECK quickstart into my Cluster.

Unfortunately I'm getting the message 'pod has unbound immediate PersistentVolumeClaims (repeated 2 times)'. Why doesn't the claim access the volume?

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: elasticsearch-data-quickstart-es-default-0
  namespace: elastic-system
  selfLink: >-
    /api/v1/namespaces/elastic-system/persistentvolumeclaims/elasticsearch-data-quickstart-es-default-0
  uid: 9d075f70-da82-470b-8642-9e182264b4be
  resourceVersion: '50420'
  creationTimestamp: '2021-05-26T09:48:17Z'
  labels:
    common.k8s.elastic.co/type: elasticsearch
    elasticsearch.k8s.elastic.co/cluster-name: quickstart
    elasticsearch.k8s.elastic.co/statefulset-name: quickstart-es-default
  ownerReferences:
    - apiVersion: elasticsearch.k8s.elastic.co/v1
      kind: Elasticsearch
      name: quickstart
      uid: 10f33be4-5a7a-4b21-a797-750e281101e9
  finalizers:
    - kubernetes.io/pvc-protection
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  volumeMode: Filesystem
status:
  phase: Pending

=

kind: PersistentVolume
apiVersion: v1
metadata:
  name: pv
  selfLink: /api/v1/persistentvolumes/pv
  uid: 1304b5bd-65f5-4a4f-baf8-43ac7bac3719
  resourceVersion: '57395'
  creationTimestamp: '2021-05-26T10:36:32Z'
  finalizers:
    - kubernetes.io/pv-protection
spec:
  capacity:
    storage: 10Gi
  local:
    path: /mnt/pv-01
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  storageClassName: local-storage
  volumeMode: Filesystem
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values:
                - example-node
status:
  phase: Available

I changed today the pv from a local-storage to an nfs pv:

The pod still has unbound immediate PersistentVolumeClaims (repeated 2 times):

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: elasticsearch-data-quickstart-es-default-0
  namespace: default
  selfLink: >-
    /api/v1/namespaces/default/persistentvolumeclaims/elasticsearch-data-quickstart-es-default-0
  uid: a96c0b14-278e-470e-b319-8caca28e893a
  resourceVersion: '9454'
  creationTimestamp: '2021-05-27T13:31:44Z'
  labels:
    common.k8s.elastic.co/type: elasticsearch
    elasticsearch.k8s.elastic.co/cluster-name: quickstart
    elasticsearch.k8s.elastic.co/statefulset-name: quickstart-es-default
  ownerReferences:
    - apiVersion: elasticsearch.k8s.elastic.co/v1
      kind: Elasticsearch
      name: quickstart
      uid: 183b5798-9865-4183-bb4d-a5f63013927e
  finalizers:
    - kubernetes.io/pvc-protection
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  volumeMode: Filesystem
status:
  phase: Pending

=

kind: PersistentVolume
apiVersion: v1
metadata:
  name: nfs-pv
  selfLink: /api/v1/persistentvolumes/nfs-pv
  uid: 7bc37c50-542f-4829-b783-ef017998464b
  resourceVersion: '9720'
  creationTimestamp: '2021-05-27T13:17:44Z'
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"v1","kind":"PersistentVolume","metadata":{"annotations":{},"name":"nfs-pv"},"spec":{"accessModes":["ReadWriteMany"],"capacity":{"storage":"10Gi"},"mountOptions":["hard","nfsvers=4.1"],"nfs":{"path":"/","server":"10.98.86.155"},"persistentVolumeReclaimPolicy":"Recycle","storageClassName":"nfs","volumeMode":"Filesystem"}}
  finalizers:
    - kubernetes.io/pv-protection
spec:
  capacity:
    storage: 10Gi
  nfs:
    server: 10.98.86.155
    path: /
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Recycle
  storageClassName: nfs
  mountOptions:
    - hard
    - nfsvers=4.1
  volumeMode: Filesystem
status:
  phase: Available

Solved:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: elasticsearch-data
  namespace: default
spec:
  capacity:
    storage: 10Gi
  accessModes:
  - ReadWriteOnce
  persistentVolumeReclaimPolicy: Delete
  local:
    path: /mnt/disk1
  nodeAffinity:
    required:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/hostname
          operator: In
          values:
          - kub5w

:crazy_face:

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