Skip to content

Commit 699b449

Browse files
Merge pull request #17819 from sethmanheim/frsh5-1
AKS Arc freshness on a few articles
2 parents b77a729 + 6d952b6 commit 699b449

File tree

2 files changed

+69
-77
lines changed

2 files changed

+69
-77
lines changed

AKS-Arc/backup-workload-cluster.md

Lines changed: 61 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ title: Back up, restore workload clusters using Velero
33
description: Learn how to back up and restore workload clusters to Azure Blob Storage or MinIO using Velero in AKS Arc.
44
author: sethmanheim
55
ms.topic: how-to
6-
ms.date: 07/03/2024
6+
ms.date: 05/01/2025
77
ms.author: sethm
88
ms.lastreviewed: 1/14/2022
9-
ms.reviewer: scooley
109

1110
# Intent: As an IT Pro, I want to learn how to perform a workload cluster backup or restore so I can recover from a failure or disaster.
1211
# Keyword: workload cluster backup restore Velero Azure Blob MinIO
@@ -28,14 +27,14 @@ If you don't want to store your backups in Azure Blob Storage, you can use MinIO
2827
2928
## Prerequisites
3029

31-
Complete these prerequisites before you begin your Velero deployment:
30+
Before you begin, make sure you have the following prerequisites:
3231

