Amazon EKS — FSx CSI Driver
Amazon FSx provides high-performance file systems purpose-built for specific workloads. The FSx CSI drivers let you mount FSx file systems as persistent volumes in EKS.
FSx for Lustre
Lustre is a high-performance parallel file system ideal for HPC, ML training, and media processing. It can integrate directly with S3 for data hydration.
Installation
helm repo add aws-fsx-csi-driver https://kubernetes-sigs.github.io/aws-fsx-csi-driver
helm install aws-fsx-csi-driver aws-fsx-csi-driver/aws-fsx-csi-driver \
--namespace kube-system
StorageClass
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fsx-lustre
provisioner: fsx.csi.aws.com
parameters:
subnetId: subnet-0123456789abcdef0
securityGroupIds: sg-0123456789abcdef0
deploymentType: PERSISTENT_2
perUnitStorageThroughput: "200" # MB/s per TiB
dataCompressionType: LZ4
volumeBindingMode: WaitForFirstConsumer
S3 Integration
FSx for Lustre can automatically import data from S3 and export results back:
parameters:
subnetId: subnet-0123456789abcdef0
securityGroupIds: sg-0123456789abcdef0
s3ImportPath: s3://my-training-data
s3ExportPath: s3://my-training-results
autoImportPolicy: NEW_CHANGED_DELETED
deploymentType: SCRATCH_2
Use Case: ML Training
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: training-data
spec:
accessModes:
- ReadWriteMany
storageClassName: fsx-lustre
resources:
requests:
storage: 1200Gi # FSx Lustre minimum: 1.2 TiB
FSx for NetApp ONTAP
Enterprise NAS with NFS/SMB support — useful for workloads migrating from on-premises NetApp:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fsx-ontap
provisioner: fsx.csi.aws.com
parameters:
fileSystemId: fs-0123456789abcdef0
volumeType: ONTAP
ONTAP Features
| Feature | Description |
|---|---|
| Multi-protocol | NFS and SMB simultaneously |
| Snapshots | NetApp Snapshot (space-efficient) |
| Cloning | FlexClone (instant, zero-copy) |
| Tiering | Automatic data tiering to S3 |
| Deduplication | Inline deduplication and compression |
When to Use Which Storage
| Storage | Best For | Access Mode | Min Size |
|---|---|---|---|
| EBS (gp3) | Databases, single-pod apps | RWO | 1 GiB |
| EFS | Shared files, CMS, Fargate | RWX | Elastic |
| FSx Lustre | HPC, ML training, media | RWX | 1.2 TiB |
| FSx ONTAP | Enterprise NAS migration | RWO/RWX | 1 TiB |
| FSx OpenZFS | Low-latency shared storage | RWX | 64 GiB |
Best Practices
- Use FSx Lustre for ML training — direct S3 integration eliminates data copy
- Choose SCRATCH_2 for ephemeral workloads — cheaper, no data replication
- Choose PERSISTENT_2 for long-running storage — data replicated within AZ
- Consider data compression — LZ4 reduces storage costs with minimal CPU overhead
- Right-size your file system — FSx pricing is based on provisioned capacity, not used capacity