I have the following persistent volume and volume claim:
kind: PersistentVolume
apiVersion: v1
metadata:
name: kloud
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
server: 172.21.51.42
path: /
readOnly: false
and:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: kloud
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Gi
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:
$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE
kloud Pending gp2 8s
If I change the mode to ReadWriteOnce
, it works as expected and won't hang.
$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE
kloud Bound pvc-c9a01bff-94d0-11e7-8ed4-0aec4a0f734a 100Gi RWO gp2
Is there something I missing? How can I create a RWX claim with k8s and EFS?