You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-arc/kubernetes/tutorial-akv-secrets-provider.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,8 @@
2
2
title: Use Azure Key Vault Secrets Provider extension to fetch secrets into Azure Arc-enabled Kubernetes clusters
3
3
description: Learn how to set up the Azure Key Vault Provider for Secrets Store CSI Driver interface as an extension on Azure Arc enabled Kubernetes cluster
4
4
ms.custom: ignite-2022, devx-track-azurecli
5
-
ms.date: 03/06/2023
6
-
ms.topic: tutorial
7
-
author: mayurigupta13
8
-
ms.author: mayg
5
+
ms.date: 04/21/2023
6
+
ms.topic: how-to
9
7
---
10
8
11
9
# Use the Azure Key Vault Secrets Provider extension to fetch secrets into Azure Arc-enabled Kubernetes clusters
@@ -40,7 +38,7 @@ Capabilities of the Azure Key Vault Secrets Provider extension include:
40
38
41
39
## Install the Azure Key Vault Secrets Provider extension on an Arc-enabled Kubernetes cluster
42
40
43
-
You can install the Azure Key Vault Secrets Provider extension on your connected cluster in the Azure portal, by using Azure CLI, or by deploying ARM template.
41
+
You can install the Azure Key Vault Secrets Provider extension on your connected cluster in the Azure portal, by using Azure CLI, or by deploying an ARM template.
44
42
45
43
> [!TIP]
46
44
> If the cluster is behind an outbound proxy server, ensure that you connect it to Azure Arc using the [proxy configuration](quickstart-connect-cluster.md#connect-using-an-outbound-proxy-server) option before installing the extension.
@@ -76,7 +74,7 @@ You can install the Azure Key Vault Secrets Provider extension on your connected
You should see output similar to this example. Note that it may take several minutes before the secrets provider Helm chart is deployed to the cluster.
77
+
You should see output similar to this example. It may take several minutes before the secrets provider Helm chart is deployed to the cluster.
80
78
81
79
```json
82
80
{
@@ -252,7 +250,7 @@ You should see output similar to this example.
252
250
253
251
## Create or select an Azure Key Vault
254
252
255
-
Next, specify the Azure Key Vault to use with your connected cluster. If you don't already have one, create a new Key Vault by using the following commands. Keep in mind that the name of your Key Vault must be globally unique.
253
+
Next, specify the Azure Key Vault to use with your connected cluster. If you don't already have one, create a new Key Vault by using the following commands. Keep in mind that the name of your key vault must be globally unique.
az keyvault create -n $AZUREKEYVAULT_NAME -g $AKV_RESOURCE_GROUP -l $AZUREKEYVAULT_LOCATION
@@ -367,7 +365,7 @@ Currently, the Secrets Store CSI Driver on Arc-enabled clusters can be accessed
367
365
368
366
After the pod starts, the mounted content at the volume path specified in your deployment YAML is available.
369
367
370
-
```Bash
368
+
```bash
371
369
## show secrets held in secrets-store
372
370
kubectl exec busybox-secrets-store-inline -- ls /mnt/secrets-store/
373
371
@@ -384,7 +382,7 @@ The following configuration settings are frequently used with the Azure Key Vaul
384
382
| Configuration Setting | Default | Description |
385
383
| --------- | ----------- | ----------- |
386
384
| enableSecretRotation | false | Boolean type. If `true`, periodically updates the pod mount and Kubernetes Secret with the latest content from external secrets store |
387
-
| rotationPollInterval |2m| If `enableSecretRotation` is `true`, specifies the secret rotation poll interval duration. This duration can be adjusted based on how frequently the mounted contents for all pods and Kubernetes secrets need to be resynced to the latest. |
385
+
| rotationPollInterval |2 m| If `enableSecretRotation` is `true`, specifies the secret rotation poll interval duration. This duration can be adjusted based on how frequently the mounted contents for all pods and Kubernetes secrets need to be resynced to the latest. |
388
386
| syncSecret.enabled | false | Boolean input. In some cases, you may want to create a Kubernetes Secret to mirror the mounted content. If `true`, `SecretProviderClass` allows the `secretObjects` field to define the desired state of the synced Kubernetes Secret objects. |
389
387
390
388
These settings can be specified when the extension is installed by using the `az k8s-extension create` command:
@@ -405,7 +403,6 @@ You can use other configuration settings as needed for your deployment. For exam
## Uninstall the Azure Key Vault Secrets Provider extension
410
407
411
408
To uninstall the extension, run the following command:
@@ -425,6 +422,12 @@ az k8s-extension list --cluster-type connectedClusters --cluster-name $CLUSTER_N
425
422
426
423
If the extension was successfully removed, you won't see the Azure Key Vault Secrets Provider extension listed in the output. If you don't have any other extensions installed on your cluster, you'll see an empty array.
427
424
425
+
If you no longer need it, be sure to delete the Kubernetes secret associated with the service principal by running the following command:
426
+
427
+
```bash
428
+
kubectl delete secret secrets-store-creds
429
+
```
430
+
428
431
## Reconciliation and troubleshooting
429
432
430
433
The Azure Key Vault Secrets Provider extension is self-healing. If somebody tries to change or delete an extension component that was deployed when the extension was installed, that component will be reconciled to its original state. The only exceptions are for Custom Resource Definitions (CRDs). If CRDs are deleted, they won't be reconciled. To restore deleted CRDs, use the `az k8s-extension create` command again with the existing extension instance name.
0 commit comments