Skip to content

Commit 3256681

Browse files
authored
Merge pull request #274970 from rajats22/aksbackupupdate-1005-01
AKS Backup Updates
2 parents b9d8a60 + 75728b1 commit 3256681

3 files changed

+71
-31
lines changed

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

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ This article provides troubleshooting steps that help you resolve Azure Kubernet
2525
```
2626

2727

28-
**Cause**: The extension has been installed successfully, but the pods aren't spawning. This happens because the required compute and memory aren't available for the pods.
28+
**Cause**: The extension is installed successfully, but the pods aren't spawning because the required compute and memory aren't available for the pods.
2929

30-
**Resolution**: To resolve the issue, increase the number of nodes in the cluster. This allows sufficient compute and memory to be available for the pods to spawn.
30+
**Resolution**: To resolve the issue, increase the number of nodes in the cluster, allowing sufficient compute and memory to be available for the pods to spawn.
3131
To scale node pool on Azure portal, follow these steps:
3232

3333
1. On the Azure portal, open the *AKS cluster*.
@@ -45,7 +45,7 @@ To scale node pool on Azure portal, follow these steps:
4545
Endpoint http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&client_id=4e95dcc5-a769-4745-b2d9-
4646
```
4747

48-
**Cause**: When you enable pod-managed identity on your AKS cluster, an *AzurePodIdentityException* named *aks-addon-exception* is added to the *kube-system* namespace. An *AzurePodIdentityException* allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) endpoint without being intercepted by the NMI server.
48+
**Cause**: When you enable pod-managed identity on your AKS cluster, an *AzurePodIdentityException* named *aks-addon-exception* is added to the *kube-system* namespace. An *AzurePodIdentityException* allows pods with certain labels to access the Azure Instance Metadata Service (IMDS) endpoint are not intercepted by the NMI server.
4949

5050
The extension pods aren't exempt, and require the Microsoft Entra pod identity to be enabled manually.
5151

@@ -82,13 +82,28 @@ This error appears due to absence of these FQDN rules because of which configura
8282

8383
**Resolution**: To resolve the issue, you need to create a *CoreDNS-custom override* for the *DP* endpoint to pass through the public network.
8484

85-
1. To fetch *Existing CoreDNS-custom* YAML in your cluster (save it on your local for reference later), run the following command:
85+
1. Get Existing CoreDNS-custom YAML in your cluster (save it on your local for reference later)::
8686

8787
```azurecli-interactive
8888
kubectl get configmap coredns-custom -n kube-system -o yaml
8989
```
9090

