This workshop has been deprecated and archived. The new Amazon EKS Workshop is now available at www.eksworkshop.com.
On Amazon EKS, the open-source EFS Container Storage Interface (CSI) driver is used to manage the attachment of Amazon EFS volumes to Kubernetes Pods.
We are going to deploy the driver using the stable release:
kubectl apply -k "github.com/kubernetes-sigs/aws-efs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.3"
Verify pods have been deployed:
kubectl get pods -n kube-system
Should return new pods with csi driver:
Next we will deploy a persistent volume using the EFS created.
mkdir ~/environment/efs cd ~/environment/efs wget https://eksworkshop.com/beginner/190_efs/efs.files/efs-pvc.yaml
We need to update this manifest with the EFS ID created:
sed -i "s/EFS_VOLUME_ID/$FILE_SYSTEM_ID/g" efs-pvc.yaml
And then apply:
kubectl apply -f efs-pvc.yaml
Next, check if a PVC resource was created. The output from the command should look similar to what is shown below, with the STATUS field set to Bound.
kubectl get pvc -n storage
A PV corresponding to the above PVC is dynamically created. Check its status with the following command.
kubectl get pv