diff --git a/content/en/blogs/Kubernetes-Backup-and-Restore-with-Kasten-K10 on-KubeSphere.md b/content/en/blogs/Kubernetes-Backup-and-Restore-with-Kasten-K10 on-KubeSphere.md new file mode 100644 index 000000000..4927505d1 --- /dev/null +++ b/content/en/blogs/Kubernetes-Backup-and-Restore-with-Kasten-K10 on-KubeSphere.md @@ -0,0 +1,201 @@ +--- +title: 'Kubernetes Backup and Restore with Kasten K10 on KubeSphere' +keywords: Backup and Restore, Kasten K10, Kubernetes +description: Several steps to realize Kubernetes backup and restore with Kasten K10 on KubeSphere +tag: 'Kasten K10, Kubernetes' +createTime: '2021-09-25' +author: 'Mars Zhang, Yicen Xie' +snapshot: '/images/blogs/en/kastenk10image/KastenK10-architecture.png' +--- + +## Kasten on KubeSphere + +Purpose-built for Kubernetes, [Kasten 10 ](https://docs.kasten.io/)provides enterprise operations teams an easy-to-use, scalable, and secure system for backup/restore, disaster recovery, and mobility of Kubernetes applications. + +![kasten k10 arch](/images/blogs/en/kastenk10image/KastenK10-architecture.png) +[KubeSphere](https://kubesphere.io/docs/introduction/what-is-kubesphere/) is a distributed operating system for cloud-native application management, using Kubernetes as its kernel. It provides a plug-and-play architecture, allowing third-party applications to be seamlessly integrated into its ecosystem. +![kubesphere arch](/images/blogs/en/kastenk10image/kubesphere-architecture.png) + +In this article, we will introduce the deployment of Kasten K10 on KubeSphere. + +## Provision a KubeSphere Cluster + +This article will introduce how to deploy Kasten on on KubeSphere Container Platform. You can install KubeSphere on any Kubernetes cluster or Linux system, refer to [KubeSphere documentation](https://kubesphere.io/docs/quick-start/all-in-one-on-linux/) for more details or vist the [Github]( https://github.com/kubesphere/website) of KubeSphere. + +After the creation of KubeSphere cluster, you can log in to KubeSphere web console: + +![web console](/images/blogs/en/kastenk10image/kastenk10-step3.png) +Click the button "Platform" in the upper left corner and then select "Access Control"; Create a new workspace called Kasten-Workspace. + +![kasten-workspace](/images/blogs/en/kastenk10image/kastenk10-step4.png) +Enter "Kasten-workspace" and select "App Repositoties"; Add an application repository named Kasten. + +![add repository](/images/blogs/en/kastenk10image/kastenk10-step5.png) +Add the official Helm Repository of Kasten to KubeSphere. **Helm repository address**[2]:https://charts.kasten.io/ + +![official helm repository](/images/blogs/en/kastenk10image/kastenk10-step6.png) +Once completed, the repository will find its status be "successful". + +![successful status](/images/blogs/en/kastenk10image/kastenk10-step7.png) +## Deploy Kasten K10 on Kubernetes to Backup and Restore Cluster + +First, create a Namespace to run Kasten. + +![create a name space](/images/blogs/en/kastenk10image/kastenk10-step8.png) +After creation, click the Namespace and select "App"-"Deploy New APP"-"From App Template"successively. + +![deploy new app](/images/blogs/en/kastenk10image/kastenk10-step9.png) +Select "Kasten" from the drop-down menu and then select "K10". + +![select k10](/images/blogs/en/kastenk10image/kastenk10-step10.png) +Click "K10" and enter the detail page of Chart; Click "Configuration File" to view or download the default values.yaml; Select the version and click to deploy; Set "App Name" as "K10" and select the "App Version"; Confirm the "Deployment Location", and click "Next". + +![page of chart](/images/blogs/en/kastenk10image/kastenk10-step11.png) +For this step, we need to input required parameters to deploy Kasten K10 on KubeSphere. We need to adjust the parameters in line with our own needs. During the installation, adjust the parameters as follows and click "Deploy". + +![adjust parameters](/images/blogs/en/kastenk10image/kastenk10-step12.png) + ``` +global: + airgapped: + repository: "ccr.ccs.tencentyun.com/kasten-k10" + persistence: + storageClass: "csi-hostpath-sc" + auth: + basicAuth: + enabled: "true" + htpasswd: "mars:$apr1$Cgu1sGVZ$w/8aLHZkVT73OqYZ06C0v." + metering: + mode: "airgap" + injectKanisterSidecar: + enabled: "true" + prometheus: + server: + persistentVolume: + enabled: "false" + ingress: + create: "true" + class: "nginx" + ``` +Click "Deploy" and wait the status to turn into "running". +![apps](/images/blogs/en/kastenk10image/kastenk10-step13.png) +Click "Deployment" to check if Kasten has deployed workload and is in running status. + +![workloads](/images/blogs/en/kastenk10image/kastenk10-step14.png) + +In “Application Workloads” - “Routes” page, we can find the Gateway of Ingress configured previously. + +![routes](/images/blogs/en/kastenk10image/kastenk10-step15.png) + + + +## Log in the Management Page of Kasten K10 + +Input `https://192.168.99.100/k10/#` to the browser for the following log-in interface; Input the company and e-mail address to sign up. +![login page](/images/blogs/en/kastenk10image/kastenk10-step16.png) + +Set the locations for storing our backup data. In this case S3 compatible storage is selected. + +![settings1](/images/blogs/en/kastenk10image/kastenk10-step17.png) + +Finally, start "K10 Disaster Recovery" and we can start to set "Disaster Recovery" for our cloud native application. + +![settings2](/images/blogs/en/kastenk10image/kastenk10-step18.png) + + + +## Deploy Cloud Native Applications on Kubernetes + +Kasten Dashboard holds 16 applications, which are shown as follows. We can create a Wordpress application with a Wordpress Pod and Mysql Pod, a typical application that is partly stateful and partly stateless. Here are the steps. + +![kasten dashboard1](/images/blogs/en/kastenk10image/kastenk10-step19.png) + + + +### Create kustomization.yaml + +Create “Secret Generator". A Secrete can store sensitive data such as passwords or keys. Since v1.14, kubectl supports kustomization to manage Kubernetes objects. We can use the generator in `kustomization.yaml` to create a Secret. + +We can add a Secret Generator to `kustomization.yaml` as follows. It should be noted that we need to replace YOUR_PASSWORD with our actual passwords. +``` +cat <./kustomization.yaml +secretGenerator: +- name: mysql-pass + literals: + - password=YOUR_PASSWORD +EOF +``` +**Download configuration file of MySQL deployment** +`curl -LO https://k8s.io/examples/application/wordpress/mysql-deployment.yaml` +**Download configuration file of Wordpress** +`curl -LO https://k8s.io/examples/application/wordpress/wordpress-deployment.yaml` +**Add to kustomization.yaml** +``` +cat <>./kustomization.yaml +resources: + - mysql-deployment.yaml + - wordpress-deployment.yaml +EOF +``` +Apply and verify all resources applied to deploy WordPress website within `kustomization.yaml` and MySQL database. We can set and apply the content as follows. +``` +kubectl create ns wordpress +kubectl apply -k ./ -n wordpress +``` +Once completed, we can find the number of application increase to 17. +![kasten dashboard2](/images/blogs/en/kastenk10image/kastenk10-step20.png) +In addition, applications of the WordPress can also be find in "Applications". + +![wordpress](/images/blogs/en/kastenk10image/kastenk10-step21.png) + +## Back Up Cloud Native Applications + +Click "Create Policy" and create a data backup strategy. In such case, Kasten can protect applications by creating local snapshot, and back up the application data to cloud, thus to realize the long-term retention of data. +![create policy](/images/blogs/en/kastenk10image/kastenk10-step22.png) + +Click "Run Once" to start backup. + +![start backup](/images/blogs/en/kastenk10image/kastenk10-step23.png) + +Observe Dashboard and we can find backup is completed. + +## Complete the Recovery of Cloud Native Applications + +Find "Applications" in Dashboard and then click "Restore". + +![restore](/images/blogs/en/kastenk10image/kastenk10-step24.png) +Set the time for recovery. + +![recovery](/images/blogs/en/kastenk10image/kastenk10-step25.png) + +Create a Namespace for recovery, which is named as "Wordpress-restore" in this case. + +![](/images/blogs/en/kastenk10image/kastenk10-step26.png) + +As every application recovered will create a new Namespace, the number of applications increases from 17 to 18. In Dashboard we can find that applications have been fully recovered. + +![fully recovered](/images/blogs/en/kastenk10image/kastenk10-step27.png) + +In KubeSphere Dashboard, we can find these applications recovered are running. + +![successful running](/images/blogs/en/kastenk10image/kastenk10-step28.png) + + + +## Summary + +As a container platform, KubeSphere excels in cloud native application deployment. For application developers who are not familiar with Kubernetes and hope to make simple configuration to deploy Kasten, it is easy to follow the above steps and deploy Kasten with KubeSphere. KubeSphere helps to directly deploy the official Helm repository of Kasten K10, which performs well in data management, including backup, migration and disaster recovery. + + +### Reference + +[KubeSphere Official Documentation](https://kubesphere.io/docs/) + +[Helm Repository Address](https://charts.kasten.io/) + +[Kasten Official Documentation](https://docs.kasten.io/) + +[KubeSphere GitHub](https://github.com/kubesphere/kubesphere) + +[KubeSphere Official Document](https://kubesphere.io/docs/introduction/what-is-kubesphere/) + +[KubeSphere Documentation](https://kubesphere.io/docs/) \ No newline at end of file diff --git a/static/images/blogs/en/kastenk10image/KastenK10-architecture.png b/static/images/blogs/en/kastenk10image/KastenK10-architecture.png new file mode 100644 index 000000000..dd959584c Binary files /dev/null and b/static/images/blogs/en/kastenk10image/KastenK10-architecture.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step10.png b/static/images/blogs/en/kastenk10image/kastenk10-step10.png new file mode 100644 index 000000000..f9b448b07 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step10.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step11.png b/static/images/blogs/en/kastenk10image/kastenk10-step11.png new file mode 100644 index 000000000..c7d796a45 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step11.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step12.png b/static/images/blogs/en/kastenk10image/kastenk10-step12.png new file mode 100644 index 000000000..9e0258ed3 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step12.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step13.png b/static/images/blogs/en/kastenk10image/kastenk10-step13.png new file mode 100644 index 000000000..027bd5b34 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step13.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step14.png b/static/images/blogs/en/kastenk10image/kastenk10-step14.png new file mode 100644 index 000000000..263566dd1 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step14.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step15.png b/static/images/blogs/en/kastenk10image/kastenk10-step15.png new file mode 100644 index 000000000..bc5d2688e Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step15.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step16.png b/static/images/blogs/en/kastenk10image/kastenk10-step16.png new file mode 100644 index 000000000..34a233d05 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step16.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step17.png b/static/images/blogs/en/kastenk10image/kastenk10-step17.png new file mode 100644 index 000000000..aef221061 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step17.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step18.png b/static/images/blogs/en/kastenk10image/kastenk10-step18.png new file mode 100644 index 000000000..78e812284 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step18.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step19.png b/static/images/blogs/en/kastenk10image/kastenk10-step19.png new file mode 100644 index 000000000..9bbe38159 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step19.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step20.png b/static/images/blogs/en/kastenk10image/kastenk10-step20.png new file mode 100644 index 000000000..9460a4b2e Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step20.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step21.png b/static/images/blogs/en/kastenk10image/kastenk10-step21.png new file mode 100644 index 000000000..af563b3db Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step21.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step22.png b/static/images/blogs/en/kastenk10image/kastenk10-step22.png new file mode 100644 index 000000000..1ad905a94 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step22.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step23.png b/static/images/blogs/en/kastenk10image/kastenk10-step23.png new file mode 100644 index 000000000..e172848d9 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step23.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step24.png b/static/images/blogs/en/kastenk10image/kastenk10-step24.png new file mode 100644 index 000000000..0b3feb89d Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step24.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step25.png b/static/images/blogs/en/kastenk10image/kastenk10-step25.png new file mode 100644 index 000000000..584b7a001 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step25.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step26.png b/static/images/blogs/en/kastenk10image/kastenk10-step26.png new file mode 100644 index 000000000..d65c69cb9 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step26.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step27.png b/static/images/blogs/en/kastenk10image/kastenk10-step27.png new file mode 100644 index 000000000..2243267b3 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step27.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step28.png b/static/images/blogs/en/kastenk10image/kastenk10-step28.png new file mode 100644 index 000000000..1783156ef Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step28.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step3.png b/static/images/blogs/en/kastenk10image/kastenk10-step3.png new file mode 100644 index 000000000..d1bb02e02 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step3.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step4.png b/static/images/blogs/en/kastenk10image/kastenk10-step4.png new file mode 100644 index 000000000..d3a978ce9 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step4.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step5.png b/static/images/blogs/en/kastenk10image/kastenk10-step5.png new file mode 100644 index 000000000..17562de5e Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step5.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step6.png b/static/images/blogs/en/kastenk10image/kastenk10-step6.png new file mode 100644 index 000000000..2fe7e231a Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step6.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step7.png b/static/images/blogs/en/kastenk10image/kastenk10-step7.png new file mode 100644 index 000000000..cbb5bbfdc Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step7.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step8.png b/static/images/blogs/en/kastenk10image/kastenk10-step8.png new file mode 100644 index 000000000..b330898b1 Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step8.png differ diff --git a/static/images/blogs/en/kastenk10image/kastenk10-step9.png b/static/images/blogs/en/kastenk10image/kastenk10-step9.png new file mode 100644 index 000000000..29893c03e Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kastenk10-step9.png differ diff --git a/static/images/blogs/en/kastenk10image/kubesphere-architecture.png b/static/images/blogs/en/kastenk10image/kubesphere-architecture.png new file mode 100644 index 000000000..66c1a76fb Binary files /dev/null and b/static/images/blogs/en/kastenk10image/kubesphere-architecture.png differ