minikube: Minikube v0.21.0 hostPath PVCs do not bind (Pending forever).

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Minikube version (use minikube version): minikube version: v0.21.0

Environment:

  • OS (e.g. from /etc/os-release): Red Hat Enterprise Linux Workstation release 7.3 (Maipo)

  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): kvm

  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): minikube-v0.23.0.iso

  • Install tools:

  • Others:

What happened: HostPath PVCs will not bind to PVs – PVCs stuck in Pending forever.

What you expected to happen: HostPath PVCs successfully bind, as it did in Minikube v0.20.0

How to reproduce it (as minimally and precisely as possible): Create test.yml:

---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: test-pv0
spec:
  accessModes:
    - ReadWriteOnce
  capacity:
    storage: 1Gi
  hostPath:
    path: /data/test

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: test-claim0
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  volumeName: test-pv0

Execute: kubectl apply -f test.yml

Anything else do we need to know: This worked fine in v0.20.0 of minikube – seems to be a regression in newest version. Any ideas, work-arounds would be greatly appreciated!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 3
  • Comments: 21 (1 by maintainers)

Most upvoted comments

Could you please run kubectl describe pv ?

I ran into a similar issue and resolved it by explicitly defining the storage class in my pv definition.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: postgresql-storage
spec:
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  storageClassName: standard <----
  hostPath:
      path: /data/postgresql/

Same here, I moved away from the none driver to kvm2 and everything works!

minikube start --vm-driver=kvm2 --memory=8192 --disk-size=40g

I’m going to leave this open and tag it as something we should add some documentation for.