<p>I am creating the following PersistentVolume</p>
<pre class="lang-yaml prettyprint-override"><code>▶ cat mypv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
  name: myvolume
  labels:
    type: local
spec:
  storageClassName: normal
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
    - ReadWriteMany
  hostPath:
    path: &quot;/etc/foo&quot;
</code></pre>
<p>However, after creating</p>
<pre><code>▶ k create -f mypv.yaml
persistentvolume/myvolume created
</code></pre>
<p>I realized that there is no <code>normal</code> <code>StorageClass</code> available.</p>
<pre><code>▶ k get sc
NAME                 PROVISIONER                RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
standard (default)   k8s.io/minikube-hostpath   Delete          Immediate           false                  8d
</code></pre>
<p>So how come a <code>PersistentVolume</code> creation with a non-existent storage class succeed?</p>

pkaramol
<p>Note that storage class is called when volume needs to be provisioned dynamically. It works well on cloud providers like GCD, AWS , Azure.</p>
<p>On the other hand, HostPath volumes are provisioned statically. Storage class is ignored in those PV definitions. Hence in your case the pv was created without errors. The pv is bound to the storage on the host machine.</p>
<p>Follow the below link for help --&gt; <a href="https://docs.openshift.com/container-platform/4.2/storage/persistent_storage/persistent-storage-hostpath.html" rel="nofollow noreferrer">https://docs.openshift.com/container-platform/4.2/storage/persistent_storage/persistent-storage-hostpath.html</a></p>
