Skip to content

Commit 97f6a21

Browse files
athavrRaj Athavale
andauthored
update: Better explain YAML files for the Storage labs (#1545)
Co-authored-by: Raj Athavale <athavr@amazon.com>
1 parent f42d649 commit 97f6a21

6 files changed

Lines changed: 42 additions & 32 deletions

File tree

website/docs/fundamentals/storage/efs/deployment-with-efs.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ sidebar_position: 30
55

66
Now that we understand the EFS storage class for Kubernetes, let's create a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) and modify the UI component to mount this volume.
77

8-
First, let's examine the `efspvclaim.yaml` file which defines a PersistentVolumeClaim requesting 5GB of storage from the `efs-sc` storage class we created earlier:
8+
First, let's examine the `efspvclaim.yaml` file:
99

10-
```file
11-
manifests/modules/fundamentals/storage/efs/deployment/efspvclaim.yaml
12-
```
10+
::yaml{file="manifests/modules/fundamentals/storage/efs/deployment/efspvclaim.yaml" paths="kind,spec.storageClassName,spec.resources.requests.storage"}
11+
12+
1. The resource being defined is a PersistentVolumeClaim
13+
2. This refers to the `efs-sc` storage class we created earlier
14+
3. We are requesting 5GB of storage
1315

1416
Now we'll update the UI component to reference the EFS PVC:
1517

website/docs/fundamentals/storage/efs/efs-csi-driver.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ $ echo $EFS_ID
4242
fs-061cb5c5ed841a6b0
4343
```
4444

45-
Next, we'll create a [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/) object configured to use our pre-provisioned EFS file system and [EFS Access points](https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html) in provisioning mode.
45+
Next, we'll create a [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/) object configured to use our pre-provisioned EFS file system and [EFS Access points](https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html) in provisioning mode using the `efsstorageclass.yaml` file.
4646

47-
Using Kustomize, we'll create the storage class and inject the `EFS_ID` environment variable into the `filesystemid` parameter:
47+
::yaml{file="manifests/modules/fundamentals/storage/efs/storageclass/efsstorageclass.yaml" paths="provisioner,parameters.fileSystemId"}
48+
49+
1. Set the `provisioner` parameter to `efs.csi.aws.com` for the EFS CSI provisioner
50+
2. Inject `EFS_ID` environment variable into the `filesystemid` parameter
4851

49-
```file
50-
manifests/modules/fundamentals/storage/efs/storageclass/efsstorageclass.yaml
51-
```
5252

5353
Apply the kustomization:
5454

website/docs/fundamentals/storage/fsx-for-netapp-ontap/deployment-with-fsxn.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ sidebar_position: 30
55

66
Now that we understand the FSx for NetApp ONTAP storage class for Kubernetes, let's create a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) and modify the UI component to mount this volume.
77

8-
First, let's examine the `fsxnpvclaim.yaml` file which defines a PersistentVolumeClaim requesting 5GB of storage from the `fsxn-sc-nfs` storage class we created earlier:
98

10-
```file
11-
manifests/modules/fundamentals/storage/fsxn/deployment/fsxnpvclaim.yaml
12-
```
9+
First, let's examine the `fsxnpvclaim.yaml` file:
10+
11+
::yaml{file="manifests/modules/fundamentals/storage/fsxn/deployment/fsxnpvclaim.yaml" paths="kind,spec.storageClassName,spec.resources.requests.storage"}
12+
13+
1. The resource being defined is a PersistentVolumeClaim
14+
2. This refers to the `fsxn-sc-nfs` storage class we created earlier
15+
3. We are requesting 5GB of storage
16+
1317

1418
Now we'll update the UI component to reference the FSx for NetApp ONTAP PVC:
1519

website/docs/fundamentals/storage/fsx-for-netapp-ontap/fsxn-csi-driver.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,13 @@ The FSx for NetApp ONTAP CSI driver supports both dynamic and static provisionin
4646
- **Dynamic provisioning**: The driver creates volumes on the existing FSx for NetApp ONTAP file system. This requires an existing AWS FSx for NetApp ONTAP file system that must be specified in the StorageClass parameters.
4747
- **Static provisioning**: This also requires a pre-created AWS FSx for NetApp ONTAP file system, which can then be mounted as a volume inside a container using the driver.
4848

49-
Next, we'll create a TridentBackendConfig object configured to use the pre-provisioned FSx for NetApp ONTAP file system. We'll be using Kustomize to create the backend and inject the following environment variables:
49+
Next, we'll create a TridentBackendConfig object configured to use the pre-provisioned FSx for NetApp ONTAP file system. For this, lets examine the `fsxn-backend-nas.yaml` file we'll be using to create the backend:
5050

51-
- `FSXN_ID` in the parameter `fsxFilesystemID` - This is the FSxN filesystem we're going to connect our CSI driver to.
52-
- `FSXN_SECRET_ARN` in the parameter `credentials.name` - This is the secret ARN with the credentials to connect to the ONTAP API interface.
51+
::yaml{file="manifests/modules/fundamentals/storage/fsxn/backend/fsxn-backend-nas.yaml" paths="spec.svm,spec.aws.fsxFilesystemID,spec.credentials.name"}
5352

54-
```file
55-
manifests/modules/fundamentals/storage/fsxn/backend/fsxn-backend-nas.yaml
56-
```
53+
1. Inject `EKS_CLUSTER_NAME` environment variable into the `svm` parameter - This is the Storage Virtual Machine name
54+
2. Inject `FSXN_ID` environment variable into the `fsxFilesystemID` parameter - This is the FSxN filesystem we're going to connect our CSI driver to
55+
3. Inject `FSXN_SECRET_ARN` environment variable into the `credentials.name` parameter - This is the ARN of a secret stored securely in AWS Secrets Manager, which contains the credentials to connect to the ONTAP API interface
5756

5857
Apply the backend configuration:
5958

@@ -71,11 +70,12 @@ NAME BACKEND NAME BACKEND UUID P
7170
backend-tbc-ontap-nas tbc-ontap-nas bbae8686-25e4-4fca-a4c7-7ab664c7db9c Bound Success
7271
```
7372

74-
Now let's create the [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/) object:
73+
Now let's create the [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/) object using the `fsxnstorageclass.yaml` file:
7574

76-
```file
77-
manifests/modules/fundamentals/storage/fsxn/storageclass/fsxnstorageclass.yaml
78-
```
75+
::yaml{file="manifests/modules/fundamentals/storage/fsxn/storageclass/fsxnstorageclass.yaml" paths="provisioner,parameters.backendType"}
76+
77+
1. Set the `provisioner` parameter to `csi.trident.netapp.io` for the Amazon FSx for NetApp ONTAP CSI provisioner
78+
2. Set the `backendType` to `ontap-nas` to indicate that the ONTAP NAS driver should be used for accessing the ONTAP volume
7979

8080
Apply the StorageClass:
8181

website/docs/fundamentals/storage/fsx-for-openzfs/deployment-with-fsxz.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ sidebar_position: 30
55

66
Now that we understand the FSx for OpenZFS storage class for Kubernetes, let's create a [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) and modify the UI component to mount this volume.
77

8-
First, let's examine the `fsxzpvcclaim.yaml` file which defines a PersistentVolumeClaim requesting 5GB of storage from the `fsxz-vol-sc` storage class we created earlier:
8+
First, let's examine the `fsxzpvcclaim.yaml` file:
99

10-
```file
11-
manifests/modules/fundamentals/storage/fsxz/deployment/fsxzpvcclaim.yaml
12-
```
10+
::yaml{file="manifests/modules/fundamentals/storage/fsxz/deployment/fsxzpvcclaim.yaml" paths="kind,spec.storageClassName,spec.resources.requests.storage"}
11+
12+
1. The resource being defined is a PersistentVolumeClaim
13+
2. This refers to the `fsxz-vol-sc` storage class we created earlier
14+
3. We are requesting 1GB of storage
1315

1416
Now we'll update the UI component to reference the FSx for OpenZFS PVC:
1517

@@ -47,7 +49,7 @@ A PersistentVolume (PV) has been automatically created to fulfill our Persistent
4749
```bash
4850
$ kubectl get pv
4951
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
50-
pvc-342a674d-b426-4214-b8b6-7847975ae121 5Gi RWX Delete Bound ui/fsxz-claim fsxz-vol-sc 2m33s
52+
pvc-342a674d-b426-4214-b8b6-7847975ae121 1Gi RWX Delete Bound ui/fsxz-claim fsxz-vol-sc 2m33s
5153
```
5254

5355
Let's examine the details of our PersistentVolumeClaim (PVC):

website/docs/fundamentals/storage/fsx-for-openzfs/fsxz-csi-driver.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,13 @@ fsvol-0123456789abcdef0
6363

6464
Next, we'll create a [StorageClass](https://kubernetes.io/docs/concepts/storage/storage-classes/) object configured to use our pre-provisioned FSx for OpenZFS file system and create child volumes in provisioning mode.
6565

66-
Using Kustomize, we'll create the storage class and inject the `ROOT_VOL_ID`, `VPC_CIDR`, and `EKS_CLUSTER_NAME` environment variables into the `ParentVolumeId`, `NfsExports`, and `Name` parameters respectively:
66+
For this, let's examine the `fsxzstorageclass.yaml` file:
6767

68-
```file
69-
manifests/modules/fundamentals/storage/fsxz/storageclass/fsxzstorageclass.yaml
70-
```
68+
::yaml{file="manifests/modules/fundamentals/storage/fsxz/storageclass/fsxzstorageclass.yaml" paths="provisioner,parameters.ParentVolumeId, parameters.NfsExports"}
69+
70+
1. Set the `provisioner` parameter to `fsx.openzfs.csi.aws.com` for the FSx for OpenZFS CSI provisioner
71+
2. Assign the `ROOT_VOL_ID` environment variable to the `ParentVolumeId` parameter
72+
3. Inject the `VPC_CIDR` environment variable into the `NfsExports` parameter
7173

7274
Apply the kustomization:
7375

0 commit comments

Comments
 (0)