Preparing the files Storage
About this task
The lnk-server deployment requires a persistent volume mounted at /opt/data/hipfiles.
Complete the following steps to create the EFS access point, Persistent Volume (PV), and Persistent Volume Claim (PVC).
Procedure
-
Create the EFS access point for the files volume.
EFS_AP_FILES=$(aws efs create-access-point \ --file-system-id $EFS_FS_ID \ --posix-user Uid=1000,Gid=1000 \ --root-directory "Path=/opt/data/hipfiles,CreationInfo={OwnerUid=1000,OwnerGid=1000,Permissions=777}" \ --region $AWS_REGION \ --query 'AccessPointId' \ --output text) -
Create the Persistent Volume (PV) for the files
storage.
echo " apiVersion: v1 kind: PersistentVolume metadata: name: link-files-pv spec: capacity: storage: 5Gi volumeMode: Filesystem accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain storageClassName: efs-sc csi: driver: efs.csi.aws.com volumeHandle: $EFS_FS_ID::$EFS_AP_FILES " | kubectl apply -f - -
Create the Persistent Volume Claim (PVC) and bind it to
the PV.
echo " apiVersion: v1 kind: PersistentVolumeClaim metadata: name: link-files-pvc spec: accessModes: - ReadWriteMany storageClassName: efs-sc volumeName: link-files-pv resources: requests: storage: 5Gi " | kubectl apply -f - -
Verify that the PVC was created and successfully bound to the PV.
kubectl get pvc link-files-pvcExample output:NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE link-files-pvc Bound link-files-pv 5Gi RWX efs-sc <unset> 58s