VMware released a new feature in Tanzu Mission Control (TMC) that helps to restore backup of one k8s cluster to another cluster. You can read about release note here.
In this blog post, I will walk you through the step by steps process to backup an application from one cluster and restore it to another cluster using TMC cross cluster restore feature.
Below is the high level architecture of my environment, here is what I have already in place:
- Two Kubernetes clusters (in this case they are an AKS clusters)
- Both AKS Clusters are attached to TMC and part of same TMC Cluster group

- Target location is created to store the backup, In this case, target location is an AWS S3 bucket
- Data protection is enabled on both AKS Clusters.
- Nginx pod is running on first cluster

Let’s run through the steps to backup and restore.
Backup Applications running on AKS Cluster 1 default namespace
- Select AKS Cluster 1 and navigate to
Data Protection
tab

- Click
Create Backup
and fill the required details. In this case, we will be backing up an nginx application running on a default namespace

- Click
Next
and select backup storage location.

- Click
Next
and select a backup schedule. For a simplicity, I am going ahead withNow

- Click
Next
and selectRetention
period.

- Click
Next

- Click
Create
and monitor the backup progress till completion. Once completed, it will list underBackups

Restore Applications running on AKS Cluster 1 in a default namespace to AKS Cluster 2
- Connect to AKS Cluster 2 and validate to ensure that there is no application running on a default namespace.
❯ kubectl get po
No resources found in default namespace.
- Now, Let’s restore AKS Cluster 1 backup to AKS cluster 2
- Select AKS Cluster 2 from TMC console and click on
Data Protection
tab.

- Click on
Restore From Another Cluster
option

- Select AKS Cluster 1 from the list and then select the backup name.

- Click
Next
and selectRestore the entire backup

- Once you click on
Next
, Enter a name and click onRestore

- Wait for restore completion.

- Once complete, validate the pod running on a default namespace.
❯ k get po
NAME READY STATUS RESTARTS AGE
nginx 1/1 Running 0 3s
- Notice the nginx pod, its restored to AKS Cluster 2.
For more information about Data Protection feature of TMC, refer the official documentation