Kubernetes : Dynamic Storage Provisioning using host-path Kubernetes : Dynamic Storage Provisioning using host-path kubernetes kubernetes

Kubernetes : Dynamic Storage Provisioning using host-path


It seems you might not be running the provisioner itself, so there's nothing to actually do the work of creating the hostpath directory.

Take a look here

The way this works is that the hostpath provisioner reads from the kubernetes API, and watches for you to create a storage class (which you've done) and a persistentvolumeclaim (also done).

When those exist, the provisioner (which is running as a pod) will go an execute a mkdir to create the hostpath.

Run the following:

kubectl apply -f https://raw.githubusercontent.com/kubernetes-incubator/external-storage/master/docs/demo/hostpath-provisioner/pod.yaml

And then recreate your storageclass and pvc