Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 1.37 KB

File metadata and controls

51 lines (44 loc) · 1.37 KB

Static Provisioning Example

This example shows how to make a pre-created FSx for Lustre filesystem mounted inside container.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: fsx-pv
spec:
  capacity:
    storage: 1200Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteMany
  mountOptions:
    - flock
  persistentVolumeReclaimPolicy: Recycle
  csi:
    driver: fsx.csi.aws.com
    volumeHandle: [FileSystemId]
    volumeAttributes:
      dnsname: [DNSName] 
      mountname: [MountName]

Replace volumeHandle with FileSystemId, dnsname with DNSName and mountname with MountName. You can get both FileSystemId, DNSName and MountName using AWS CLI:

>> aws fsx describe-file-systems

Deploy the Application

Create PV, persistent volume claim (PVC), and the pod that consumes the PV:

>> kubectl apply -f examples/kubernetes/static_provisioning/specs/pv.yaml
>> kubectl apply -f examples/kubernetes/static_provisioning/specs/claim.yaml
>> kubectl apply -f examples/kubernetes/static_provisioning/specs/pod.yaml

Check the Application uses FSx for Lustre filesystem

After the objects are created, verify that pod is running:

>> kubectl get pods

Also verify that data is written onto FSx for Luster filesystem:

>> kubectl exec -ti fsx-app -- tail -f /data/out.txt