Setting Up a Persistent Volume Using EFS
How to set up a persistent volume using EFS
Configure an Amazon EFS volume in DuploCloud and connect it to Kubernetes workloads through a Persistent Volume Claim (PVC), allowing your workloads to share storage across pods and persist data across container restarts and redeployments.
Step 1: Create an EFS in DuploCloud
In the DuploCloud Portal, navigate to Cloud Services → Storage → EFS.
Click Add. The Add Elastic File System pane displays.

Add Elastic File System pane Complete the fields as follows:
Name
Enter a name for the EFS.
Performance Mode
Select General Purpose.
Throughput Mode
Select Bursting.
Enable Backup
Select Disabled.
Enable Encryption
Select Enable.
Click Submit.
Step 2: Create a Storage Class
In the DuploCloud Portal, go to Kubernetes → Storage → Storage Class.
Click Add. The Add Kubernetes Storage Class pane displays.

Add Kubernetes Storage Class pane Complete the fields as follows:
Name
Enter a name for the storage class.
Provisioner
Select efs.csi.aws.com.
Reclaim Policy
Select Delete.
Volume Binding Mode
Select Immediate.
Parameters
Click Set EFS parameters, and in the File System Id field, select the EFS created in Step 1.
Click Add.
Step 3: Create a Persistent Volume Claim (PVC)
In the DuploCloud Portal, navigate to Kubernetes → Storage → Persistent Volume Claims.
Click Add. The Add Kubernetes Persistent Volume Claim pane displays.

Add Kubernetes Persistent Volume Claim pane Complete the fields as follows:
Name
Enter a name for the PVC.
Storage Class Name
Select the storage class created in Step 2.
Volume Name
Enter the same name you entered for the PVC in the Name field.
Volume Mode
Select Filesystem.
Access Modes
Select ReadWriteMany.
Resources
Enter the storage size you need (default is 10Gi).
Click Add.
Step 4: Update Service Configuration
Update your Service configuration to include the new PVC.
Navigate to Kubernetes -> Services.
For the Service that needs the volume, click on the menu icon (
) and select Edit.Click Next.
Update the Volumes field as shown in the example YAML snippet below.

Edit Service pane with PVC configurations in the Volumes field
Click Update to apply the changes to the Service.
Restart the Service and ensure the Pod restarts and mounts the volume successfully.
Last updated
Was this helpful?

