0

As we use readwritemany mode with pv to read and write the data from pod running on different node, but in case of aws we are using the ebs volume (i.e one ebs volume will attach to one ec2-instance at a time). So how we can achieve RWM with ebs volume?

Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
Khushboo Kumari
  • 145
  • 1
  • 14

1 Answers1

3

From the docs here AWSElasticBlockStore volume plugin does not support ReadWriteMany. Hence you can not use that for ReadWriteMany. Check that table for other feasible options which support ReadWriteMany.

Refer to this question for more details Kubernetes PVC with ReadWriteMany on AWS

If you want ReadWriteMany use Amazon EFS CSI Driver as documented here

Arghya Sadhu
  • 41,002
  • 9
  • 78
  • 107
  • Just want to understand if I have 3 replicas running on different ec2-instance then there will be 3 volume will be created (in case of aws dynamic pv creation) and attached to 3 ec2-instance and same data will be replicated to all the volume. – Khushboo Kumari Jul 23 '20 at 09:28
  • The volume can be mounted as read-write by a single node – Arghya Sadhu Jul 23 '20 at 09:43
  • but with second deployment no pod scheduled on the ec2-instance where the volume is attached then what will happen pod, will fail to create or a new volume will be created but that will not store data that is there is previous volume. Just want know how these cases are handle in eks or aws kubernetes deployment. Can you redirect me to any document which I can refer for such cases. – Khushboo Kumari Jul 23 '20 at 11:54
  • Use EFS ..https://aws.amazon.com/premiumsupport/knowledge-center/eks-persistent-storage/ – Arghya Sadhu Jul 23 '20 at 15:13