Pod has unbound immediate PersistentVolumeClaims

4/10/2019

I am trying to configure my kubernetes cluster on rancher. When I deploy rabbitmq it created volume which is pending. I don't understand how to use storage. I know with storage clasName manually. This is yaml of my rabbitmq:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: "2019-04-10T07:29:13Z"
  finalizers:
  - kubernetes.io/pvc-protection
  labels:
    app: rabbitmq
    release: rabbitmq
  name: data-rabbitmq-0
  namespace: ucpaas
  resourceVersion: "82695"
  selfLink: /api/v1/namespaces/ucpaas/persistentvolumeclaims/data-rabbitmq-0
  uid: 56d2908d-5b62-11e9-9b0c-0050563e499c
spec:
  accessModes:
  - ReadWriteOnce
  dataSource: null
  resources:
    requests:
      storage: 8Gi
  volumeMode: Filesystem
status:
  phase: Pending

My rancher cluster is custom (contabo.com)

How to bound this pvc ?

-- Mirnes Halilović
jenkins
kubernetes
rancher
rancheros

1 Answer

4/10/2019
  1. You need to configure storage ( look at NFS/hostpath/local persistent volume )
  2. Create persistent volume that should fulfill PVC requirements

alternatively, use emptyDir volume to run the pods. The pods are going to be ephemeral and the data is lost if the pod is deleted.

-- P Ekambaram
Source: StackOverflow