91-
2. To override mapping for *Central US DP* endpoint to public IP (download the YAML file attached), run the following command:
91+
2. Override mapping for centralus DP endpoint to Public IP (use the below YAML):
92+
93+
```yaml
94+
apiVersion: v1
95+
kind: ConfigMap
96+
metadata:
97+
name: coredns-custom
98+
namespace: kube-system
99+
data:
100+
aksdp.override: |
101+
hosts {
102+
20.40.200.153 centralus.dp.kubernetesconfiguration.azure.com
103+
fallthrough
104+
}
105+
```
106+
Now run the below command to apply the update yaml file:
92107
93108
```azurecli-interactive
94109
kubectl apply -f corednsms.yaml
@@ -200,7 +215,7 @@ These error codes appear due to issues based on the Backup extension installed i
200215

201216
**Cause**: During extension installation, a Backup Storage Location is to be provided as input that includes a storage account and blob container. The Backup extension should have *Storage Blob Data Contributor* role on the Backup Storage Location (storage account). The Extension Identity gets this role assigned.
202217

203-
**Recommended action**: The error appears if the Extension Identity doesn't have right permissions to access the storage account. This error appears if AKS backup extension is installed the first time when configuring protection operation. This happens for the time taken for the granted permissions to propagate to the AKS backup extension. As a workaround, wait an hour and retry the protection configuration. Otherwise, use Azure portal or CLI to reassign this missing permission on the storage account.
218+
**Recommended action**: The error appears if the Extension Identity doesn't have right permissions to access the storage account. This error appears if AKS backup extension is installed the first time when configuring protection operation. This happens for the time taken for the granted permissions to propagate to the AKS backup extension. As a workaround, wait an hour and retry the protection configuration. Otherwise, use Azure portal or CLI to reassign this missing permission on the storage account.
204219

205220
## Vaulted backup based errors
206221

@@ -238,7 +253,7 @@ This error code can appear while you enable AKS backup to store backups in a vau
238253

239254
**Cause**: There is a limited number of snapshots for a Persistent Volume that can exist at a point-in-time. For Azure Disk-based Persistent Volumes, the limit is *500 snapshots*. This error appears when snapshots for specific Persistent Volumes aren't taken due to existence of snapshots higher than the supported limits.
240255

241-
**Recommended action**: Update the Backup Policy to reduce the retention duration and wait for older recovery points to be deleted by the Backup vault.
256+
**Recommended action**: Update the Backup Policy to reduce the retention duration and wait for Backup Vault to delete the older recovery points.
242257

243258
### CSISnapshottingTimedOut
244259

@@ -268,15 +283,15 @@ This error code can appear while you enable AKS backup to store backups in a vau
268283

269284
**Error code**: UserErrorPVCHasNoVolume
270285

271-
**Cause**: The Persistent Volume Claim (PVC) in context does not have a Persistent Volume attached to it. So, the PVC will not be backed up.
286+
**Cause**: The Persistent Volume Claim (PVC) in context doesn't have a Persistent Volume attached to it. So, the PVC won't be backed up.
272287

273288
**Recommended action**: Attach a volume to the PVC, if it needs to be backed up.
274289

275290
### UserErrorPVCNotBoundToVolume
276291

277292
**Error code**: UserErrorPVCNotBoundToVolume
278293

279-
**Cause**: The PVC in context is in *Pending* state and doesn't have a Persistent Volume attached to it. So, the PVC will not be backed up.
294+
**Cause**: The PVC in context is in *Pending* state and doesn't have a Persistent Volume attached to it. So, the PVC won't be backed up.
280295

281296
**Recommended action**: Attach a volume to the PVC, if it needs to be backed up.
282297

articles/backup/azure-kubernetes-service-cluster-backup-support-matrix.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ You can use [Azure Backup](./backup-overview.md) to help protect Azure Kubernete
3535

3636
- AKS backups don't support in-tree volumes. You can back up only CSI driver-based volumes. You can [migrate from tree volumes to CSI driver-based persistent volumes](../aks/csi-migrate-in-tree-volumes.md).
3737

38-
- Currently, an AKS backup supports only the backup of Azure disk-based persistent volumes (enabled by the CSI driver). Both static and dynamically provisioned volumes are supported. For backup of static disks, the persistent volumes specification should have the *storage class* defined in the **YAML** file, otherwise such persistent volumes will be skipped from the backup operation.
38+
- Currently, an AKS backup supports only the backup of Azure disk-based persistent volumes (enabled by the CSI driver). The supported Azure Disk SKUs are Standard HDD, Standard SSD, and Premium SSD. The disks belonging to Premium SSD v2 and Ultra Disk SKU are not supported. Both static and dynamically provisioned volumes are supported. For backup of static disks, the persistent volumes specification should have the *storage class* defined in the **YAML** file, otherwise such persistent volumes will be skipped from the backup operation.
3939

4040
- Azure Files shares and Azure Blob Storage persistent volumes are currently not supported by AKS backup due to lack of CSI Driver-based snapshotting capability. If you're using said persistent volumes in your AKS clusters, you can configure backups for them via the Azure Backup solutions. For more information, see [Azure file share backup](azure-file-share-backup-overview.md) and [Azure Blob Storage backup](blob-backup-overview.md).
4141

@@ -47,7 +47,7 @@ You can use [Azure Backup](./backup-overview.md) to help protect Azure Kubernete
4747

4848
- You must install the backup extension in the AKS cluster. If you're using Azure CLI to install the backup extension, ensure that the version is 2.41 or later. Use `az upgrade` command to upgrade the Azure CLI.
4949

50-
- The blob container provided as input during installation of the backup extension should be in the same region and subscription as that of the AKS cluster.
50+
- The blob container provided as input during installation of the backup extension should be in the same region and subscription as that of the AKS cluster. Only blob containers in a General-purpose V2 Storage Account are supported and Premium Storage Account are not supported.
5151

5252
- The Backup vault and the AKS cluster should be in the same region and subscription.
5353

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

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,39 @@ You can perform both *Original-Location Recovery (OLR)* (restoring in the AKS cl
2222
>[!Note]
2323
>Before you initiate a restore operation, the target cluster should have Backup Extension installed and Trusted Access enabled for the Backup vault. [Learn more](azure-kubernetes-service-cluster-backup-using-powershell.md#prepare-aks-cluster-for-backup).
2424
25-
Here, we've used an existing Backup vault *TestBkpVault*, under the resource group *testBkpVaultRG*, in the examples.
25+
Initialize the variables with required details related to each resource to be used in commands:
2626

27-
```azurepowershell
28-
$TestBkpVault = Get-AzDataProtectionBackupVault -VaultName TestBkpVault -ResourceGroupName "testBkpVaultRG"
29-
```
27+
- Subscription ID of the Backup Vault
28+
29+
```azurepowershell
30+
$vaultSubId = "xxxxxxxx-xxxx-xxxx-xxxx"
31+
```
32+
- Resource Group to which Backup Vault belongs to
33+
34+
```azurepowershell
35+
$vaultRgName = "testBkpVaultRG"
36+
```
37+
38+
- Name of the Backup Vault
39+
40+
```azurepowershell
41+
$vaultName = "TestBkpVault"
42+
```
43+
- Region to which the Backup Vault belongs to
44+
45+
```azurepowershell
46+
$restoreLocation = "vaultRegion" #example eastus
47+
```
48+
49+
- ID of the target AKS cluster, in case the restore will be performed to an alternate AKS cluster
50+
51+
```azurepowershell
52+
$targetAKSClusterId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx/resourceGroups/targetrg/providers/Microsoft.ContainerService/managedClusters/PSAKSCluster2"
53+
```
3054
3155
## Before you start
3256
33-
- 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 will be picked up during the restore.
57+
- 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 will be restored.
3458
3559
- 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#register-the-trusted-access) between the Backup vault and the AKS cluster.
3660
@@ -43,29 +67,23 @@ For more information on the limitations and supported scenarios, see the [suppor
4367
Fetch all instances using the `Get-AzDataProtectionBackupInstance` cmdlet and identify the relevant instance.
4468
4569
```azurepowershell
46-
$AllInstances = Get-AzDataProtectionBackupInstance -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name
70+
$AllInstances = Get-AzDataProtectionBackupInstance -ResourceGroupName $vaultRgName -VaultName $vaultName
4771
```
4872

4973
You can also use `Az.Resourcegraph` and `Search-AzDataProtectionBackupInstanceInAzGraph` cmdlets to search across instances in multiple vaults and subscriptions.
5074

5175
```azurepowershell
52-
$AllInstances = Search-AzDataProtectionBackupInstanceInAzGraph -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -DatasourceType AzureKubernetesService -ProtectionStatus ProtectionConfigured
76+
$AllInstances = Search-AzDataProtectionBackupInstanceInAzGraph -Subscription $vaultSubId -ResourceGroup $vaultRgName -Vault $vaultName -DatasourceType AzureKubernetesService -ProtectionStatus ProtectionConfigured
5377
```
5478

55-
Once the instance is identified, fetch the relevant recovery point.
79+
Once the instance is identified, fetch the relevant recovery point. Supposedly, from the output array of the above command, third backup instance is to be restored.
5680

5781
```azurepowershell
58-
$rp = Get-AzDataProtectionRecoveryPoint -ResourceGroupName "testBkpVaultRG" -VaultName $TestBkpVault.Name -BackupInstanceName $AllInstances[2].BackupInstanceName
82+
$rp = Get-AzDataProtectionRecoveryPoint -ResourceGroupName $vaultRgName -VaultName $vaultName -BackupInstanceName $AllInstances[2].BackupInstanceName
5983
```
6084

6185
### Prepare the restore request
6286

63-
Get the Azure Resource Manager ID of the AKS cluster where you want to perform the restore operation.
64-
65-
```azurepowershell
66-
$targetAKSClusterd = /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx/resourceGroups/targetrg/providers/Microsoft.ContainerService/managedClusters/PSAKSCluster2
67-
```
68-
6987
Use the `New-AzDataProtectionRestoreConfigurationClientObject` cmdlet to prepare the restore configuration and defining the items to be restored to the target AKS cluster.
7088

7189
```azurepowershell
@@ -74,16 +92,23 @@ $aksRestoreCriteria = New-AzDataProtectionRestoreConfigurationClientObject -Data
7492

