You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**WARNING**: This driver is in pre ALPHA currently. This means that there may potentially be backwards compatible breaking changes moving forward. Do NOT use this driver in a production environment in its current state.
@@ -9,97 +7,200 @@
9
7
## Amazon File Cache CSI Driver
10
8
### Overview
11
9
12
-
The [Amazon File Cache]() Container Storage Interface (CSI) Driver provides a [CSI]() interface used by container orchestrators to manage the lifecycle of Amazon file cache volumes.
13
-
14
-
This driver is in alpha stage. Basic volume operations that are functional include NodePublishVolume/NodeUnpublishVolume.
10
+
The [Amazon File Cache](https://docs.aws.amazon.com/fsx/latest/FileCacheGuide/) Container Storage Interface (CSI) Driver provides a [CSI](https://github.com/container-storage-interface/spec/blob/master/spec.md) interface used by container orchestrators to manage the lifecycle of Amazon file cache volumes.
Currently only static provisioning is supported. With static provisioning, a file cache should be created manually, then it could be mounted inside container as a persistence volume (PV) using File Cache CSI Driver.
* Static provisioning - Amazon File Cache needs to be created manually first, then it could be mounted inside container as a volume using the Driver.
46
-
* Dynamic provisioning (currently not supported) - uses persistent volume claim (PVC) to let Kubernetes create the Amazon File Cache for you and consumes the volume from inside container.
40
+
* Dynamic provisioning - uses persistent volume claim (PVC) to let Kubernetes create the Amazon File Cache for you and consumes the volume from inside container.
47
41
* Mount options - mount options can be specified in storageclass to define how the volume should be mounted.
48
42
49
43
**Notes**:
50
44
* For dynamically provisioned volumes, only one subnet is allowed inside a storageclass's `parameters.subnetId`. This is a [limitation](https://docs.aws.amazon.com/fsx/latest/APIReference/API_FileCacheCreating.html#FSx-Type-FileCacheCreating-SubnetIds) that is enforced by Amazon File Cache.
51
45
52
46
### Installation
53
-
#### Set up driver permission
54
-
The driver requires IAM permission to talk to Amazon File Cache service to create/delete the filecache on user's behalf. There are several methods to grant driver IAM permission:
55
-
* Using secret object - create an IAM user with proper permission, put that user's credentials in [secret manifest](../deploy/kubernetes/secret.yaml) then deploy the secret.
#### 1. Set a few variables to use in the remaining steps. Replace `my-csi-filecache` with the name of the test cluster you want to create and `region-code` with the AWS Region that you want to create your test cluster in.
48
+
```shell
49
+
export cluster_name=my-csi-filecache
50
+
export region_code=region-code
61
51
```
62
52
63
-
* Using worker node instance profile - grant all the worker nodes with proper permission by attach policy to the instance profile of the worker.
The driver requires IAM permission to talk to Amazon File Cache service to create/delete the filecache on user's behalf. There are several methods to grant driver IAM permission:
69
65
70
-
#### Deploy driver
71
-
```sh
72
-
kubectl apply -k deploy/kubernetes/base/
66
+
* Create a Kubernetes service account for the driver and attach the `AmazonFSxFullAccess` AWS-managed policy to the service account with the following command. If your cluster is in the AWS GovCloud (US-East) or AWS GovCloud (US-West) AWS Regions, then replace `arn:aws:` with `arn:aws-us-gov:`.
Alternatively, you could also install the driver using helm:
81
182
82
183
184
+
TODO: Add helm installation option
185
+
```sh
83
186
84
-
------------------
85
-
187
+
```
86
188
87
189
### Examples
88
190
Before the example, you need to:
89
191
* Get yourself familiar with how to setup Kubernetes on AWS and [create Anmazon File Cache](https://docs.aws.amazon.com/fsx/latest/FileCacheGuide/getting-started.html) if you are using static provisioning.
90
192
* When creating Amazon File Cache, make sure its VPC is accessible from Kuberenetes cluster's VPC and network traffic is allowed by security group.
91
-
* For FSx for Lustre VPC, you can either create an Amazon File Cache inside the same VPC as Kubernetes cluster or using VPC peering.
92
-
* For security group, make sure port 988 is allowed for the security groups that are attached the lustre filesystem ENI.
193
+
* For Amazon File Cache VPC, you can either create an Amazon File Cache inside the same VPC as Kubernetes cluster or using VPC peering.
194
+
* For security group, make sure port 988 is allowed for the security groups that are attached the file cache ENI.
93
195
* Install Amazon File Cache CSI driver following the [Installation](README.md#Installation) steps.
* [Accessing the filesystem from multiple pods](examples/kubernetes/multiple_pods/README.md)
200
+
* [Accessing the file cache from multiple pods](examples/kubernetes/multiple_pods/README.md)
99
201
100
202
## Development
101
203
102
-
----
103
204
Please go through [CSI Spec](https://github.com/container-storage-interface/spec/blob/master/spec.md) and [General CSI driver development guideline](https://kubernetes-csi.github.io/docs/Development.html) to get some basic understanding of CSI driver before you start.
104
205
105
206
### Requirements
@@ -113,6 +214,6 @@ To execute all unit tests, run: `make test`
113
214
114
215
## License
115
216
116
-
----
217
+
117
218
This library is licensed under the Apache 2.0 License.
Copy file name to clipboardExpand all lines: examples/kubernetes/dynamic_provisioning/README.md
-3Lines changed: 0 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,5 @@
1
1
## Dynamic Provisioning Example
2
2
3
-
---
4
-
5
-
*~Not yet supported~*
6
3
7
4
This example shows how to create an Amazon File Cache using persistence volume claim (PVC) and consumes it from a pod. Please see the [CreateFileCache API Reference](https://docs.aws.amazon.com/fsx/latest/APIReference/API_CreateFileCache.html#FSx-CreateFileCache-request-DataRepositoryAssociations) for more information.
Copy file name to clipboardExpand all lines: examples/kubernetes/multiple_pods/README.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
## Multiple Pods Read Write Many
2
2
3
-
---
4
-
5
3
This example shows how to create a dynamically provisioned Amazon File Cache PV and access it from multiple pods with ReadWriteMany access mode. If you are using static provisioning, following steps to setup static provisioned PV with access mode set to ReadWriteMany and the rest of steps of consuming the volume from pods are similar.
0 commit comments