<p>My question is about PersistentVolumeClaim
I have one node cluster setup on aws ec2
I am trying to create a storage class using <strong>kubernetes.io/host-path</strong> as <strong>Provisioner</strong>. </p>

<p>yaml file content for storage class as follows,</p>

<pre><code>kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
namespace: kube-system
name: my-storage
annotations:
    storageclass.beta.kubernetes.io/is-default-class: "false"
labels:
    kubernetes.io/cluster-service: "true"
provisioner: kubernetes.io/host-path
</code></pre>

<p>yaml file content for PersistentVolumeClaim as follows,</p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: task-pv-claim
annotations:
    volume.beta.kubernetes.io/storage-class: my-storage
spec:
accessModes:
    - ReadWriteOnce
resources:
    requests:
    storage: 3Gi
</code></pre>

<p>When I am trying to create storage class and PVC on <strong>minikube</strong>, it's working. It is creating 
volume on minikube in /tmp/hostpath_volume/
But, When I am trying similar thing on one node cluster setup on aws ec2, I am getting following error</p>

<p>Failed to create provisioner: Provisioning in volume plugin "kubernetes.io/host-path" is disabled</p>

<p>I can see this error when I do the <strong>kubectl describe pvc task-pv-claim</strong>, Also as, PV is not created, so claim is in pending state</p>

<p>I found something like kube-controller-manager which shows 
--enable-dynamic-provisioning and --enable-hostpath-provisioner in its option but don't know how to use it.</p>

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

<p>Take a look <a href="https://github.com/kubernetes-incubator/external-storage/blob/master/docs/demo/hostpath-provisioner/pod.yaml" rel="noreferrer">here</a></p>

<p>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).</p>

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

<p>Run the following:</p>

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

<p>And then recreate your storageclass and pvc</p>