7593
Then, use the `Initialize-AzDataProtectionRestoreRequest` cmdlet to prepare the restore request with all relevant details.
7694

95+
In case you want to perform restore to the original AKS cluster backedup, use the below format for the cmdlet
96+
97+
```azurepowershell
98+
$aksRestoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureKubernetesService -SourceDataStore OperationalStore -RestoreLocation $restoreLocation -RestoreType OriginalLocation -RecoveryPoint $rp[0].Property.RecoveryPointId -RestoreConfiguration $aksRestoreCriteria -BackupInstance $AllInstances[2]
99+
```
100+
In case you want to perform restore to an alternate AKS cluster, use the below format for the cmdlet
101+
77102
```azurepowershell
78-
$aksRestoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureKubernetesService -SourceDataStore OperationalStore -RestoreLocation $dataSourceLocation -RestoreType OriginalLocation -RecoveryPoint $rps[0].Property.RecoveryPointId -RestoreConfiguration $aksRestoreCriteria -BackupInstance $backupInstance
103+
$aksRestoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureKubernetesService -SourceDataStore OperationalStore -RestoreLocation $restoreLocation -RestoreType AlternateLocation -TargetResourceId $targetAKSClusterId -RecoveryPoint $rp[0].Property.RecoveryPointId -RestoreConfiguration $aksRestoreCriteria -BackupInstance $AllInstances[2]
79104
```
80105

