Skip to content

Commit adfb5d7

Browse files
committed
Update Blog “how-to-backup-and-restore-stateful-applications-on-kubernetes-using-kasten-k10-in-hpe-greenlake-for-private-cloud-enterprise”
1 parent 94e628d commit adfb5d7

File tree

1 file changed

+42
-4
lines changed

1 file changed

+42
-4
lines changed

content/blog/how-to-backup-and-restore-stateful-applications-on-kubernetes-using-kasten-k10-in-hpe-greenlake-for-private-cloud-enterprise.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ tags:
1313
- HPE GreenLake for Private Cloud Enterprise
1414
- hpe-greenlake-for-private-cloud-enterprise
1515
---
16-
This blog post describes how to backup and restore the stateful applications running in a Kubernetes (K8s) cluster using Kasten K10 in HPE GreenLake for Private Cloud Enterprise. Using pre-installed HPE CSI driver for K8s in the cluster, Kasten K10 works seamlessly for
16+
### Overview
17+
18+
19+
20+
21+
22+
[HPE GreenLake for Private Cloud Enterprise: Containers](https://www.hpe.com/us/en/greenlake/containers.html), one of the HPE GreenLake cloud services available on the HPE GreenLake for Private Cloud Enterprise, allows customers to create a Kubernetes (K8s) cluster, view details about existing clusters, and deploy containerized applications to the cluster. It provides an enterprise-grade container management service using open source K8s.
23+
24+
25+
26+
This blog post describes how to backup and restore the stateful applications running in a Kubernetes (K8s) cluster using Kasten K10 in HPE GreenLake for Private Cloud Enterprise. Using pre-installed HPE CSI driver for K8s in the cluster, Kasten K10 works seamlessly for
1727

1828
### Prerequisites
1929

@@ -34,6 +44,9 @@ Kasten K10 is a data management platform purpose-built for K8s that was develope
3444

3545
Kasten K10 has been named [a Leader and Outperformer in GigaOm’s K8s Data Protection report for the third consecutive year]( https://www.veeam.com/news/kasten.html). It offers an easy-to-use, scalable, and secure system for K8s backup/restore, disaster recovery and mobility of K8s applications.
3646

47+
Apart from direct integration with a number of storage providers, Kasten K10 supports invoking volume snapshots operations via the Container Storage Interface (CSI). By using the volume snapshot capability in the CSI driver for K8s, Kasten K10 can access different types of storage systems, and enable you to backup and restore persistent volumes of your stateful applications running on K8s.
48+
49+
3750

3851
### HPE CSI driver for K8s
3952

@@ -100,7 +113,7 @@ gl-sbp-frank-gl1-sstor01 csi.hpe.com Delete 56d
100113

101114
### Install Kasten K10
102115

103-
Following the [Kasten K10 installation page](https://docs.kasten.io/latest/index.html), the Kasten K10 can be installed to the cluster with the following commands using helm:
116+
Kasten K10 runs in its own namespace and is deployed on K8s like any other application. Following the [Kasten K10 installation page](https://docs.kasten.io/latest/index.html), the Kasten K10 can be installed to the cluster with the following commands using helm:
104117

105118
```shell
106119
$ helm repo add kasten https://charts.kasten.io/
@@ -197,6 +210,31 @@ Clicking *Accept Terms* after specifying your email and company name, you wil
197210

198211
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.
199212

213+
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:
214+
215+
```shell
216+
217+
218+
$ kubectl get volumesnapshotclasses
219+
NAME DRIVER DELETIONPOLICY AGE
220+
gl-sbp-frank-gl1-sstor01 csi.hpe.com Delete 69d
221+
222+
223+
224+
$ kubectl annotate volumesnapshotclasses gl-sbp-frank-gl1-sstor01 k10.kasten.io/is-snapshot-class=true
225+
volumesnapshotclasses.snapshot.storage.k8s.io/gl-sbp-frank-gl1-sstor01 annotated
226+
227+
```
228+
229+
Whenever Kasten K10 detects volumes that were provisioned via the CSI driver deployed in the cluster, it will look for a *VolumeSnapshotClass* with this K10 annotation for the identified CSI driver and use it to create snapshots.
230+
231+
Typing the following command to verify the *VolumeSnapshotClass* has the K10 annotation added:
232+
233+
```shell
234+
$ kubectl get volumesnapshotclass gl-sbp-frank-gl1-sstor01 -o yaml -o jsonpath='{.metadata.annotations}' | jq . | grep kasten
235+
"k10.kasten.io/is-snapshot-class": "true",
236+
```
237+
200238
### Deploy MySQL database
201239

202240
In order to show backup and restore process, an MySQL database from [my GitHub repo](https://github.com/GuopingJia/mysql-app) will be deployed as a sample stateful application to the cluster.
@@ -566,7 +604,7 @@ $ mysql -h 127.0.0.1 -uroot -pCfeDemo@123 -P 42281 -t <test_employees_sha.sql
566604

567605
#### Perform MySQL database restore
568606

569-
In order to restore the MySQL database, go to again the Kasten K10 Dashboard, locate the MySQL database *'mysql'* from the application list, expand the menu of *mysql*, then click *Restore* button:
607+
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:
570608

571609
![](/img/k10-restore-button.png)
572610

@@ -578,7 +616,7 @@ Use all the default options from **Restore Point** and click *Restore* button
578616

579617
![](/img/k10-restore.png)
580618

581-
The restore of the MySQL database will be started from the selected restore point. It will take a few seconds. Go back to the Kasten K10 Dashboard, you should see the completed *Restore* entry under **Actions**:
619+
The restore of the MySQL database will be started from the selected restore point. It will take a few seconds. Go back to the Kasten K10 Dashboard, you should see the completed *Restore* entry under **Actions** with target namespace as *mysql*:
582620

583621
![](/img/k10-dashboard-restore.png)
584622

0 commit comments

Comments
 (0)