Home > Data Protection > PowerProtect Data Manager > Dell PowerProtect Data Manager: Protecting Kubernetes Workloads > Restoring Kubernetes namespaces and PVCs
After protecting the Kubernetes cluster protection policy, restoring namespace and PVCs can be done from individual namespace backups. When a protection policy is successfully backed up, PowerProtect Data Manager displays details such as the name of the storage system containing the asset backup, location, the creation and expiry date, and the size.
To view backup copies available for restore, select Restore > Assets on the PowerProtect Data Manager UI. Select the asset and click Restore.
PowerProtect Data Manager provides options to recover the Kubernetes namespaces to the same or to an alternate cluster.
Restore to Original Cluster: Select this option to restore to a new namespace on the original cluster.
Restore to an Alternate Cluster: Select this option to restore to a new namespace on a different cluster, and then select the cluster from the list.
A restore to an alternate cluster can be useful when:
Note: When restoring to an alternate cluster, ensure that this Kubernetes cluster has been added and discovered in the PowerProtect Data Manager UI Asset Sources window.
Restore Namespace and Select PVCs: Select this option to restore namespace resources and selected persistent volume claims (PVCs). Optionally, you can also select Include cluster scoped resources to restore the cluster roles, cluster role bindings, and custom resource definitions (CRDs) that were backed up automatically as part of the Kubernetes protection policy. This option is only available for PowerProtect Data Manager 19.6 and later Kubernetes protection policy backups.
Restore Cluster Scoped Resources:
The resources that are scoped at a cluster level and not bound to any specific namespace are called cluster scoped resources (for example, cluster roles, cluster role bindings, and custom resource definitions (CRD)). When the CRD is created, Kubernetes API server creates a new RESTful resource path for the specific version created. The CRD can be either namespaced or cluster scoped as specified in the scope field. This section examines how you can use Kubernetes backup copies and restore the cluster scoped resources such as service accounts, cluster roles, and cluster bindings. The Velero component performs the backup and restore of cluster scoped resources, including the backup of the namespace and the associated cluster scoped resources, such as cluster roles and cluster role bindings. Custom resource definitions are included as a part of each namespace backup.
Restoring cluster resources is controlled by a check-box option in UI named Include cluster scoped resources and runs the restore process.
Here are the steps to verify the cluster role, cluster binding, and CRD:
kubectl get clusterrole
kubectl get clusterrolebinding
kubectl get crd
kubectl get serviceaccount -n <namespace>
s./del-fcd.sh
After protecting the Kubernetes cluster protection policy, restoring namespace and PVCs can be done from individual namespace backups.
Use the following recovery options:
On the PVCs page, if the configuration of the namespace you want to restore is different from the configuration in the target namespace, perform the following:
Optionally, if you choose to retire the storage class on the original cluster:
The storage class mapping feature with PowerProtect Data Manager 19.8 enables you to choose an alternate storage class for PVCs with a certain provisioner type while restoring persistent volumes. Storage class mapping enables restoring namespaces and PVCs from one cluster to another using different container storage. It is also useful when the migration of data from one storage class to another storage class and from on-premises to cloud or conversely.
Note: The storage class is not modified for existing PVCs being overwritten.
If Change storage class for PVCs to compatible storage class is selected as shown above, the Storage Class page appears with a list of supported storage classes on the target cluster.
Note: When changing the PVC storage class on the target Kubernetes cluster, if you select more than one PVC at a time on this page, only the storage classes that apply to all selected PVCs are displayed. To view and select from all available storage classes, select one PVC at a time.
From the Summary page, click Restore to initiate the restore job. An informational dialog box appears indicating that the restore has started.