1 pod has unbound immediate PersistentVolumeClaims on Minikube 1 pod has unbound immediate PersistentVolumeClaims on Minikube kubernetes kubernetes

1 pod has unbound immediate PersistentVolumeClaims on Minikube


You need to create a PV to satisfy the PVC. If you apply the below PV it should work.

apiVersion: v1kind: PersistentVolumemetadata:  name: task-pv-volume  labels:    type: localspec:  capacity:    storage: 1Gi  accessModes:    - ReadWriteOnce  hostPath:    path: "/mnt/data"

Please note below points

  1. Usage of hostPath is not recommended in production
  2. capacity of PV and PVC needs to match
  3. accessModes of PV and PVC needs to match


To use a PersistentVolumeClaim you need some kind of underlying storage system. The cloud providers provides dynamic provisioning of volumes when you create PVCs using their storage class. This does not come out of the box with Minikube.

You can follow Configure a Pod to Use a PersistentVolume for Storage for how to setup PersistentVolume for Minikube so that your application can use a PersistentVolumeClaim.


1.Run minikube addons list to see if the storage-provisioner is enabled:

|-----------------------------|----------|--------------||         ADDON NAME          | PROFILE  |    STATUS    ||-----------------------------|----------|--------------|| dashboard                   | minikube | disabled     || default-storageclass        | minikube | enabled ✅   || efk                         | minikube | disabled     || freshpod                    | minikube | disabled     || gvisor                      | minikube | disabled     || helm-tiller                 | minikube | disabled     || ingress                     | minikube | enabled ✅   || ingress-dns                 | minikube | disabled     || istio                       | minikube | disabled     || istio-provisioner           | minikube | disabled     || logviewer                   | minikube | disabled     || metrics-server              | minikube | disabled     || nvidia-driver-installer     | minikube | disabled     || nvidia-gpu-device-plugin    | minikube | disabled     || registry                    | minikube | disabled     || registry-aliases            | minikube | disabled     || registry-creds              | minikube | disabled     || storage-provisioner         | minikube | enabled ✅   || storage-provisioner-gluster | minikube | disabled     ||-----------------------------|----------|--------------|
  1. If it's not, enable it with minikube addons enable storage-provisioner.

See Persistent Volumes