3332
- [Install the Azure CLI](/cli/azure/install-azure-cli).
3433
- [Install `Chocolatey`](https://chocolatey.org/install). You can use `Chocolatey` to [install the Velero client](https://community.chocolatey.org/packages/velero), which includes the Velero CLI, on a Windows machine.
3534

3635
## Install Velero with Azure Blob Storage
3736

38-
The procedures in this section describe how to install Velero and use Azure Blob Storage for backups. If you don't want to store your backups in Azure, go to [Install Velero with MiniO storage](#install-velero-with-minio-storage).
37+
The procedures in this section describe how to install Velero and use Azure Blob Storage for backups. If you don't want to store your backups in Azure, see [Install Velero with MiniO storage](#install-velero-with-minio-storage).
3938

4039
1. Open PowerShell as an administrator.
4140

@@ -56,7 +55,7 @@ The procedures in this section describe how to install Velero and use Azure Blob
5655

5756
1. If needed, change to the Azure subscription you want to use for the backups.
5857

59-
By default, Velero stores backups in the same Azure subscription as your VMs and disks and won't allow you to restore backups to a resource group in a different subscription. To enable backup and restore operations across subscriptions, specify a subscription to use for your backups. You can skip this step if you're already in the subscription you want to use for your backups.
58+
By default, Velero stores backups in the same Azure subscription as your VMs and disks and doesn't allow you to restore backups to a resource group in a different subscription. To enable backup and restore operations across subscriptions, specify a subscription to use for your backups. You can skip this step if you're already in the subscription you want to use for your backups.
6059

6160
Switch to the subscription you want to use for your backups:
6261

@@ -67,7 +66,7 @@ The procedures in this section describe how to install Velero and use Azure Blob
6766
$AZURE_BACKUP_SUBSCRIPTION_ID=$(az account list --query="[?name=='$AZURE_BACKUP_SUBSCRIPTION_NAME'].id | [0]" -o tsv)
6867
```
6968
70-
1. Then change the subscription:
69+
1. Then, change the subscription:
7170
7271
```azurecli
7372
az account set -s $AZURE_BACKUP_SUBSCRIPTION_ID
@@ -118,16 +117,16 @@ The procedures in this section describe how to install Velero and use Azure Blob
118117
119118
1. Create a service principal that has Contributor privileges.
120119
121-
You can create a service principal with the Contributor role or use a custom role:
120+
You can create a service principal with the **Contributor** role, or use a custom role:
122121
123122
- **Contributor role:** The Contributor role grants subscription-wide access, so be sure protect this credential if you assign that role.
124123
- **Custom role:** If you need a more restrictive role, use a custom role.
125124
126125
Assign the Contributor role:
127126
128-
If you'll be using Velero to back up multiple clusters with multiple blob containers, you may want to create a unique username for each cluster instead of using the name `velero`.
127+
If you're using Velero to back up multiple clusters with multiple blob containers, you might want to create a unique username for each cluster instead of using the name `velero`.
129128
130-
To create a service principal with the Contributor role, use the following command. Substitute your own subscription ID and, optionally, your own service principal name. Microsoft Entra ID will generate a secret for you.
129+
To create a service principal with the Contributor role, run the following command. Substitute your own subscription ID and optionally, your own service principal name. Microsoft Entra ID generates a secret for you:
131130
132131
```azurecli
133132
$AZURE_CLIENT_SECRET=(az ad sp create-for-rbac --name "velero" --role "Contributor" --query 'password' -o tsv --scopes /subscriptions/$AZURE_SUBSCRIPTION_ID)
@@ -141,51 +140,48 @@ The procedures in this section describe how to install Velero and use Azure Blob
141140
$AZURE_CLIENT_SECRET=(az ad sp create-for-rbac --name "velero" --role "Contributor" --query 'password' -o tsv --scopes /subscriptions/$AZURE_SUBSCRIPTION_ID /subscriptions/$AZURE_BACKUP_SUBSCRIPTION_ID)
142141
```
143142
144-
- If you don't want to use `velero` as your service principal name, make sure the `--name` you choose is unique in Microsoft Entra ID and doesn't conflict with other service principals or app registrations.
143+
- If you don't want to use `velero` as your service principal name, make sure the `--name` value you choose is unique in Microsoft Entra ID and doesn't conflict with other service principals or app registrations.
145144
146145
> [!IMPORTANT]
147-
> The secret is shown only during this step, when the service principal is created. Be sure to make a note of the secret for use in future steps.
148-
149-
Use a custom role:
146+
> The secret is only shown during this step, when the service principal is created. Be sure to make a note of the secret for use in future steps.
150147
151148
If you want to enable the minimum resource provider actions, create a custom role, and assign that role to the service principal.
152149
153-
1. Create a file named **azure-role.json** with following contents. Substitute your own custom role name and subscription ID:
154-
155-
```json
156-
{
157-
"Name": <CUSTOM_ROLE_NAME>,
158-
"Id": null,
159-
"IsCustom": true,
160-
"Description": "Velero related permissions to perform backups, restores and deletions",
161-
"Actions": [
162-
"Microsoft.Compute/disks/read",
163-
"Microsoft.Compute/disks/write",
164-
"Microsoft.Compute/disks/endGetAccess/action",
165-
"Microsoft.Compute/disks/beginGetAccess/action",
166-
"Microsoft.Compute/snapshots/read",
167-
"Microsoft.Compute/snapshots/write",
168-
"Microsoft.Compute/snapshots/delete",
169-
"Microsoft.Storage/storageAccounts/listkeys/action",
170-
"Microsoft.Storage/storageAccounts/regeneratekey/action",
171-
"Microsoft.Storage/storageAccounts/read"
172-
],
173-
"NotActions": [],
174-
"AssignableScopes": [
175-
"<SUBSCRIPTION_ID>"
176-
]
177-
}
178-
```
179-
180-
1. Create the custom role and service principal:
150+
1. Create a file named **azure-role.json** with following contents. Substitute your own custom role name and subscription ID:
151+
152+
```json
153+
{
154+
"Name": <CUSTOM_ROLE_NAME>,
155+
"Id": null,
156+
"IsCustom": true,
157+
"Description": "Velero related permissions to perform backups, restores and deletions",
158+
"Actions": [
159+
"Microsoft.Compute/disks/read",
160+
"Microsoft.Compute/disks/write",
161+
"Microsoft.Compute/disks/endGetAccess/action",
162+
"Microsoft.Compute/disks/beginGetAccess/action",
163+
"Microsoft.Compute/snapshots/read",
164+
"Microsoft.Compute/snapshots/write",
165+
"Microsoft.Compute/snapshots/delete",
166+
"Microsoft.Storage/storageAccounts/listkeys/action",
167+
"Microsoft.Storage/storageAccounts/regeneratekey/action",
168+
"Microsoft.Storage/storageAccounts/read"
169+
],
170+
"NotActions": [],
171+
"AssignableScopes": [
172+
"<SUBSCRIPTION_ID>"
173+
]
174+
}
175+
```
181176
182-
```azurecli
183-
az role definition create --role-definition azure-role.json
177+
1. Create the custom role and service principal:
184178
185-
$AZURE_CLIENT_SECRET=(az ad sp create-for-rbac --name "velero" --role "<CUSTOM_ROLE>" --query 'password' -o tsv --scopes /subscriptions/$AZURE_SUBSCRIPTION_ID)
186-
```
179+
```azurecli
180+
az role definition create --role-definition azure-role.json
181+
$AZURE_CLIENT_SECRET=(az ad sp create-for-rbac --name "velero" --role "<CUSTOM_ROLE>" --query 'password' -o tsv --scopes /subscriptions/$AZURE_SUBSCRIPTION_ID)
182+
```
187183
188-
For more information about creating custom roles, see [Set permissions for Velero](https://github.com/vmware-tanzu/velero-plugin-for-microsoft-azure#specify-role).
184+
For more information about creating custom roles, see [Set permissions for Velero](https://github.com/vmware-tanzu/velero-plugin-for-microsoft-azure#specify-role).
189185
190186
1. Get the service principal name, and assign that name to the **AZURE_CLIENT_ID** variable:
191187
@@ -208,17 +204,15 @@ The procedures in this section describe how to install Velero and use Azure Blob
208204
```
209205

210206
> [!IMPORTANT]
211-
> Delete this file after you install Velero. The client secret is in plaintext, which can pose a security risk.
207+
> Delete this file after you install Velero. The client secret is in plain text, which can pose a security risk.
212208
213209
Before proceeding, verify that the file is properly formatted. The file name extension doesn't matter.
214210
- Remove any extra spaces or tabs.
215211
- Make sure the variable names are correct.
216212

217-
1. Install and start Velero.
218-
219-
Install Velero on the cluster, and start the deployment. This procedure creates a namespace called `velero` and adds a deployment named `velero` to the namespace.
213+
1. Install Velero on the cluster, and start the deployment. This procedure creates a namespace called `velero` and adds a deployment named `velero` to the namespace.
220214

221-
1. Install Velero using the following command. You'll need to customize the example command.
215+
1. Install Velero using the following command. Make sure to replace the placeholders in the example command with your own values:
222216

223217
```powershell
224218
velero install --provider azure --plugins velero/velero-plugin-for-microsoft-azure:v1.5.0 --bucket $BLOB_CONTAINER --secret-file ./credentials-velero.txt --backup-location-config resourceGroup=$AZURE_BACKUP_RESOURCE_GROUP,storageAccount=$AZURE_STORAGE_ACCOUNT_ID,subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID --use-restic
@@ -230,7 +224,7 @@ The procedures in this section describe how to install Velero and use Azure Blob
230224
231225
- Be sure to include the `--use-restic` parameter to enable backup of Kubernetes volumes at the file system level using `Restic`. `Restic` can be used to back up any type of Kubernetes volume. By default, Velero supports taking snapshots of persistent volumes for Amazon EBS Volumes, Azure Managed Disks, and Google Persistent Disks. In AKS Arc, Kubernetes volumes use Cluster Shared Volumes (CSVs) to store data. Hence, `Restic` is needed to enable persistent volume snapshots. AKS Arc currently doesn't support volume snapshots.
232226
233-
- `subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID` is optional. You only need to include it if Velero and the workload cluster have different subscription IDs. If they use the same Azure subscription, you can remove the `subscriptionId` parameter, and the **credentials-velero.txt** file will provide that information.
227+
- `subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID` is optional. You only need to include it if Velero and the workload cluster have different subscription IDs. If they use the same Azure subscription, you can remove the `subscriptionId` parameter, and the **credentials-velero.txt** file provides that information.
234228
235229
The Velero service starts automatically on installation.
236230
@@ -249,7 +243,7 @@ The procedures in this section describe how to install Velero and use [MinIO](ht
249243
250244
If you don't want to store your backups in MinIO, go to [Set up Velero to use Azure Blob Storage](#install-velero-with-azure-blob-storage).
251245
252-
1. Install the Velero CLI by running the following command. [Install `Chocolately`](https://chocolatey.org/install) if you haven't already.
246+
1. Install the Velero CLI by running the following command. [Install `Chocolately`](https://chocolatey.org/install) if you haven't already:
253247
254248
```powershell
255249
choco install velero
@@ -322,7 +316,7 @@ If you don't want to store your backups in MinIO, go to [Set up Velero to use Az
322316
mountPath: "/storage"
323317
```
324318

325-
Then create the deployment:
319+
Then, create the deployment:
326320

327321
```shell
328322
kubectl create -f minio-deployment.yaml
@@ -347,21 +341,19 @@ If you don't want to store your backups in MinIO, go to [Set up Velero to use Az
347341
app: minio
348342
```
349343

350-
Then create the service:
344+
Then, create the service:
351345

352346
```shell
353347
kubectl create -f mino-service.yaml
354348
```
355349

356-
1. Get the MinIO pod's external IP address by running the following command. You'll use that address to install Velero.
350+
1. Get the MinIO pod's external IP address by running the following command. You use that address to install Velero:
357351

358-
```shell
352+
```bash
359353
kubectl get svc
360354
```
361355

362-
1. To check whether MinIO is up and running, log in to the IP address in a browser, or use the MinIO client, as described below.
363-
364-
Install the MinIO client, and browse through the MinIO files.
356+
1. To check whether MinIO is up and running, sign in to the IP address in a browser, or use the MinIO client, as described in this section. Install the MinIO client, and browse through the MinIO files.
365357

366358
Download the MinIO client:
367359

@@ -387,7 +379,7 @@ If you don't want to store your backups in MinIO, go to [Set up Velero to use Az
387379
mc mb minio/velero-backup
388380
```
389381

390-
1. Create a MinIO credentials file **minio.credentials** with the following information:
382+
1. Create a MinIO credentials file **minio.credentials** with the following contents:
391383

392384
```yaml
393385
[default]
@@ -454,7 +446,7 @@ To restore a cluster, you must create a new cluster to restore the old cluster t
454446

455447
The `restore` command lets you restore all objects and persistent volumes from a previously created backup. You can also restore only a filtered subset of objects and persistent volumes. For more backup options, see [Resource filtering](https://velero.io/docs/v1.9/resource-filtering/).
456448

457-
On the cluster that you want to restore the backup to (the *destination cluster*):
449+
On the cluster to which you want to restore the backup (the *destination cluster*):
458450

459451
1. Deploy Velero by using the instructions above. Use the same Azure credentials that you used for the source cluster.
460452

@@ -477,13 +469,13 @@ To see all options associated with a specific Velero command, use the `--help` f
477469
For example, to list all options of `velero restore`, run `velero restore --help`, which returns the following information:
478470

479471
```output
480-
velero restore [command]
481-
Available Commands:
482-
create Create a restore
483-
delete Delete restores
484-
describe Describe restores
485-
get Get restores
486-
logs Get restore logs
472+
velero restore [command]
473+
Available Commands:
474+
create Create a restore
475+
delete Delete restores
476+
describe Describe restores
477+
get Get restores
478+
logs Get restore logs
487479
```
488480

489481
## Uninstall Velero

AKS-Arc/secrets-store-csi-driver.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Kubernetes Secrets Store CSI driver integration
33
description: Learn how to use the Azure Key Vault Provider for Secrets Store CSI Driver to integrate secrets stores with AKS on Windows Server.
44
author: sethmanheim
55
ms.topic: how-to
6-
ms.date: 06/27/2024
6+
ms.date: 05/01/2025
77
ms.author: sethm
88

99
# Intent: As an IT Pro, I want to learn how to use the Azure Key Vault Provider to integrate the Kubernetes Secret Store CSI Driver.
@@ -15,7 +15,7 @@ ms.author: sethm
1515

1616
[!INCLUDE [applies-to-azure stack-hci-and-windows-server-skus](includes/aks-hci-applies-to-skus/aks-hybrid-applies-to-azure-stack-hci-windows-server-sku.md)]
1717

18-
The Kubernetes Secrets Store CSI Driver integrates secrets stores with Kubernetes through a [Container Storage Interface (CSI) volume](https://kubernetes-csi.github.io/docs/). If you integrate the Secrets Store CSI Driver with AKS on Windows Server, you can mount secrets, keys, and certificates as a volume. The data is then mounted in the container's file system.
18+
The *Kubernetes Secrets Store CSI driver* integrates secrets stores with Kubernetes using a [Container Storage Interface (CSI) volume](https://kubernetes-csi.github.io/docs/). If you integrate the Secrets Store CSI driver with AKS on Windows Server, you can mount secrets, keys, and certificates as a volume. The data is then mounted in the container's file system.
1919

2020
With the Secrets Store CSI driver, you can also integrate a key vault with one of the supported providers, such as [Azure Key Vault](/azure/key-vault/general/overview).
2121

@@ -105,7 +105,7 @@ az keyvault secret set --vault-name <keyvault-name> -n ExampleSecret --value MyA
105105

106106
## Create an identity in Azure
107107

108-
Use a service principal to access the Azure Key Vault instance that you created in the previous step. You should record the outputs when running the following commands. You use both the client secret and client ID in the next steps.
108+
Use a service principal to access the Azure Key Vault instance that you created in the previous step. You should record the output when running the following commands. You use both the client secret and client ID in the next steps.
109109

110110
Provide the client secret by running the following command:
111111

@@ -143,28 +143,28 @@ kubectl label secret secrets-store-creds secrets-store.csi.k8s.io/used=true
143143

144144
## Create and apply your own SecretProviderClass object
145145

146-
To use and configure the Secrets Store CSI driver for your Kubernetes cluster, create a `SecretProviderClass` custom resource. Ensure the `objects` array matches the objects you've stored in the Azure Key Vault instance:
146+
To use and configure the Secrets Store CSI driver for your Kubernetes cluster, create a `SecretProviderClass` custom resource. Ensure the `objects` array matches the objects you stored in the Azure Key Vault instance:
147147

148148
```yaml
149149
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
150150
kind: SecretProviderClass
151151
metadata:
152-
name: <keyvault-name> # The name of the Azure Key Vault
152+
name: <keyvault-name> # The name of the Azure key vault
153153
namespace: kube-system
154154
spec:
155155
provider: azure
156156
parameters:
157-
keyvaultName: "<keyvault-name>" # The name of the Azure Key Vault
157+
keyvaultName: "<keyvault-name>" # The name of the Azure key vault
158158
useVMManagedIdentity: "false"
159159
userAssignedIdentityID: "false"
160-
cloudName: "" # [OPTIONAL for Azure] if not provided, Azure environment defaults to AzurePublicCloud
160+
cloudName: "" # [OPTIONAL for Azure] if not provided, the Azure environment defaults to AzurePublicCloud
161161
objects: |
162162
array:
163163
- |
164164
objectName: <secret-name> # In this example, 'ExampleSecret'
165165
objectType: secret # Object types: secret, key or cert
166166
objectVersion: "" # [OPTIONAL] object versions, default to latest if empty
167-
tenantId: "<tenant-id>" # the tenant ID containing the Azure Key Vault instance
167+
tenantId: "<tenant-id>" # The tenant ID containing the Azure Key Vault instance
168168
```
169169
170170
## Apply the SecretProviderClass to your cluster

0 commit comments

Comments
 (0)