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
Copy file name to clipboardExpand all lines: EKS/Backup-EKS-Applications-with-Trident-Protect/README.md
+23-18Lines changed: 23 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
This is a sample for setting up your Kubernetes application to be backed up by Trident Protect.
4
4
5
5
## 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.
7
7
- 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)
8
8
GitHub repo for an example of how to not only deploy an EKS cluster, but also deploy an FSx for ONTAP file system with
9
9
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
15
15
- helm installed - Refer to [this documentation](https://helm.sh/docs/intro/install/) on how to install it.
16
16
17
17
## 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.
1.[Create Kubernetes secret for S3 bucket](#7-create-a-kubernetes-secret-for-the-s3-bucket)
27
27
28
28
### 1. Make sure Trident Backend is configured correctly
29
29
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.
31
31
32
32
#### SAN Backend
33
+
Run the following command to confirm that the TridentBackendConfig for ontap-san exists and is configured correctly:
33
34
```bash
34
35
kubectl get tbc -n trident -o jsonpath='{.items[?(@.spec.storageDriverName=="ontap-san")].metadata.name}'
35
36
```
36
37
37
38
### NAS Backend
39
+
Run the following command to confirm that the TridentBackendConfig for ontap-nas exists and is configured correctly:
38
40
```bash
39
41
kubectl get tbc -n trident -o jsonpath='{.items[?(@.spec.storageDriverName=="ontap-nas")].metadata.name}'
40
42
```
41
43
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.
43
45
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.
46
48
47
49
#### 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:
49
51
```bash
50
52
kubectl get storageclass -o jsonpath='{.items[?(@.parameters.backendType=="ontap-san")].metadata.name}'
51
53
```
52
54
53
55
#### 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:
55
57
```bash
56
58
kubectl get storageclass -o jsonpath='{.items[?(@.parameters.backendType=="ontap-nas")].metadata.name}'
57
59
```
58
60
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.
60
62
61
63
### 3. Install the Kubernetes External Snapshotter
62
64
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).
### 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:
73
78
```
74
79
kubectl get VolumeSnapshotClass
75
80
```
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:
77
82
```
78
83
apiVersion: snapshot.storage.k8s.io/v1
79
84
kind: VolumeSnapshotClass
@@ -124,7 +129,7 @@ Replace:
124
129
-`<aws_region>` the AWS region you want the bucket to reside.
125
130
126
131
### 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.
128
133
Once you have the Access Key Id and Secret Access Key, create a Kubernetes secret with the following command:
129
134
130
135
```markdown
@@ -237,7 +242,7 @@ To check the status of the backup run the following command:
237
242
kubectl get backup -n <APP NAMESPACE> <APP BACKUP NAME>
238
243
```
239
244
240
-
- If status is `Completed` Backup completed successfully.
245
+
- If status is `Completed` Backup completed successfully.
241
246
- If status is `Running` run the command again in a few minutes to check status.
242
247
- 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.
243
248
@@ -247,7 +252,7 @@ There are two ways to restore a backup:
247
252
-[Restore backup to a different namespace](#restore-backup-to-a-different-namespace)
248
253
249
254
### 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:
Copy file name to clipboardExpand all lines: EKS/PV-Migrate-with-Trident-Protect/README.md
+24-19Lines changed: 24 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
-
# Migrate Kubernates PVs with Trident Protect
1
+
# Migrate Kubernetes PVs with Trident Protect
2
2
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.
4
4
5
5
## 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.
7
7
- 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)
8
8
GitHub repo for an example of how to not only deploy an EKS cluster, but also deploy an FSx for ONTAP file system with
9
9
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
1.[Create Kubernetes secret for S3 bucket](#7-create-a-kubernetes-secret-for-the-s3-bucket)
27
27
28
28
### 1. Make sure Trident Backend is configured correctly
29
29
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.
31
31
32
32
#### SAN Backend
33
+
Run the following command to confirm that the TridentBackendConfig for ontap-san exists and is configured correctly:
33
34
```bash
34
35
kubectl get tbc -n trident -o jsonpath='{.items[?(@.spec.storageDriverName=="ontap-san")].metadata.name}'
35
36
```
36
37
37
38
### NAS Backend
39
+
Run the following command to confirm that the TridentBackendConfig for ontap-nas exists and is configured correctly:
38
40
```bash
39
41
kubectl get tbc -n trident -o jsonpath='{.items[?(@.spec.storageDriverName=="ontap-nas")].metadata.name}'
40
42
```
41
43
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.
43
45
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.
46
48
47
49
#### 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:
49
51
```bash
50
52
kubectl get storageclass -o jsonpath='{.items[?(@.parameters.backendType=="ontap-san")].metadata.name}'
51
53
```
52
54
53
55
#### 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:
55
57
```bash
56
58
kubectl get storageclass -o jsonpath='{.items[?(@.parameters.backendType=="ontap-nas")].metadata.name}'
57
59
```
58
60
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.
60
62
61
63
### 3. Install the Kubernetes External Snapshotter
62
64
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).
### 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:
73
78
```
74
79
kubectl get VolumeSnapshotClass
75
80
```
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:
77
82
```
78
83
apiVersion: snapshot.storage.k8s.io/v1
79
84
kind: VolumeSnapshotClass
@@ -124,7 +129,7 @@ Replace:
124
129
-`<aws_region>` the AWS region you want the bucket to reside.
125
130
126
131
### 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.
128
133
Once you have the Access Key Id and Secret Access Key, create a Kubernetes secret with the following command:
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:
0 commit comments