Reputation: 63
I want to enable ReadWriteMany
access mode in EKS Persistent Volume. Came accross io2 volumetype by EBS AWS. SO using io2 type volume
storage_class.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: io2
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
parameters:
type: io2
iopsPerGB: "200"
persistent_volume.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv
spec:
accessModes:
- ReadWriteMany
awsElasticBlockStore:
fsType: ext4
volumeID: <IO2 type volume ID>
capacity:
storage: 50Gi
storageClassName: io2
volumeMode: Filesystem
pv_claim.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 50Gi
volumeMode: Filesystem
volumeName: pv
storageClassName: io2
When 3 replicas of pods are deployed across 2 nodes in same AZ, 2 replicas (on one node) successfully mounts to the io2 volume and starts running but third replica on another node does not mount to volume.
Error -> Unable to attach or mount volumes: unmounted volumes['']
Also, I want to understand if io2 type volumes are meant to be mount to multiple nodes(EC2 instances in same AZ as volume) in EKS with ReadWriteMany access mode.
Upvotes: 4
Views: 4823
Reputation: 763
I just checked the status of the Feature Request that Matt mentioned, and it looks like they finally implemented it! So, that is definitely one option to solve the ReadWriteMany request. There are a few other possible solutions:
Upvotes: 2
Reputation: 8152
I looks like there is open feature request on kubernetes-sigs/aws-ebs-csi-driver repo but no progress on this. So I guess that it is not supported at the moment but you can monitor the issue for updates.
Upvotes: 5