I needed an EKS cluster that supports Persistent Volumes with Access Mode ReadWriteMany.

Therefore I updated my EKS Terraform template to support adding the EFS CSI driver if needed.

Usage is pretty simple, you’ll just have to add enable_efs = true to your Terraform cluster definition.

This will also create an EFS file system (storage will by provisioned dynamically depending on the requested persistent volume).

You’ll just have to retrieve the file system ID from your AWS console and use it to create a new K8S storage class:

kind: StorageClass
apiVersion: storage.k8s.io/v1
  name: efs-sc
provisioner: efs.csi.aws.com
  provisioningMode: efs-ap
  fileSystemId: <MY_FILESYSTEM_ID>
  directoryPerms: "700"

Once created, you can reference the new storage class in the persistent volumes that you’re about to add.