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: AKS-Hybrid/workload-identity.md
+65-66Lines changed: 65 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,7 +204,6 @@ az identity federated-credential show --name $FedIdCredentialName --resource-gro
204
204
> [!NOTE]
205
205
> After you add a federated identity credential, it takes a few seconds to propagate. Token requests made immediately afterward might fail until the cache refreshes. To prevent this issue, consider adding a brief delay after creating the federated identity credential.
206
206
207
-
208
207
## Step 4: Deploy your application
209
208
210
209
When you deploy your application pods, the manifest should reference the service account created in the **Create Kubernetes service account** step. The following manifest shows how to reference the account, specifically the `metadata\namespace` and `spec\serviceAccountName` properties. Make sure to specify an image for `image` and a container name
@@ -248,71 +247,71 @@ The following example shows how to use the Azure role-based access control (Azur
248
247
249
248
1. Create a key vault with purge protection and RBAC authorization enabled. You can also use an existing key vault if it is configured for both purge protection and RBAC authorization:
$KVId=$(az keyvault show --resource-group $resource_group_name --name $KVName --query id --output tsv)
256
-
```
257
-
258
-
2. Assign the RBAC [Key Vault Secrets Officer](/azure/role-based-access-control/built-in-roles/security#key-vault-secrets-officer) role to yourself so that you can create a secret in the new key vault. New role assignments can take up to five minutes to propagate and be updated by the authorization server.
259
-
260
-
```azurecli
261
-
az role assignment create --assignee-object-id $MSIPrincipalId --role "Key Vault Secrets Officer" --scope $KVId --assignee-principal-type ServicePrincipal
262
-
```
263
-
264
-
3. Create a secret in the key vault:
265
-
266
-
```azurecli
267
-
az keyvault secret set --vault-name $KVName --name $KVSecretName --value "Hello!"
268
-
```
269
-
270
-
4. Assign the [Key Vault Secrets User](/azure/role-based-access-control/built-in-roles/security#key-vault-secrets-user) role to the user-assigned managed identity that you created previously. This step gives the managed identity permission to read secrets from the key vault:
271
-
272
-
```azurecli
273
-
az role assignment create --assignee-object-id $MSIPrincipalId --role "Key Vault Secrets User" --scope $KVId --assignee-principal-type ServicePrincipal
274
-
```
275
-
276
-
5. Create an environment variable for the key vault URL:
$KVId=$(az keyvault show --resource-group $resource_group_name --name $KVName --query id --output tsv)
255
+
```
256
+
257
+
1. Assign the RBAC [Key Vault Secrets Officer](/azure/role-based-access-control/built-in-roles/security#key-vault-secrets-officer) role to yourself so that you can create a secret in the new key vault. New role assignments can take up to five minutes to propagate and be updated by the authorization server.
258
+
259
+
```azurecli
260
+
az role assignment create --assignee-object-id $MSIPrincipalId --role "Key Vault Secrets Officer" --scope $KVId --assignee-principal-type ServicePrincipal
261
+
```
262
+
263
+
1. Create a secret in the key vault:
264
+
265
+
```azurecli
266
+
az keyvault secret set --vault-name $KVName --name $KVSecretName --value "Hello!"
267
+
```
268
+
269
+
1. Assign the [Key Vault Secrets User](/azure/role-based-access-control/built-in-roles/security#key-vault-secrets-user) role to the user-assigned managed identity that you created previously. This step gives the managed identity permission to read secrets from the key vault:
270
+
271
+
```azurecli
272
+
az role assignment create --assignee-object-id $MSIPrincipalId --role "Key Vault Secrets User" --scope $KVId --assignee-principal-type ServicePrincipal
273
+
```
274
+
275
+
1. Create an environment variable for the key vault URL:
0 commit comments