Skip to content

Commit 2e377b1

Browse files
Merge pull request #271924 from schaffererin/userstory243384
Revised command formatting and updated create command to enable managed identity as well
2 parents 8996527 + c0ff175 commit 2e377b1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

articles/aks/csi-secrets-store-driver.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,25 @@ A container using *subPath volume mount* doesn't receive secret updates when it'
3939
1. Create an Azure resource group using the [`az group create`][az-group-create] command.
4040

4141
```azurecli-interactive
42-
az group create -n myResourceGroup -l eastus2
42+
az group create --name myResourceGroup --location eastus2
4343
```
4444
45-
2. Create an AKS cluster with Azure Key Vault provider for Secrets Store CSI Driver capability using the [`az aks create`][az-aks-create] command and enable the `azure-keyvault-secrets-provider` add-on.
45+
2. Create an AKS cluster with Azure Key Vault provider for Secrets Store CSI Driver capability using the [`az aks create`][az-aks-create] command with the --enable-managed-identity parameter and the `--enable-addons azure-keyvault-secrets-provider` parameter. The add-on creates a user-assigned managed identity you can use to authenticate to your key vault. The following example creates an AKS cluster with the Azure Key Vault provider for Secrets Store CSI Driver enabled.
4646
4747
> [!NOTE]
4848
> If you want to use Microsoft Entra Workload ID, you must also use the `--enable-oidc-issuer` and `--enable-workload-identity` parameters, such as in the following example:
4949
>
5050
> ```azurecli-interactive
51-
> az aks create -n myAKSCluster -g myResourceGroup --enable-addons azure-keyvault-secrets-provider --enable-oidc-issuer --enable-workload-identity
51+
> az aks create --name myAKSCluster --resource-group myResourceGroup --enable-addons azure-keyvault-secrets-provider --enable-oidc-issuer --enable-workload-identity
5252
> ```
5353
5454
```azurecli-interactive
55-
az aks create -n myAKSCluster -g myResourceGroup --enable-addons azure-keyvault-secrets-provider
55+
az aks create --name myAKSCluster --resource-group myResourceGroup --enable-managed-identity --enable-addons azure-keyvault-secrets-provider
5656
```
5757
58-
3. The add-on creates a user-assigned managed identity, `azureKeyvaultSecretsProvider`, to access Azure resources. The following example uses this identity to connect to the key vault that stores the secrets, but you can also use other [identity access methods][identity-access-methods]. Take note of the identity's `clientId` in the output.
58+
3. The previous command creates a user-assigned managed identity, `azureKeyvaultSecretsProvider`, to access Azure resources. The following example uses this identity to connect to the key vault that stores the secrets, but you can also use other [identity access methods][identity-access-methods]. Take note of the identity's `clientId` in the output.
5959
60-
```json
60+
```output
6161
...,
6262
"addonProfiles": {
6363
"azureKeyvaultSecretsProvider": {
@@ -112,16 +112,16 @@ A container using *subPath volume mount* doesn't receive secret updates when it'
112112
113113
```azurecli-interactive
114114
## Create a new Azure key vault
115-
az keyvault create -n <keyvault-name> -g myResourceGroup -l eastus2 --enable-rbac-authorization
115+
az keyvault create --name <keyvault-name> --resource-group myResourceGroup --location eastus2 --enable-rbac-authorization
116116
117117
## Update an existing Azure key vault
118-
az keyvault update -n <keyvault-name> -g myResourceGroup -l eastus2 --enable-rbac-authorization
118+
az keyvault update --name <keyvault-name> --resource-group myResourceGroup --location eastus2 --enable-rbac-authorization
119119
```
120120
121121
2. Your key vault can store keys, secrets, and certificates. In this example, use the [`az keyvault secret set`][az-keyvault-secret-set] command to set a plain-text secret called `ExampleSecret`.
122122
123123
```azurecli-interactive
124-
az keyvault secret set --vault-name <keyvault-name> -n ExampleSecret --value MyAKSExampleSecret
124+
az keyvault secret set --vault-name <keyvault-name> --name ExampleSecret --value MyAKSExampleSecret
125125
```
126126
127127
3. Take note of the following properties for future use:

0 commit comments

Comments
 (0)