Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable ReadWriteMany access mode using an io2 EBS Volume

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.

like image 701
ateet Avatar asked Sep 06 '25 03:09

ateet


1 Answers

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.

like image 172
Matt Avatar answered Sep 07 '25 19:09

Matt