Amazon EFS CSI
External
- https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html
- https://github.com/kubernetes-sigs/aws-efs-csi-driver
Internal
Overview
Amazon EFS CSI driver makes possible consuming an EFS file system from an EKS pod via a standard Persistent Volume Claim/Persistent Volume mechanism.
The overall process consists in the following steps:
- Deploy the Amazon EFS CSI driver to an Amazon EKS cluster.
- Provision the EFS file system statically. Only static volume provisioning is supported, which means that the EFS file system must be created outside the EKS cluster before being used.
- Configure and deploy the corresponding Storage Class. Example here.
- Configure a Persistent Volume with the EFS file system ID and deploy it. Example here.
- Configure and deploy the corresponding Persistent Volume Claim. Example here.
This flow is based on https://github.com/kubernetes-sigs/aws-efs-csi-driver/tree/master/examples/kubernetes/multiple_pods.
There is a one-to-one relationship between the Persistent Volume and the EFS file system.
TODO
- Explain how a pod gets the same file system share all the time.
- What happens if more than one PV is made available under the same storage class - how I can insure that multiple pods get associated with the same persistent volume.
EFS CSI Driver
Is deployed as a CSIDriver and a DaemonSet.
EFS-based Persistent Volume
There is a one-to-one relationship between the Persistent Volume and the EFS file system.
Persistent Volume Size
Because Amazon EFS is an elastic file system, it does not enforce any file system capacity limits. The actual storage capacity value in persistent volumes and persistent volume claims is not used when creating the file system. However, since storage capacity is a required field in Kubernetes, it must be specified as a valid value. This value does not limit the size of the Amazon EFS file system. Additional external documentation: https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html
Also see: