Skip to content

Commit 20ef1b4

Browse files
committed
update in aks backup cli
1 parent 0c92a33 commit 20ef1b4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,23 @@ Once the vault and policy creation are complete, you need to perform the followi
214214
az k8s-extension create --name azure-aks-backup --extension-type microsoft.dataprotection.kubernetes --scope cluster --cluster-type managedClusters --cluster-name $akscluster --resource-group $aksclusterresourcegroup --release-train stable --configuration-settings blobContainer=$blobcontainer storageAccount=$storageaccount storageAccountResourceGroup=$storageaccountresourcegroup storageAccountSubscriptionId=$subscriptionId
215215
```
216216

217+
In case the AKS cluster is within a virtual network, then you will have to create a private endpoint, connecting thw storage account with the virtual network in which the AKS cluster resides.
218+
219+
```azurecli
220+
#Fetch the Subnet ID using the name of the virtual network in which cluster resides and the name of the subnet #underneath.
221+
$PESubnetId = az network vnet subnet show --resource-group $aksMCResourceGroup --vnet-name $aksVnetName --name $PESubnetName --query 'id' --output tsv
222+
223+
#Create a Private Endpoint between Storage Account and the Virtual Network.
224+
az network private-endpoint create `
225+
--resource-group $aksclusterresourcegroup `
226+
--name $StoragePrivateEndpoint `
227+
--vnet-name $aksVnetName `
228+
--subnet $PESubnetId `
229+
--private-connection-resource-id $(az storage account show --nameD $storageaccount --resource-group $storageaccountresourcegroup --query "id" --output tsv) `
230+
--group-ids "blob" `
231+
--connection-name "StoragePESharedVNetConnection"
232+
```
233+
217234
As part of extension installation, a user identity is created in the AKS cluster's Node Pool Resource Group. For the extension to access the storage account, you need to provide this identity the **Storage Blob Data Contributor** role. To assign the required role, run the following command:
218235

219236
```azurecli

0 commit comments

Comments
 (0)