<p>I create a PV and claimed the PV through PVC. I see that PV is created but the PVC binding status is stuck in pending.When i looked at the describe pvc output , I see that no persistent volumes available for this claim and no storage class is set. From the documentation I understand that storage class isnt mandatory . So, am unsure on what's missing in the PVC file.</p>

<pre><code>apiVersion: v1

kind: PersistentVolume

metadata:
  name: pv-ghost
  labels:
    pv: pv-ghost

spec:
  accessModes:
    - ReadWriteMany
  capacity:
    storage: 3Gi

  hostPath:
    path: /ghost/data
--------------------------
apiVersion: v1

kind: PersistentVolumeClaim

metadata:
  name: pvc-ghost

spec:
  accessModes:
    - ReadWriteMany

  resources:
    requests:
      storage: 5Gi
  selector:
    matchLabels:
      pv: pv-ghost
</code></pre>

<p>Out of describe PV and PVC</p>

<pre><code>    kubectl describe pv pv-ghost
    Name:            pv-ghost
    Labels:          pv=pv-ghost
    Annotations:     &lt;none&gt;
    Finalizers:      [kubernetes.io/pv-protection]
    StorageClass:
    Status:          Available
    Claim:
    Reclaim Policy:  Retain
    Access Modes:    RWX
    Capacity:        3Gi
    Node Affinity:   &lt;none&gt;
    Message:
    Source:
        Type:          HostPath (bare host directory volume)
        Path:          /ghost/data
        HostPathType:
    Events:            &lt;none&gt;
kubectl describe pvc pvc-ghost
Name:          pvc-ghost
Namespace:     default
StorageClass:
Status:        Pending
Volume:
Labels:        &lt;none&gt;
Annotations:   &lt;none&gt;
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
Events:
  Type       Reason         Age                  From                         Message
  ----       ------         ----                 ----                         -------
  Normal     FailedBinding  8m44s (x8 over 10m)  persistentvolume-controller  no persistent volumes available for this claim and no storage class is set
  Normal     FailedBinding  61s (x5 over 2m3s)   persistentvolume-controller  no persistent volumes available for this claim and no storage class is set
Mounted By:  &lt;none&gt;
</code></pre>

IT_novice
<p>You need to specify the volume source manually.</p>

<p>ReadWriteMany is only available for <code>AzureFile</code>, <code>CephFS</code>, <code>Glusterfs</code>, <code>Quobyte</code>, <code>NFS</code>, <code>PortworxVolume</code>.
Also <code>Flexvolume</code> depending on the drivers and <code>VsphereVolume</code> works when pods are collocated.
You can read it all in Kubernetes docs regarding <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel="nofollow noreferrer">Volume Mode</a></p>

<p>An example PV for aws would look like this:</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: efs-volume
spec:
  capacity:
    storage: 15Gi # Doesn't really matter, as EFS does not enforce it anyway
  volumeMode: Filesystem
  accessModes:
    - ReadWriteMany
  mountOptions:
    - hard
    - nfsvers=4.1
    - rsize=1048576
    - wsize=1048576
    - timeo=300
    - retrans=2
  nfs:
    path: /
    server: fs-XXX.efs.eu-central-2.amazonaws.com
</code></pre>
