Skip to content

Commit e3dde8a

Browse files
authored
Merge pull request #293198 from AbhishekMallick01/Jan-17-2025-IncubationAKS
Incubation <50 visitors AKS via CLI
2 parents 5557629 + 79bd515 commit e3dde8a

9 files changed

+60
-47
lines changed

articles/backup/azure-kubernetes-service-backup-overview.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: azure-backup
66
ms.custom:
77
- ignite-2023
88
- ignite-2024
9-
ms.date: 01/16/2025
9+
ms.date: 01/21/2025
1010
author: jyothisuri
1111
ms.author: jsuri
1212
---
@@ -444,3 +444,4 @@ You incur charges for:
444444
> [!div class="nextstepaction"]
445445
>- [Prerequisites for Azure Kubernetes Service backup](azure-kubernetes-service-cluster-backup-concept.md)
446446
>- [Back up AKS using Azure PowerShell](azure-kubernetes-service-cluster-backup-using-powershell.md)
447+
>- Restore AKS using [Azure CLI](azure-kubernetes-service-cluster-restore-using-cli.md)

articles/backup/azure-kubernetes-service-cluster-backup-concept.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.topic: overview
55
ms.service: azure-backup
66
ms.custom:
77
- ignite-2023
8-
ms.date: 09/09/2024
8+
ms.date: 01/21/2025
99
author: jyothisuri
1010
ms.author: jsuri
1111
---
@@ -120,5 +120,5 @@ Also, as part of the backup and restore operations, the following roles are assi
120120
- [About Azure Kubernetes Service backup](azure-kubernetes-service-backup-overview.md)
121121
- [Supported scenarios for Azure Kubernetes Service cluster backup](azure-kubernetes-service-cluster-backup-support-matrix.md)
122122
- Back up Azure Kubernetes Service cluster using [Azure portal](azure-kubernetes-service-cluster-backup.md), [Azure PowerShell](azure-kubernetes-service-cluster-backup-using-powershell.md)
123-
- [Restore Azure Kubernetes Service cluster](azure-kubernetes-service-cluster-restore.md)
123+
- Restore Azure Kubernetes Service cluster using [Azure portal](azure-kubernetes-service-cluster-restore.md), [Azure CLI](azure-kubernetes-service-cluster-restore-using-cli.md)
124124
- [Manage Azure Kubernetes Service cluster backups](azure-kubernetes-service-cluster-manage-backups.md)

