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/aks/csi-secrets-store-identity-access.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,16 +38,16 @@ Azure AD workload identity (preview) is supported on both Windows and Linux clus
38
38
1. Use the Azure CLI `az account set` command to set a specific subscription to be the current active subscription. Then use the `az identity create` command to create a managed identity.
39
39
40
40
```azurecli
41
-
export subscriptionID=<subscription id>
42
-
export resourceGroupName=<resource group name>
41
+
export SUBSCRIPTION_ID=<subscription id>
42
+
export RESOURCE_GROUP=<resource group name>
43
43
export UAMI=<name for user assigned identity>
44
44
export KEYVAULT_NAME=<existing keyvault name>
45
-
export clusterName=<aks cluster name>
45
+
export CLUSTER_NAME=<aks cluster name>
46
46
47
-
az account set --subscription $subscriptionID
48
-
az identity create --name $UAMI --resource-group $resourceGroupName
export IDENTITY_TENANT=$(az aks show --name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --query identity.tenantId -o tsv)
51
51
```
52
52
53
53
2. You need to set an access policy that grants the workload identity permission to access the Key Vault secrets, access keys, and certificates. The rights are assigned using the `az keyvault set-policy` command shown below.
@@ -61,7 +61,7 @@ Azure AD workload identity (preview) is supported on both Windows and Linux clus
61
61
3. Run the [az aks show][az-aks-show] command to get the AKS cluster OIDC issuer URL.
62
62
63
63
```bash
64
-
export AKS_OIDC_ISSUER="$(az aks show --resource-group $resourceGroupName --name $clusterName --query "oidcIssuerProfile.issuerUrl" -o tsv)"
64
+
export AKS_OIDC_ISSUER="$(az aks show --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --query "oidcIssuerProfile.issuerUrl" -o tsv)"
65
65
echo $AKS_OIDC_ISSUER
66
66
```
67
67
@@ -72,8 +72,8 @@ Azure AD workload identity (preview) is supported on both Windows and Linux clus
72
72
4. Establish a federated identity credential between the Azure AD application and the service account issuer and subject. Get the object ID of the Azure AD application. Update the values for `serviceAccountName` and `serviceAccountNamespace` with the Kubernetes service account name and its namespace.
73
73
74
74
```bash
75
-
export serviceAccountName="workload-identity-sa" # sample name; can be changed
76
-
export serviceAccountNamespace="default" # can be changed to namespace of your workload
75
+
export SERVICE_ACCOUNT_NAME="workload-identity-sa" # sample name; can be changed
76
+
export SERVICE_ACCOUNT_NAMESPACE="default" # can be changed to namespace of your workload
77
77
78
78
cat <<EOF | kubectl apply -f -
79
79
apiVersion: v1
@@ -83,16 +83,16 @@ Azure AD workload identity (preview) is supported on both Windows and Linux clus
Next, use the [az identity federated-credential create][az-identity-federated-credential-create] command to create the federated identity credential between the Managed Identity, the service account issuer, and the subject.
92
92
93
93
```bash
94
-
export federatedIdentityName="aksfederatedidentity" # can be changed as needed
0 commit comments