Hpe Ezmeral
Hpe Ezmeral
CONTENTS
HPE Ezmeral and Kasten K10 overview........................................................................................................................................................................................................................................................... 3
Using Kasten K10 with HPE Ezmeral Container Platform ............................................................................................................................................................................................................... 4
Creating a Kubernetes cluster with HPE Ezmeral Container Platform ................................................................................................................................................................................. 4
Adding snapshot capacity to HPE Ezmeral cluster with HPE Ezmeral Data Fabric CSI driver ...................................................................................................................... 5
Create a VolumeSnapshotClass ......................................................................................................................................................................................................................................................................... 5
Install Kasten K10.................................................................................................................................................................................................................................................................................................................. 6
Run the preflight script .............................................................................................................................................................................................................................................................................................. 6
Preflight check for CSI snapshot validation ............................................................................................................................................................................................................................................. 7
Using the Helm chart to install Kasten K10............................................................................................................................................................................................................................................ 8
Testing the snapshot by backing up and restoring an application.......................................................................................................................................................................................... 9
Installing the test application................................................................................................................................................................................................................................................................................ 9
Accessing the dashboard ......................................................................................................................................................................................................................................................................................10
Snapshot the application .......................................................................................................................................................................................................................................................................................11
Backing up the application .........................................................................................................................................................................................................................................................................................14
Creating an external object storage with HPE Ezmeral Data Fabric.............................................................................................................................................................................14
Setting up the location profile in Kasten Dashboard ...................................................................................................................................................................................................................14
Change the policy to add an export profile ..........................................................................................................................................................................................................................................15
Backing up and restoring applications with cluster-scoped resources .......................................................................................................................................................................16
Restoring the application.............................................................................................................................................................................................................................................................................................16
Restoring a deleted namespace......................................................................................................................................................................................................................................................................18
K10 Disaster Recovery ..................................................................................................................................................................................................................................................................................................19
Restoring K10 to a new cluster .......................................................................................................................................................................................................................................................................20
Conclusion .................................................................................................................................................................................................................................................................................................................................21
Technical white paper Page 3
FIGURE 1. Kubernetes backup in HPE Ezmeral Container Platform with Kasten K10
An integrated component of HPE, HPE Ezmeral Container Platform enables IT operators to deliver and manage end-to-end,
production-ready Kubernetes environments with push-button simplicity, all while preserving a native user experience. Every HPE Ezmeral
cluster is deployed with HPE Ezmeral Data Fabric full-featured CSI driver, which natively integrates with HPE storage solutions, volumes,
and file to deliver persistent storage for stateful containerized applications. S3-compatible storage is also easy to set up using
HPE Ezmeral Data Fabric.
HPE Ezmeral Data Fabric is a software-defined storage solution that nondisruptively scales out while lowering overall storage costs. It’s
designed with an S3-compatible REST API interface to handle large amounts of unstructured data.
Technical white paper Page 4
HPE Ezmeral Data Fabric is an ideal target for Kasten K10 backup export, as it provides long-term retention and archiving, as well as
cross-region replication. As such, Kasten K10 is a perfect solution for managing protection and mobility of cloud-native applications on
HPE Ezmeral Container Platform.
Purpose-built for Kubernetes, Kasten K10 is a data protection software platform that runs on a Kubernetes cluster in its own namespace and
can protect single to multiple clusters. Kasten K10 provides secure multitenancy with fine-grained, role-based access control.
ADDING SNAPSHOT CAPACITY TO HPE EZMERAL CLUSTER WITH HPE EZMERAL DATA
FABRIC CSI DRIVER
You can make use of the CSI snapshot API with Kasten as much as you can. This has numerous advantages.
• Kasten rely on the storage layer that in turn will make snapshot the most efficient way.
• A snapshot is crash consistent (all files state taken at the same time).
• Snapshots are local and that makes the restoration of an application quicker. You can also export the snapshot in a portable way to an
object storage such as the HPE Ezmeral Data Fabric, and you can manage different retention policy between local and exported snapshot
(because cost of the storage is much cheaper on object storage).
By default, HPE Ezmeral cluster does not come with a VolumeSnapshotClass deployed in it. You will be able to create the
VolumeSnapshotClass with the following steps.
You need to have admin access to your cluster and a working kubeconfig/kubectl environment.
Create a VolumeSnapshotClass
Get the CSI secret name of the StorageClass to create your VolumeSnapshotClass with the following steps.
#Get the name of the secret that contains credentials for HPE Datafabric cluster
SECRETNAME=$(kubectl get sc -
o=jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-
class=="true")].parameters.csi\.storage\.k8s\.io\/provisioner-secret-name}')
#Get the namespace in which the secret HPE Datafabric cluster is deployed
SECRETNAMESPACE=$(kubectl get sc -
o=jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-
class=="true")].parameters.csi\.storage\.k8s\.io\/provisioner-secret-namespace}')
helm repo add kasten https://charts.kasten.io --force-update && helm repo update
• To test the snapshot functionalities using the preflight script, you will be annotating the VolumeSnapshotClass as mentioned in the
following. When K10 detects volumes that were provisioned via a CSI driver, it will look for a VolumeSnapshotClass with K10 annotation
for the identified CSI driver and use it to create snapshots.
Now, you can run the preflight script and validate the output so that you are good to go.
RBAC Check:
Kubernetes RBAC is enabled - OK
Validating Provisioners:
com.mapr.csi-kdf:
Is a CSI Provisioner - OK
Missing/Failed to Fetch CSIDriver Object
Storage Classes:
hcp-mapr-cluster
Valid Storage Class - OK
Volume Snapshot Classes:
mapr-snapshotclass
Has k10.kasten.io/is-snapshot-class annotation set to true - OK
Has deletionPolicy 'Delete' - OK
NOTE
Missing/Failed to Fetch CSIDriver Object error can be ignored as not all the CSI implementations have CSIDriver Object.
serviceaccount/k10-primer created
clusterrolebinding.rbac.authorization.k8s.io/k10-primer created
job.batch/k10primer created
Technical white paper Page 8
Creating application
-> Created pod (kubestr-csi-original-podj8k7s) and pvc (kubestr-csi-original-
pvcq52q8)
Taking a snapshot
-> Created snapshot (kubestr-snapshot-20210304002923)
Restoring application
-> Restored pod (kubestr-csi-cloned-podhxmsj) and pvc (kubestr-csi-cloned-pvc6rhzk)
Cleaning up resources
CSI Snapshot Walkthrough:
Using annotated VolumeSnapshotClass (mapr-snapshotclass)
Successfully tested snapshot restore functionality. - OK
Now, you will be able to verify if everything is working fine by checking that all the pods are up and running in the kasten-io namespace.
Let’s insert some data into the PostgreSQL pod once it is ready.
The Kasten dashboard will be available at http://<worker-node-ip>:<NodePort> where the NodePort in this example is 32161.
Once you have access to the dashboard, fill out and accept the end-user license.
The following is the Dashboard page of K10.
Provide the policy a name and select the action as Snapshot. You will be able to select the backup frequency in the Advanced options.
Technical white paper Page 12
You will be able to select the retention of the snapshot and select/filter resources by name/labels to snapshot based on the requirement.
Once done, click the Create Policy button.
Technical white paper Page 13
Click run once from the policy menu to run an ad hoc snapshot manually.
Go to the main dashboard and scroll down under Actions to view progress.
When the circle turns solid green, click the job to open a details pane and view all artifacts that were captured.
Technical white paper Page 14
Name the profile and fill in the details of the endpoint, access key, secret key, and name of the bucket created using the previous steps.
Click Save Profile once done.
Technical white paper Page 15
Find the appropriate policy under Dashboard --> Policies, and then click edit.
Select Enable Backups via Snapshot Exports and then select the appropriate profile. You will be able to provide separate retention for
exported backups as well.
Export will start as soon as the snapshot action finishes. When the circle turns solid green, click the job to open a details pane and view all
artifacts that were captured in the previous step.
Technical white paper Page 16
FIGURE 4. How to use filters to include and exclude cluster-scoped resources while creating a policy
You can see that now we have two restore points. A local restore point and an exported restore point.
You can select the local snapshot to restore the application and all the objects that are backed up as a part of the namespace. It can be
restored to overwrite the objects in the same namespace or cloned to a new namespace.
Once the namespace is deleted, you will not be able to see it in the application tab by default. You will have to select the filter to list the
removed applications.
You will be able to select the exported restore point and restore as we did in the previous step.
Also, you will be able to apply Transforms to modify the manifest file if there are any requirements. For example, if you are going to restore
the application to a different cluster with a different StorageClass, you will be able to replace the StorageClass spec using the Transforms
before the restoration.
You will also be able to test out the Transforms applied to see the rendered manifests and validate before the restoration.
There can be other use cases such as moving an application to a faster storage or adding/removing/replacing specific annotations to the
specs where you can leverage Transforms feature.
Technical white paper Page 19
postgres=# \c test
You are now connected to database "test" as user "postgres".
test=# select * from pets
test-# ;
name | owner | species | sex | birth | death
----------+--------+------------------+-----+------------+-------
Puffball | Diane | hamster | f | 2010-03-30 |
Spike | Mike | pitbull | m | 2011-04-28 |
Ashton | Varoon | German Shepherd | m | 2014-06-15 |
Bear | Chris | Rottweiler | m | 2013-10-10 |
Toby | Jenny | Golden Retriever | m | 2019-03-19 |
(5 rows)
On the Settings page, select K10 Disaster Recovery and then click the Enable K10 DR button to enable disaster recovery.
This creates a policy for K10 Disaster Recovery and its schedule/retention can be modified as per the requirement.
NOTE
After enabling K10 DR, it is essential that you copy and save the following to successfully recover K10 from a disaster:
2. Install K10 instance in the new cluster by following Using the Helm chart to install Kasten.
3. Configure the same location profile in the new cluster where the K10 DR backups are stored by following Setting up the location profile
in Kasten Dashboard.
Technical white paper Page 21
#Install the helm chart that creates the K10 restore job and wait for completion of
the `k10-restore` job
After the K10 restore job is completed, you can restore cluster-scoped resources and application resources.
NOTE
Prior to recovering applications, it may be desirable to restore cluster-scoped resources. Cluster-scoped resources may be needed for cluster
configuration or as part of application recovery.
CONCLUSION
The HPE and Kasten by Veeam partnership helps companies confidently run and protect cloud‑native applications on Kubernetes, across
private, hybrid, and multi‑cloud environments. Kasten K10 can restore applications on HPE Ezmeral Container Platform to a known state
with granular control of backup and restore capabilities for the entire application stack. These container applications can also be seamlessly
recovered and redeployed across clusters and sites to facilitate effective disaster recovery strategies.
You can get started in a few minutes with a free and full featured version of Kasten K10 by going to kasten.io/try-kasten-k10. Also, you can
get additional information from:
• Access and Authentication to the dashboard
• Logical and application consistent backups
• Multi-tenancies and RBAC
• Multicluster management
• HPE and Kasten by Veeam partnership
• HPE Ezmeral Container Platform website and technical paper
• HPE Ezmeral Data Fabric website and technical paper
• HPE Ezmeral Marketplace
Technical white paper
LEARN MORE AT
hpe.com/ezmeral
© Copyright 2021 Hewlett Packard Enterprise Development LP. The information contained herein is subject to change without
notice. The only warranties for Hewlett Packard Enterprise products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as constituting an additional warranty.
Hewlett Packard Enterprise shall not be liable for technical or editorial errors or omissions contained herein.