articles/backup/azure-kubernetes-service-cluster-restore-using-cli.md

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Restore Azure Kubernetes Service (AKS) using Azure CLI
33
description: This article explains how to restore backed-up Azure Kubernetes Service (AKS) using Azure CLI.
44
ms.topic: how-to
55
ms.service: azure-backup
6-
ms.date: 11/21/2024
6+
ms.date: 01/21/2025
77
ms.custom:
88
- devx-track-azurecli
99
- ignite-2023
@@ -25,6 +25,8 @@ You can perform both *Original-Location Recovery (OLR)* (restoring in the AKS cl
2525
2626
## Before you start
2727

28+
Before you start restoring an AKS cluster, review the following details:
29+
2830
- AKS backup allows you to restore to original AKS cluster (that was backed up) and to an alternate AKS cluster. AKS backup allows you to perform a full restore and item-level restore. You can utilize [restore configurations](#restore-to-an-aks-cluster) to define parameters based on the cluster resources that are to be restored.
2931

3032
- You must [install the Backup Extension](azure-kubernetes-service-cluster-manage-backups.md#install-backup-extension) in the target AKS cluster. Also, you must [enable Trusted Access](azure-kubernetes-service-cluster-manage-backups.md#trusted-access-related-operations) between the Backup vault and the AKS cluster.
@@ -37,37 +39,39 @@ For more information on the limitations and supported scenarios, see the [suppor
3739

3840
Before you initiate a restore process, you must validate that AKS cluster is prepared for restore. It includes the Backup Extension to be installed with the extension having the permission on storage account where backups are stored/hydrated with Trusted Access enabled between target AKS cluster and Backup vault.
3941

40-
First, check if Backup Extension is installed in the cluster by running the following command:
42+
To validate and prepare AKS cluster for restore, run the following commands:
4143

42-
```azurecli
43-
az k8s-extension show --name azure-aks-backup --cluster-type managedClusters --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup
44-
```
44+
1. Check if Backup Extension is installed in the cluster.
4545

46-
If the extension is installed, then check if it has the right permissions on the storage account where backups are stored:
46+
```azurecli
47+
az k8s-extension show --name azure-aks-backup --cluster-type managedClusters --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup
48+
```
4749
48-
```azurecli
49-
az role assignment list --all --assignee $(az k8s-extension show --name azure-aks-backup --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup --cluster-type managedClusters --query aksAssignedIdentity.principalId --output tsv)
50-
```
50+
2. If the extension is installed, then check if it has the right permissions on the storage account where backups are stored.
5151
52-
If the role isn't assigned, then you can assign the role by running the following command:
52+
```azurecli
53+
az role assignment list --all --assignee $(az k8s-extension show --name azure-aks-backup --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup --cluster-type managedClusters --query aksAssignedIdentity.principalId --output tsv)
54+
```
5355
54-
```azurecli
55-
az role assignment create --assignee-object-id $(az k8s-extension show --name azure-aks-backup --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup --cluster-type managedClusters --query aksAssignedIdentity.principalId --output tsv) --role 'Storage Account Contributor' --scope /subscriptions/$subscriptionId/resourceGroups/$storageaccountresourcegroup/providers/Microsoft.Storage/storageAccounts/$storageaccount
56+
3. If the role isn't assigned, then assign the role.
5657
57-
```
58+
```azurecli
59+
az role assignment create --assignee-object-id $(az k8s-extension show --name azure-aks-backup --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup --cluster-type managedClusters --query aksAssignedIdentity.principalId --output tsv) --role 'Storage Account Contributor' --scope /subscriptions/$subscriptionId/resourceGroups/$storageaccountresourcegroup/providers/Microsoft.Storage/storageAccounts/$storageaccount
5860
59-
If the Backup Extension isn't installed, then running the following extension installation command with the *storage account and blob container where backups are stored* as input.
61+
```
6062
61-
```azurecli
62-
az k8s-extension create --name azure-aks-backup --extension-type microsoft.dataprotection.kubernetes --scope cluster --cluster-type managedClusters --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup --release-train stable --configuration-settings blobContainer=$blobcontainer storageAccount=$storageaccount storageAccountResourceGroup=$storageaccountresourcegroup storageAccountSubscriptionId=$subscriptionId
63-
```
63+
4. If the Backup Extension isn't installed, then run the following extension installation command with the *storage account and blob container where backups are stored* as input.
6464
65-
Then assign the required role to the extension on the storage account by running the following command:
65+
```azurecli
66+
az k8s-extension create --name azure-aks-backup --extension-type microsoft.dataprotection.kubernetes --scope cluster --cluster-type managedClusters --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup --release-train stable --configuration-settings blobContainer=$blobcontainer storageAccount=$storageaccount storageAccountResourceGroup=$storageaccountresourcegroup storageAccountSubscriptionId=$subscriptionId
67+
```
6668
67-
```azurecli
68-
az role assignment create --assignee-object-id $(az k8s-extension show --name azure-aks-backup --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup --cluster-type managedClusters --query aksAssignedIdentity.principalId --output tsv) --role 'Storage Blob Data Contributor' --scope /subscriptions/$subscriptionId/resourceGroups/$storageaccountresourcegroup/providers/Microsoft.Storage/storageAccounts/$storageaccount
69+
5. Assign the required role to the extension on the storage account.
6970
70-
```
71+
```azurecli
72+
az role assignment create --assignee-object-id $(az k8s-extension show --name azure-aks-backup --cluster-name $targetakscluster --resource-group $aksclusterresourcegroup --cluster-type managedClusters --query aksAssignedIdentity.principalId --output tsv) --role 'Storage Blob Data Contributor' --scope /subscriptions/$subscriptionId/resourceGroups/$storageaccountresourcegroup/providers/Microsoft.Storage/storageAccounts/$storageaccount
73+
74+
```
7175
7276
## Check Trusted Access
7377
@@ -85,28 +89,32 @@ az aks trustedaccess rolebinding create --cluster-name $targetakscluster --name
8589

8690
## Restore to an AKS cluster
8791

92+
To restore to an AKS cluster, see the following sections.
93+
8894
### Fetch the relevant recovery point
8995

90-
Fetch all instances associated with the AKS cluster and identify the relevant instance.
96+
To fetch the relevant recovery point, run the following commands:
9197

92-
```azurecli
93-
az dataprotection backup-instance list-from-resourcegraph --datasource-type AzureKubernetesService --datasource-id /subscriptions/$subscriptionId/resourceGroups/$aksclusterresourcegroup/providers/Microsoft.ContainerService/managedClusters/$akscluster
98+
1. Fetch all instances associated with the AKS cluster and identify the relevant instance.
9499

95-
```
100+
```azurecli
101+
az dataprotection backup-instance list-from-resourcegraph --datasource-type AzureKubernetesService --datasource-id /subscriptions/$subscriptionId/resourceGroups/$aksclusterresourcegroup/providers/Microsoft.ContainerService/managedClusters/$akscluster
96102
103+
```
97104
98-
Once the instance is identified, fetch the relevant recovery point.
99105
100-
```azurecli
101-
az dataprotection recovery-point list --backup-instance-name $backupinstancename --resource-group $backupvaultresourcegroup --vault-name $backupvault
106+
2. Once the instance is identified, fetch the relevant recovery point.
102107
103-
```
104-
In case you're looking to restore backups to the secondary region, use the flag `--use-secondary-region` to identify recovery points available in that region.
108+
```azurecli
109+
az dataprotection recovery-point list --backup-instance-name $backupinstancename --resource-group $backupvaultresourcegroup --vault-name $backupvault
105110
106-
```azurecli
107-
az dataprotection recovery-point list --backup-instance-name $backupinstancename --resource-group $backupvaultresourcegroup --vault-name $backupvault --use-secondary-region true
111+
```
112+
3. If you're looking to restore backups to the secondary region, use the flag `--use-secondary-region` to identify recovery points available in that region.
108113
109-
```
114+
```azurecli
115+
az dataprotection recovery-point list --backup-instance-name $backupinstancename --resource-group $backupvaultresourcegroup --vault-name $backupvault --use-secondary-region true
116+
117+
```
110118
111119
### Prepare the restore request
112120

articles/backup/quick-backup-aks.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Quickstart: Configure an Azure Kubernetes Services cluster backup"
33
description: Learn how to configure backup for an Azure Kubernetes Service (AKS) cluster, and then use Azure Backup to back up specific items in the cluster.
44
ms.topic: quickstart
5-
ms.date: 11/14/2024
5+
ms.date: 01/21/2025
66
ms.service: azure-backup
77
ms.custom:
88
- ignite-2024
@@ -84,5 +84,8 @@ Before you configure vaulted backup for AKS cluster, ensure the following prereq
8484

8585
## Next step
8686

87+
Restore a backup for an AKS cluster using:
88+
8789
> [!div class="nextstepaction"]
88-
> [Restore a backup for an AKS cluster](./azure-kubernetes-service-cluster-restore.md)
90+
>- [Azure portal](./azure-kubernetes-service-cluster-restore.md)
91+
>- [Azure CLI](azure-kubernetes-service-cluster-restore-using-cli.md)

articles/backup/quick-kubernetes-backup-arm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Quickstart - Configure vaulted backup for an Azure Kubernetes Service (AK
33
description: Learn how to quickly configure backup for a Kubernetes cluster using Azure Resource Manager.
44
ms.service: azure-backup
55
ms.topic: quickstart
6-
ms.date: 05/31/2024
6+
ms.date: 01/21/2025
77
ms.custom: devx-track-terraform, devx-track-extended-azdevcli, ignite-2024
88
ms.reviewer: rajats
99
ms.author: jsuri
@@ -201,6 +201,6 @@ New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri
201201

202202
## Next steps
203203

204-
- [Restore Azure Kubernetes Service cluster using PowerShell](azure-kubernetes-service-cluster-restore-using-powershell.md)
204+
- Restore Azure Kubernetes Service cluster using [Azure PowerShell](azure-kubernetes-service-cluster-restore-using-powershell.md), [Azure CLI](azure-kubernetes-service-cluster-restore-using-cli.md)
205205
- [Manage Azure Kubernetes Service cluster backups](azure-kubernetes-service-cluster-manage-backups.md)
206206
- [About Azure Kubernetes Service cluster backup](azure-kubernetes-service-cluster-backup-concept.md)

articles/backup/quick-kubernetes-backup-bicep.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Quickstart - Configure vaulted backup for an Azure Kubernetes Service (AK
33
description: Learn how to quickly configure backup for a Kubernetes cluster using Azure Bicep.
44
ms.service: azure-backup
55
ms.topic: quickstart
6-
ms.date: 05/31/2024
6+
ms.date: 01/21/2025
77
ms.custom: devx-track-terraform, devx-track-extended-azdevcli, ignite-2024
88
ms.reviewer: rajats
99
ms.author: jsuri
@@ -197,6 +197,6 @@ New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri
197197

198198
## Next steps
199199

200-
- [Restore Azure Kubernetes Service cluster using PowerShell](azure-kubernetes-service-cluster-restore-using-powershell.md)
200+
- Restore Azure Kubernetes Service cluster using [Azure PowerShell](azure-kubernetes-service-cluster-restore-using-powershell.md), [Azure CLI](azure-kubernetes-service-cluster-restore-using-cli.md)
201201
- [Manage Azure Kubernetes Service cluster backups](azure-kubernetes-service-cluster-manage-backups.md)
202202
- [About Azure Kubernetes Service cluster backup](azure-kubernetes-service-cluster-backup-concept.md)

articles/backup/quick-kubernetes-backup-powershell.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Quickstart - Configure vaulted backup for an Azure Kubernetes Service (AK
33
description: Learn how to quickly configure backup for a Kubernetes cluster using PowerShell.
44
ms.service: azure-backup
55
ms.topic: quickstart
6-
ms.date: 05/31/2024
6+
ms.date: 01/21/2025
77
ms.custom: devx-track-terraform, devx-track-extended-azdevcli, ignite-2024
88
ms.reviewer: rajats
99
ms.author: jsuri
@@ -146,6 +146,6 @@ New-AzDataProtectionBackupInstance -ResourceGroupName "testBkpVaultRG" -VaultNam
146146

147147
## Next steps
148148

149-
- [Restore Azure Kubernetes Service cluster using PowerShell](azure-kubernetes-service-cluster-restore-using-powershell.md)
149+
- Restore Azure Kubernetes Service cluster using [Azure PowerShell](azure-kubernetes-service-cluster-restore-using-powershell.md), [Azure CLI](azure-kubernetes-service-cluster-restore-using-cli.md)
150150
- [Manage Azure Kubernetes Service cluster backups](azure-kubernetes-service-cluster-manage-backups.md)
151151
- [About Azure Kubernetes Service cluster backup](azure-kubernetes-service-cluster-backup-concept.md)

articles/backup/quick-kubernetes-backup-terraform.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Quickstart - Configure vaulted backup for an Azure Kubernetes Service (AK
33
description: Learn how to quickly configure backup for a Kubernetes cluster using Terraform.
44
ms.service: azure-backup
55
ms.topic: quickstart
6-
ms.date: 11/04/2024
6+
ms.date: 01/21/2025
77
ms.custom: devx-track-terraform, devx-track-extended-azdevcli
88
ms.reviewer: rajats
99
ms.author: jsuri
@@ -408,6 +408,7 @@ Learn more about:
408408

409409
> [!div class="nextstepaction"]
410410
> [Overview of AKS backup](azure-kubernetes-service-backup-overview.md).
411+
> [Restore AKS Cluster using Azure CLI](azure-kubernetes-service-cluster-restore-using-cli.md).
411412
> [How to use Azure Backup for AKS.][aks-home]
412413
413414
<!-- LINKS - internal -->

articles/backup/tutorial-configure-backup-aks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Tutorial: Configure item-level backup for an Azure Kubernetes Service cluster"
33
description: Learn how to configure backup for an Azure Kubernetes Service (AKS) cluster, and use Azure Backup to back up specific items from the cluster.
44
ms.topic: tutorial
5-
ms.date: 10/01/2024
5+
ms.date: 01/21/2025
66
ms.service: azure-backup
77
ms.custom:
88
- ignite-2023
@@ -114,4 +114,4 @@ The Backup vault communicates with the cluster via the Backup extension to compl
114114
## Next step
115115

116116
> [!div class="nextstepaction"]
117-
> [Restore a backup for an AKS cluster](./azure-kubernetes-service-cluster-restore.md)
117+
> Restore a backup for an AKS cluster using [Azure portal](./azure-kubernetes-service-cluster-restore.md), [Azure CLI](azure-kubernetes-service-cluster-restore-using-cli.md)

0 commit comments

Comments
 (0)