Skip to content

Commit b36df34

Browse files
committed
Updated after review.
1 parent 0728e85 commit b36df34

File tree

2 files changed

+47
-37
lines changed
  • EKS
    • Backup-EKS-Applications-with-Trident-Protect
    • PV-Migrate-with-Trident-Protect

2 files changed

+47
-37
lines changed

EKS/Backup-EKS-Applications-with-Trident-Protect/README.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This is a sample for setting up your Kubernetes application to be backed up by Trident Protect.
44

55
## Prerequisites:
6-
The following items should be already be deployed before install Trident Protect.
6+
The following items should already be deployed before installing Trident Protect.
77
- An AWS EKS cluster. If you don't already have one, refer to the [FSx for NetApp ONTAP as persistent storage](https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/EKS/FSxN-as-PVC-for-EKS)
88
GitHub repo for an example of how to not only deploy an EKS cluster, but also deploy an FSx for ONTAP file system with
99
Trident installed with its backend and storage classes configured. If you follow it, it will provide the rest of the prerequisites listed below.
@@ -15,65 +15,70 @@ Trident installed with its backend and storage classes configured. If you follow
1515
- helm installed - Refer to [this documentation](https://helm.sh/docs/intro/install/) on how to install it.
1616

1717
## Preparation
18-
The following are the steps required before you can use Trident Protect to backup or migrate your EKS application.
18+
The following are the steps required before you can use Trident Protect to backup your EKS application.
1919

2020
1. [Configure Trident Backend](#1-make-sure-trident-backend-is-configured-correctly)
2121
1. [Configure Storage Classes for Trident storage types](#2-make-sure-trident-csi-drivers-for-nas-and-san-are-installed)
2222
1. [Install the Kubernetes external snapshotter](#3-install-the-kubernetes-external-snapshotter)
23-
1. [Create VolumeStoraeClass for Storage Provider](#4-create-volumestorageclasses-for-your-storage-provider)
23+
1. [Create VolumeStorageClass for Storage Provider](#4-create-volumestorageclasses-for-your-storage-provider)
2424
1. [Install Trident Protect](#5-install-trident-protect)
2525
1. [Create S3 Bucket](#6-create-private-s3-bucket-for-backup-data-and-metadata)
2626
1. [Create Kubernetes secret for S3 bucket](#7-create-a-kubernetes-secret-for-the-s3-bucket)
2727

2828
### 1. Make sure Trident Backend is configured correctly
2929

30-
Run the following kubectl commands to confirm that the TridentBackendConfig for ontap-san and ontap-nas exist and are configured correctly. These commands should output the name of any matching TridentBackendConfigs:
30+
Depending on whether you are using block (SAN), or NAS (NFS), or both, will dictate which TridentBackendConfig you need configured.
3131

3232
#### SAN Backend
33+
Run the following command to confirm that the TridentBackendConfig for ontap-san exists and is configured correctly:
3334
```bash
3435
kubectl get tbc -n trident -o jsonpath='{.items[?(@.spec.storageDriverName=="ontap-san")].metadata.name}'
3536
```
3637

3738
### NAS Backend
39+
Run the following command to confirm that the TridentBackendConfig for ontap-nas exists and is configured correctly:
3840
```bash
3941
kubectl get tbc -n trident -o jsonpath='{.items[?(@.spec.storageDriverName=="ontap-nas")].metadata.name}'
4042
```
4143

42-
If no matching TridentBackendConfig resources are found, you will need to create them. Refer to the prerequisites section above for more information on how to do that.
44+
If no matching TridentBackendConfig resources are found, you will need to create the ones you need. Refer to the prerequisites section above for more information on how to do that.
4345

44-
### 2. Make Sure Trident CSI Drivers for NAS and SAN are Installed
45-
Run the following kubectl commands to check that a storage class exist for both SAN and NAS type storage.
46+
### 2. Make Sure the required Trident Storage Classes are installed.
47+
Depending on whether you are using block (SAN), or NAS (NFS), or both, will dictate which Storage Classes you need to have configured.
4648

4749
#### SAN StorageClass
48-
Checks for storage classes in Kubernetes that use 'ontap-san' as their backend type. It outputs the name of any matching StorageClass:
50+
Run the following command to check that the storage class in Kubernetes that use 'ontap-san' as their backend type has been installed. It outputs the name of any matching StorageClass:
4951
```bash
5052
kubectl get storageclass -o jsonpath='{.items[?(@.parameters.backendType=="ontap-san")].metadata.name}'
5153
```
5254

5355
#### NAS Driver
54-
Checks for storage classes in Kubernetes that use 'ontap-nas' as their backend type. It outputs the name of any matching StorageClass:
56+
Run the following command to check that the storage class in Kubernetes that use 'ontap-nas' as their backend type has been installed. It outputs the name of any matching StorageClass:
5557
```bash
5658
kubectl get storageclass -o jsonpath='{.items[?(@.parameters.backendType=="ontap-nas")].metadata.name}'
5759
```
5860

59-
If one or both are not found, you will need to create them. Refer to the prerequisites section above for more information on how to do that.
61+
If one, or both, are not found, you will need to create them. Refer to the prerequisites section above for more information on how to do that.
6062

6163
### 3. Install the Kubernetes External Snapshotter
6264
Trident Protect depends on the Snapshotter CRDs and controller. Please run the following commands to install the Kubernetes External Snapshotter.
63-
For more information please consult the official [external-snapshotter documentation](https://github.com/kubernetes-csi/external-snapshotter).
65+
For more information, please consult the official [external-snapshotter documentation](https://github.com/kubernetes-csi/external-snapshotter).
6466

6567
```bash
66-
kubectl kustomize https://github.com/kubernetes-csi/external-snapshotter/client/config/crd | kubectl create -f -
68+
git clone https://github.com/kubernetes-csi/external-snapshotter
69+
cd external-snapshotter/
70+
kubectl kustomize client/config/crd | kubectl create -f -
6771
kubectl -n kube-system kustomize deploy/kubernetes/snapshot-controller | kubectl create -f -
68-
kubectl kustomize https://github.com/kubernetes-csi/external-snapshotter/deploy/kubernetes/csi-snapshotter | kubectl create -f -
72+
kubectl kustomize deploy/kubernetes/csi-snapshotter | kubectl create -f -
73+
cd ..
6974
```
7075

7176
### 4. Create VolumeSnapshotClasses for your storage provider.
72-
Trident Protect requires a VolumeSnapshotClass to be created for the storage CSI driver you are using. You can use the following command to see if you already one defined:
77+
Trident Protect requires a VolumeSnapshotClass to be created for the storage CSI driver you are using. You can use the following command to see if you already have one defined:
7378
```
7479
kubectl get VolumeSnapshotClass
7580
```
76-
If you don't have one defined you'll need to create one. Here is an example of a yaml file that defines a VolumeSnapshotClass for Trident CSI driver:
81+
If you don't have one defined, you'll need to create one. Here is an example of a yaml file that defines a VolumeSnapshotClass for Trident CSI driver:
7782
```
7883
apiVersion: snapshot.storage.k8s.io/v1
7984
kind: VolumeSnapshotClass
@@ -124,7 +129,7 @@ Replace:
124129
- `<aws_region>` the AWS region you want the bucket to reside.
125130

126131
### 7. Create a Kubernetes secret for the S3 bucket
127-
If required, create a service account within AWS IAM that has rights to read and write to the S3 bucket create. Then, create an access key.
132+
If required, create a service account within AWS IAM that has rights to read and write to the S3 bucket created above. Then, create an access key.
128133
Once you have the Access Key Id and Secret Access Key, create a Kubernetes secret with the following command:
129134

130135
```markdown
@@ -237,7 +242,7 @@ To check the status of the backup run the following command:
237242
kubectl get backup -n <APP NAMESPACE> <APP BACKUP NAME>
238243
```
239244

240-
- If status is `Completed` Backup completed successfully .
245+
- If status is `Completed` Backup completed successfully.
241246
- If status is `Running` run the command again in a few minutes to check status.
242247
- If status is `Failed` the error message will give you a clue as to what went wrong. If you need more information, try using `kubectl describe` instead of `kubectl get` to get more information.
243248

@@ -247,7 +252,7 @@ There are two ways to restore a backup:
247252
- [Restore backup to a different namespace](#restore-backup-to-a-different-namespace)
248253

249254
### Restore backup to the same namespace
250-
To restore your application in the same namespace, create an `BackupInPlaceRestore` configuration file named `trident-restore-inplace.yaml` with the following contents:
255+
To restore your application in the same namespace, create a `BackupInPlaceRestore` configuration file named `trident-restore-inplace.yaml` with the following contents:
251256

252257
```markdown
253258
apiVersion: protect.trident.netapp.io/v1

EKS/PV-Migrate-with-Trident-Protect/README.md

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Migrate Kubernates PVs with Trident Protect
1+
# Migrate Kubernetes PVs with Trident Protect
22

3-
This is a sample for setting up your Kubernetes application to be migrated to a different storage class using Trident Protect.
3+
This is a sample for setting up your Kubernetes application to be migrated from one storage class to another using Trident Protect.
44

55
## Prerequisites:
6-
The following items should be already be deployed before install Trident Protect.
6+
The following items should already be deployed before installing Trident Protect.
77
- An AWS EKS cluster. If you don't already have one, refer to the [FSx for NetApp ONTAP as persistent storage](https://github.com/NetApp/FSx-ONTAP-samples-scripts/tree/main/EKS/FSxN-as-PVC-for-EKS)
88
GitHub repo for an example of how to not only deploy an EKS cluster, but also deploy an FSx for ONTAP file system with
99
Trident installed with its backend and storage classes configured. If you follow it, it will provide the rest of the prerequisites listed below.
@@ -20,60 +20,65 @@ The following are the steps required before you can use Trident Protect to backu
2020
1. [Configure Trident Backend](#1-make-sure-trident-backend-is-configured-correctly)
2121
1. [Configure Storage Classes for Trident storage types](#2-make-sure-trident-csi-drivers-for-nas-and-san-are-installed)
2222
1. [Install the Kubernetes external snapshotter](#3-install-the-kubernetes-external-snapshotter)
23-
1. [Create VolumeStoraeClass for Storage Provider](#4-create-volumestorageclasses-for-your-storage-provider)
23+
1. [Create VolumeStorageClass for Storage Provider](#4-create-volumestorageclasses-for-your-storage-provider)
2424
1. [Install Trident Protect](#5-install-trident-protect)
2525
1. [Create S3 Bucket](#6-create-private-s3-bucket-for-backup-data-and-metadata)
2626
1. [Create Kubernetes secret for S3 bucket](#7-create-a-kubernetes-secret-for-the-s3-bucket)
2727

2828
### 1. Make sure Trident Backend is configured correctly
2929

30-
Run the following kubectl commands to confirm that the TridentBackendConfig for ontap-san and ontap-nas exist and are configured correctly. These commands should output the name of any matching TridentBackendConfigs:
30+
Depending on whether you are using block (SAN), or NAS (NFS), or both, will dictate which TridentBackendConfig you need configured.
3131

3232
#### SAN Backend
33+
Run the following command to confirm that the TridentBackendConfig for ontap-san exists and is configured correctly:
3334
```bash
3435
kubectl get tbc -n trident -o jsonpath='{.items[?(@.spec.storageDriverName=="ontap-san")].metadata.name}'
3536
```
3637

3738
### NAS Backend
39+
Run the following command to confirm that the TridentBackendConfig for ontap-nas exists and is configured correctly:
3840
```bash
3941
kubectl get tbc -n trident -o jsonpath='{.items[?(@.spec.storageDriverName=="ontap-nas")].metadata.name}'
4042
```
4143

42-
If no matching TridentBackendConfig resources are found, you will need to create them. Refer to the prerequisites section above for more information on how to do that.
44+
If no matching TridentBackendConfig resources are found, you will need to create the ones you need. Refer to the prerequisites section above for more information on how to do that.
4345

44-
### 2. Make Sure Trident CSI Drivers for NAS and SAN are Installed
45-
Run the following kubectl commands to check that a storage class exist for both SAN and NAS type storage.
46+
### 2. Make Sure the required Trident Storage Classes are installed
47+
Depending on whether you are using block (SAN), or NAS (NFS), or both, will dictate which Storage Classes you need to have configured.
4648

4749
#### SAN StorageClass
48-
Checks for storage classes in Kubernetes that use 'ontap-san' as their backend type. It outputs the name of any matching StorageClass:
50+
Run the following command to check that the storage class in Kubernetes that use 'ontap-san' as their backend type has been installed. It outputs the name of any matching StorageClass:
4951
```bash
5052
kubectl get storageclass -o jsonpath='{.items[?(@.parameters.backendType=="ontap-san")].metadata.name}'
5153
```
5254

5355
#### NAS Driver
54-
Checks for storage classes in Kubernetes that use 'ontap-nas' as their backend type. It outputs the name of any matching StorageClass:
56+
Run the following command to check that the storage class in Kubernetes that use 'ontap-nas' as their backend type has been installed. It outputs the name of any matching StorageClass:
5557
```bash
5658
kubectl get storageclass -o jsonpath='{.items[?(@.parameters.backendType=="ontap-nas")].metadata.name}'
5759
```
5860

59-
If one or both are not found, you will need to create them. Refer to the prerequisites section above for more information on how to do that.
61+
If one, or both, are not found, you will need to create them. Refer to the prerequisites section above for more information on how to do that.
6062

6163
### 3. Install the Kubernetes External Snapshotter
6264
Trident Protect depends on the Snapshotter CRDs and controller. Please run the following commands to install the Kubernetes External Snapshotter.
63-
For more information please consult the official [external-snapshotter documentation](https://github.com/kubernetes-csi/external-snapshotter).
65+
For more information, please consult the official [external-snapshotter documentation](https://github.com/kubernetes-csi/external-snapshotter).
6466

6567
```bash
66-
kubectl kustomize https://github.com/kubernetes-csi/external-snapshotter/client/config/crd | kubectl create -f -
67-
kubectl -n kube-system kustomize deploy/kubernetes/snapshot-controller | kubectl create -f -
68-
kubectl kustomize https://github.com/kubernetes-csi/external-snapshotter/deploy/kubernetes/csi-snapshotter | kubectl create -f -
68+
git clone https://github.com/kubernetes-csi/external-snapshotter
69+
cd external-snapshotter/
70+
kubectl kustomize client/config/crd | kubectl create -f -
71+
kubectl -n kube-system kustomize deploy/kubernetes/snapshot-controller | kubectl create -f -
72+
kubectl kustomize deploy/kubernetes/csi-snapshotter | kubectl create -f -
73+
cd ..
6974
```
7075

7176
### 4. Create VolumeSnapshotClasses for your storage provider.
72-
Trident Protect requires a VolumeSnapshotClass to be created for the storage CSI driver you are using. You can use the following command to see if you already one defined:
77+
Trident Protect requires a VolumeSnapshotClass to be created for the storage CSI driver you are using. You can use the following command to see if you already have one defined:
7378
```
7479
kubectl get VolumeSnapshotClass
7580
```
76-
If you don't have one defined you'll need to create one. Here is an example of a yaml file that defines a VolumeSnapshotClass for Trident CSI driver:
81+
If you don't have one defined, you'll need to create one. Here is an example of a yaml file that defines a VolumeSnapshotClass for Trident CSI driver:
7782
```
7883
apiVersion: snapshot.storage.k8s.io/v1
7984
kind: VolumeSnapshotClass
@@ -124,7 +129,7 @@ Replace:
124129
- `<aws_region>` the AWS region you want the bucket to reside.
125130

126131
### 7. Create a Kubernetes secret for the S3 bucket
127-
If required, create a service account within AWS IAM that has rights to read and write to the S3 bucket create. Then, create an access key.
132+
If required, create a service account within AWS IAM that has rights to read and write to the S3 bucket created above. Then, create an access key.
128133
Once you have the Access Key Id and Secret Access Key, create a Kubernetes secret with the following command:
129134

130135
```markdown
@@ -205,7 +210,7 @@ kubectl apply -f trident-application.yaml
205210
```
206211

207212
### Run Backup for Application
208-
Before you can migrate the data to a different store class you must back up the data first. You do that by first creating a backup configuration file named `trident-backup.yaml` with the following contents:
213+
To perform an on-demand backup of the application, first create a backup configuration file named `trident-backup.yaml` with the following contents:
209214

210215
```markdown
211216
apiVersion: protect.trident.netapp.io/v1

0 commit comments

Comments
 (0)