Hello Everyone,
In this post I’m going to discuss how I configured/setup AKS backups. as quoted from Microsoft learn “Azure Kubernetes Service (AKS) backup is a simple, cloud-native process you can use to back up and restore containerized applications and data that run in your AKS cluster.”
more information can be read here: https://learn.microsoft.com/en-us/azure/backup/azure-kubernetes-service-backup-overview
The Process
To begin with I am going to assume that you have an AKS instance and are comfortable in using the Azure Portal and Azure Backup Centre.
Navigate to your AKS cluster in the portal and on the left hand side menu select “Backup“. Then click on “+ Backup“. You should see something similar to the below image. Please note that I have created a Recovery vault before hand. You can create one by clicking on “Create vault“.
You will notice that I have a few errors. The first error mentions that I need to install the backup extension and the second error is I need to grant cluster permissions. to resolve bother of these I will first click on “Install Extension“.
After I have clicked on this, the following pane will be shown.
I click on “Next“. The following “Review + create” will be shown.
I then click on “Create“. This process can take a few minutes. Once this is done I then resolve the second error and click on “Grant Permissions“.
Once the errors are resolved I can then click on the “Next” button to proceed to the next stage.
Backup Policy
We can now create a backup policy. The backup policy allows us to configure the retention and the schedule for when the backup should run. I have provided a name for this Policy for which I have called “aks-joe-test-policy“.
I then click on “Next: Schedule + retention”
I have left the above as defaults for the purpose of this demo. but from here you can configure the needed settings that best suit your needs. I then clicked on “Next: Review + create“. Finally on that screen I clicked on “Create“.
Datasources
I then proceed to select my data sources for backup. Again I have left the settings as the default for the purpose of this post. I provided a Name for my backup source and I have included all namespaces including any future namespaces. You can also from this view only choose to backup certain namespaces or backup by resource labels.
Once you have configured the settings for your Data Source click the “Select” button. You will then be shown something like the following:
to resolve this error, click the data source, followed by “Assign missing Roles“.
you should then see the status show as green.
you can then click on the “Next” button. You will be taken to the “Review + configure” window, where you can then review your settings and then create the backup configuration.
On Demand Backup
With that you have now configured the backup. Although we have configured a schedule this is a good time to test to make sure that the backup actually works. to do this select the 3 dots on the Backup page and click on “Backup Now “.
Then click on “Backup now“. This will take you back to the Backup screen. If you click on the backup name you will be presented with the following page:
If you have any in progress backups or failed backups they will be shown in the relevant columns. You can see that the one I tested against was a success and if needed I can then restore the backup using restore points.
Backup Location
Now you maybe wondering where are the AKS backups stored? That’s a good question. Remember when you where asked to install the backup extension well you where asked to create a storage account and a container of your choice to store the said backups.
you can see from the above image, that I have a container called “aksbackup“. it’s within this container where the backups are stored.
Conclusion
That’s all for this post. Should you need any help with your Azure fee free to reach out to me.