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
Create Backupand fill the required details. In this case, we will be backing up an nginx application running on a default namespace
Nextand select backup storage location.
Nextand select a backup schedule. For a simplicity, I am going ahead with
Createand monitor the backup progress till completion. Once completed, it will list under
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
- Click on
Restore From Another Clusteroption
- Select AKS Cluster 1 from the list and then select the backup name.
Restore the entire backup
- Once you click on
Next, Enter a name and click on
- 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