81106
## Trigger the restore
82107

83108
Before you trigger the restore operation, validate the restore request created earlier.
84109

85110
```azurepowershell
86-
$validateRestore = Test-AzDataProtectionBackupInstanceRestore -SubscriptionId $sub -ResourceGroupName $rgName -VaultName $vaultName -RestoreRequest $aksRestoreRequest -Name $backupInstance.BackupInstanceName
111+
$validateRestore = Test-AzDataProtectionBackupInstanceRestore -SubscriptionId $vaultSubId -ResourceGroupName $vaultRgName -VaultName $vaultName -RestoreRequest $aksRestoreRequest -Name $AllInstances[2].BackupInstanceName
87112
```
88113

89114
>[!Note]
@@ -93,10 +118,10 @@ $validateRestore = Test-AzDataProtectionBackupInstanceRestore -SubscriptionId $s
93118
2. The *User Identity* attached with the Backup Extension should have *Storage Account Contributor* roles on the *storage account* where backups are stored.
94119
3. The *Backup vault* should have a *Reader* role on the *Target AKS cluster* and *Snapshot Resource Group*.
95120

96-
Now, use the `Start-AzDataProtectionBackupInstanceRestore` cmdlet to trigger the restore operation with the request prepared above.
121+
Now, use the `Start-AzDataProtectionBackupInstanceRestore` cmdlet to trigger the restore operation with the request prepared earlier.
97122

98123
```azurepowershell
99-
$restoreJob = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId $sub -ResourceGroupName $rgName -VaultName $vaultName -BackupInstanceName $backupInstance.BackupInstanceName -Parameter $aksRestoreRequest
124+
$restoreJob = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId $vaultSubId -ResourceGroupName $vaultRgName -VaultName $vaultName -BackupInstanceName $AllInstances[2].BackupInstanceName -Parameter $aksRestoreRequest
100125
```
101126

102127
## Tracking job
@@ -106,7 +131,7 @@ Track all the jobs using the `Get-AzDataProtectionJob` cmdlet. You can list all
106131
Use the `Search-AzDataProtectionJobInAzGraph` cmdlet to get the relevant job, which can be across any Backup vault.
107132

108133
```azurepowershell
109-
$job = Search-AzDataProtectionJobInAzGraph -Subscription $sub -ResourceGroupName "testBkpVaultRG" -Vault $TestBkpVault.Name -DatasourceType AzureDisk -Operation OnDemandBackup
134+
$job = Search-AzDataProtectionJobInAzGraph -Subscription -SubscriptionId $vaultSubId -ResourceGroup $vaultRgName -Vault $vaultName -DatasourceType AzureKubernetesService -Operation Restore
110135
```
111136

112137
## Next steps

0 commit comments

Comments
 (0)