<p>I have the following persistent volume and volume claim:</p>

<pre><code>kind: PersistentVolume
apiVersion: v1
metadata:
  name: kloud
spec:
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    server: 172.21.51.42
    path: /
    readOnly: false
</code></pre>

<p>and:</p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: kloud
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 100Gi
</code></pre>

<p>The nfs server is AWS EFS. I specifically ssh to k8s master and checked that I can manually mount the NFS volume. But when I create the volume and the claim with kubectl it indefinitely hangs there pending:</p>

<pre><code>$ kubectl get pvc
NAME      STATUS    VOLUME    CAPACITY   ACCESSMODES   STORAGECLASS   AGE
kloud     Pending                                      gp2            8s
</code></pre>

<p>If I change the mode to <code>ReadWriteOnce</code>, it works as expected and won't hang.</p>

<pre><code>$ kubectl get pvc
NAME      STATUS    VOLUME                                     CAPACITY   ACCESSMODES   STORAGECLASS   AGE
kloud     Bound     pvc-c9a01bff-94d0-11e7-8ed4-0aec4a0f734a   100Gi      RWO           gp2       
</code></pre>

<p>Is there something I missing? How can I create a RWX claim with k8s and EFS?</p>

<p>You will need to setup the EFS-provisioner in your cluster. Mounting EFS is still not supported by the default Kubernetes distribution and as such you need this extension: <a href="https://github.com/kubernetes-incubator/external-storage/tree/master/aws/efs" rel="noreferrer">https://github.com/kubernetes-incubator/external-storage/tree/master/aws/efs</a></p>

<p>You'll need to set up it's storage class:</p>

<pre><code>    kind: StorageClass
apiVersion: storage.k8s.io/v1beta1
metadata:
  name: aws-efs
provisioner: example.com/aws-efs
</code></pre>

<p>And then write PVC's of the type:</p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: efs
  annotations:
    volume.beta.kubernetes.io/storage-class: "aws-efs"
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Mi
</code></pre>

<p>Don't mind the storage size, although it's not used by EFS, Kubernetes requires you to set something there for it to work.</p>
