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: content/blog/how-to-backup-and-restore-stateful-applications-on-kubernetes-using-kasten-k10-in-hpe-greenlake-for-private-cloud-enterprise.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ Before starting, make sure you meet the following requirements:
96
96
97
97
### Install Kasten K10
98
98
99
-
Kasten K10 can be deployed on K8s like any other application, and it runs in its own namespace.
99
+
Kasten K10 can be deployed on K8s like any other application and it runs in its own namespace.
100
100
101
101
Following the [Kasten K10 installation page](https://docs.kasten.io/latest/index.html), Kasten K10 can be installed to the cluster with the following commands using helm:
102
102
@@ -179,7 +179,7 @@ Click *Accept Terms* after specifying your email and company name, you will b
179
179
180
180

181
181
182
-
Kasten K10 automatically discovers all the applications and their data across namespaces in the cluster. The K10 dashboard displays a list of applications that are mapped to namespaces. It also displays a summary of the cluster’s backup data footprint, showing *0.0 B* when accessing the dashboard for the first time.
182
+
Kasten K10 automatically discovers all the applications and their data across namespaces in the cluster. The K10 Dashboard displays a list of applications that are mapped to namespaces. It also displays a summary of the cluster’s backup data footprint, showing *0.0 B* when accessing the dashboard for the first time.
183
183
184
184
To use Kasten K10 with HPE CSI driver for K8s, you need to ensure the configured *VolumeSnapshotClass* in the cluster contains the K10 annotation ***k10.kasten.io/is-snapshot-class: "true"***. Typing the following command to add this required K10 annotation to the *VolumeSnapshotClass*:
In order to show backup and restore process, an MySQL database instance from [my GitHub repo](https://github.com/GuopingJia/mysql-app) will be deployed as a sample stateful application to the cluster.
206
+
In order to show backup and restore process, a MySQL database instance from [my GitHub repo](https://github.com/GuopingJia/mysql-app) will be deployed as a sample stateful application to the cluster.
207
207
208
208
**1. Install MySQL database**
209
209
@@ -226,7 +226,7 @@ spec:
226
226
storage: 1Gi
227
227
```
228
228
229
-
This PVC file, together with other YAML manifest files in the folder *base*, will be used to install the MySQL database instance using [Kustomize](https://kustomize.io/).
229
+
This PVC file, together with other YAML manifest files in the folder *'base'*, will be used to install the MySQL database instance using [Kustomize](https://kustomize.io/).
230
230
231
231
```shell
232
232
$ tree mysql-app/base
@@ -462,7 +462,7 @@ You can also check the **Data Usage** page to see the data used by database b
462
462
463
463

464
464
465
-
In the cluster, after snapshot of the MySQL database, you can check there is a *VolumeSnapshot**k10-csi-snap-ltxzrwxgp6r5pwkp* created from the PVC *mysql-pvc* in the namespace *mysql*, together with a *VolumeSnapshotContent* object created at cluster level. The *READYTOUSE* of the *VolumeSnapshot* should be showing as *true*:
465
+
In the cluster, after snapshot of the MySQL database, you can check there is a *VolumeSnapshot**'k10-csi-snap-ltxzrwxgp6r5pwkp'* created from the source PVC *'mysql-pvc'* in the namespace *mysql*, together with a *VolumeSnapshotContent* object created at cluster level. The *READYTOUSE* of the *VolumeSnapshot* should be showing as *true*:
466
466
467
467
```shell
468
468
$ kubectl get volumesnapshot -n mysql
@@ -480,9 +480,9 @@ This volume snapshot can be used for MySQL database restore.
480
480
481
481
Before showing the database restore, I will first delete some table from MySQL database to simulate a loss of data. Then, I will perform the database recovery using the Kasten K10.
482
482
483
-
#### Delete table
483
+
#####Delete table
484
484
485
-
Delete data from the table *departments* by typing the following commands:
485
+
Delete data from the table '*departments'* by typing the following commands:
486
486
487
487
```shell
488
488
$ mysql -h 127.0.0.1 -uroot -pCfeDemo@123 -P 42281 -Demployees
In order to restore the MySQL database, go to the Kasten K10 Dashboard, locate the MySQL database *'mysql'* from the application list, expand the menu of *mysql*, then click *Restore* button:
574
574
@@ -653,7 +653,6 @@ This indicates the MySQL database gets recovered from its backup and MySQL da
653
653
654
654
### Summary
655
655
656
-
In this blog post, I
657
-
introduced and discussed Kasten K10 and HPE CSI driver for K8s. Using the volume snapshot capability in HPE CSI driver for K8s, I demonstrated how to use Kasten K10 dashboard to backup the persistent volume of a sample MySQL database deployed in the cluster, and how to restore databasae using the created backup. Kasten K10 provides a powerful and intuitive interface that enables you to easily backup and restore the stateful applications running in the cluster. It can significantly simplify the process and enhance the robustness of data management in a K8s cluster.
656
+
In this blog post, I introduced and discussed Kasten K10 and HPE CSI driver for K8s. Using the volume snapshot capability in HPE CSI driver for K8s, I demonstrated how to use Kasten K10 to backup the persistent volume of a sample MySQL database deployed in the cluster, and how to restore databasae using the created backup. Kasten K10 provides a powerful and intuitive interface that enables you to easily backup and restore the stateful applications running in the cluster. It can significantly simplify the process and enhance the robustness of data management in a K8s cluster.
658
657
659
658
You can keep coming back to the [HPE Developer blog](https://developer.hpe.com/blog/) to learn more about HPE GreenLake for Private Cloud Enterprise.
0 commit comments