minikube: Cannot find provisioner "k8s.io/minikube-hostpath" for hostPath-driven volumes

Report type: BUG (possible) Minikube version: v0.17.1 Environment:

  • OS: macOS Sierra - 10.12.3
  • VM Driver: virtualbox
  • ISO version: minikube-v1.0.7.iso
  • Install tools: curl as per README instructions for macOS
  • Others:

What happened: The way PV claims are made against PVs seems to have changed for hostPaths. Instead of getting bound to a volume based on a hostPath with accessModes RWO, a new volume is being created.

kind: PersistentVolume
apiVersion: v1
metadata:
  name: kube-registry-pv
spec:
  accessModes:
    - ReadWriteOnce
  capacity:
    storage: 10Gi
  hostPath:
    path: /Users/username/path/to/hostdata/registry
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: kube-registry-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi

Listing the persistent volume (the one I’m hoping to claim against is: kube-registry-pv, the auto-created PV is pvc-04f*):

$ kubectl get pv
NAME                                       CAPACITY   ACCESSMODES   RECLAIMPOLICY   STATUS      CLAIM                       REASON    AGE
kube-registry-pv                           10Gi       RWO           Retain          Available                                         32s
pvc-04f89b3c-0840-11e7-a05a-080027b8816b   10Gi       RWO           Delete          Bound      default/kube-registry-pvc             18s

Describing the PVC says cannot find provisioner “k8s.io/minikube-hostpath”.

$ kubectl describe pvc kube-registry-pvc
Name:           kube-registry-pvc
Namespace:      default
StorageClass:   standard
Status:         Bound
Volume:         pvc-04f89b3c-0840-11e7-a05a-080027b8816b
Labels:         <none>
Capacity:       10Gi
Access Modes:   RWO
Events:
  FirstSeen     LastSeen        Count   From                                                                            SubObjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                                                                            -------------   --------        ------                  -------
  1m            1m              2       {persistentvolume-controller }                                                                  Normal          ExternalProvisioning    cannot find provisioner "k8s.io/minikube-hostpath", expecting that a volume for the claim is provisioned either manually or via external software
  1m            1m              1       {k8s.io/minikube-hostpath minikube bdad1f87-083f-11e7-a05a-080027b8816b }                       Normal          ProvisioningSucceeded   Successfully provisioned volume pvc-04f89b3c-0840-11e7-a05a-080027b8816b

What you expected to happen: A claim to be created against the declared PV. It should work as it works in in minikube 0.16.0.

$ kubectl get pv
NAME               CAPACITY   ACCESSMODES   RECLAIMPOLICY   STATUS    CLAIM                       REASON    AGE
kube-registry-pv   10Gi       RWO           Retain          Bound     default/kube-registry-pvc             21m
$ kubectl describe pvc
Name:           kube-registry-pvc
Namespace:      default
StorageClass:
Status:         Bound
Volume:         kube-registry-pv
Labels:         <none>
Capacity:       10Gi
Access Modes:   RWO
No events.

How to reproduce it (as minimally and precisely as possible): In a fresh 0.17.1 minikube environment, create the PV, create the PVC. kubectl get pv; kubectl describe pvc

Anything else do we need to know: I can see the macOS home directory successfully mounted within the minikube vm when I SSH onto the box, so there is no issue there.

I used to be running minikube 0.13.1 and didn’t experience this issue. After upgrading to the latest minikube I’m seeing this behavior. I’m not sure if it’s related to this in your release notes:

Version 0.17.0 - 3/2/2017

  • Added external hostpath provisioner to localkube

The problem doesn’t occur in minikube 0.16.0 curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.16.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Thanks for looking into this / for your help!

About this issue

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

Commits related to this issue

Most upvoted comments

Original comment updated, and just verified again, that if I explicitly add in the storageClassName: "standard" it works fine…ugh…