# AWS FSx CSI Driver This add-on deploys the [Amazon FSx CSI Driver](https://docs.aws.amazon.com/eks/latest/userguide/fsx-csi.html) in to an Amazon EKS Cluster. ## Usage The [Amazon FSx CSI Driver](https://github.com/aws-ia/terraform-aws-eks-blueprints/tree/main/modules/kubernetes-addons/aws-fsx-csi-driver) can be deployed by enabling the add-on via the following. ```hcl enable_aws_fsx_csi_driver = true ``` ### Helm Chart customization You can optionally customize the Helm chart deployment using a configuration like the following. ```hcl enable_aws_fsx_csi_driver = true aws_fsx_csi_driver = { namespace = "aws-fsx-csi-driver" chart_version = "1.6.0" role_policies = } ``` You can find all available Helm Chart parameter values [here](https://github.com/kubernetes-sigs/aws-fsx-csi-driver/blob/master/charts/aws-fsx-csi-driver/values.yaml) ## Validation Once deployed, you will be able to see a number of supporting resources in the `kube-system` namespace. ```sh $ kubectl -n kube-system get deployment fsx-csi-controller NAME READY UP-TO-DATE AVAILABLE AGE fsx-csi-controller 2/2 2 2 4m29s $ kubectl -n kube-system get pods -l app=fsx-csi-controller NAME READY STATUS RESTARTS AGE fsx-csi-controller-56c6d9bbb8-89cpc 4/4 Running 0 3m30s fsx-csi-controller-56c6d9bbb8-9wnlh 4/4 Running 0 3m30s ``` ```sh $ kubectl -n kube-system get daemonset fsx-csi-node NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE fsx-csi-node 3 3 3 3 3 kubernetes.io/os=linux 5m27s $ kubectl -n kube-system get pods -l app=fsx-csi-node NAME READY STATUS RESTARTS AGE fsx-csi-node-7c5z6 3/3 Running 0 5m29s fsx-csi-node-d5q28 3/3 Running 0 5m29s fsx-csi-node-hlg8q 3/3 Running 0 5m29s ``` Create a StorageClass. Replace the SubnetID and the SecurityGroupID with your own values. More details [here](https://docs.aws.amazon.com/eks/latest/userguide/fsx-csi.html). ```sh $ cat < securityGroupIds: perUnitStorageThroughput: "200" deploymentType: PERSISTENT_1 mountOptions: - flock EOF ``` ```sh $ kubect describe storageclass fsx-sc Name: fsx-sc IsDefaultClass: No Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"name":"fsx-sc"},"mountOptions":null,"parameters":{"deploymentType":"PERSISTENT_1","perUnitStorageThroughput":"200","securityGroupIds":"sg-q1w2e3r4t5y6u7i8o","subnetId":"subnet-q1w2e3r4t5y6u7i8o"},"provisioner":"fsx.csi.aws.com"} Provisioner: fsx.csi.aws.com Parameters: deploymentType=PERSISTENT_1,perUnitStorageThroughput=200,securityGroupIds=sg-q1w2e3r4t5y6u7i8o,subnetId=subnet-q1w2e3r4t5y6u7i8o AllowVolumeExpansion: MountOptions: ReclaimPolicy: Delete VolumeBindingMode: Immediate Events: ``` Create a PVC. ```sh $ cat <