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
> If you don't have a Blob Storage, you can run `az aks connection create storage-blob --new --workload-identity client-id="<your-user-assigned-identity-client-id>" subs-id="<your-user-assigned-identity-subscription-id>"` to provision a new one and get connected to your function app straightaway.
80
+
> If you don't have a Blob Storage, you can run `az aks connection create storage-blob --new --workload-identity <user-identity-resource-id>"` to provision a new one and get connected to your function app straightaway.
Copy file name to clipboardExpand all lines: articles/service-connector/tutorial-python-aks-storage-workload-identity.md
+36-37Lines changed: 36 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,11 @@ Learn how to create a pod in an AKS cluster, which talks to an Azure storage acc
33
33
34
34
1. Create a resource group for this tutorial.
35
35
36
-
```azurecli
37
-
az group create \
38
-
--name MyResourceGroup \
39
-
--location eastus
40
-
```
36
+
```azurecli
37
+
az group create \
38
+
--name MyResourceGroup \
39
+
--location eastus
40
+
```
41
41
42
42
1. Create an AKS cluster with the following command, or referring to the [tutorial](../aks/learn/quick-kubernetes-deploy-cli.md). We create the service connection, pod definition and deploy the sample application to this cluster.
43
43
@@ -59,39 +59,39 @@ az group create \
59
59
60
60
1. Create an Azure storage account with the following command, or referring to the [tutorial](../storage/common/storage-account-create.md). This is the target service that is connected to the AKS cluster and sample application interacts with.
61
61
62
-
```azurecli
63
-
az storage account create \
64
-
--resource-group MyResourceGroup \
65
-
--name MyStorageAccount \
66
-
--location eastus \
67
-
--sku Standard_LRS
68
-
```
62
+
```azurecli
63
+
az storage account create \
64
+
--resource-group MyResourceGroup \
65
+
--name MyStorageAccount \
66
+
--location eastus \
67
+
--sku Standard_LRS
68
+
```
69
69
70
70
1. Create an Azure container registry with the following command, or referring to the [tutorial](../container-registry/container-registry-get-started-portal.md). The registry hosts the container image of the sample application, which will be consumed by the AKS pod definition.
71
71
72
-
```azurecli
73
-
az acr create \
74
-
--resource-group MyResourceGroup \
75
-
--name MyRegistry \
76
-
--sku Standard
77
-
```
72
+
```azurecli
73
+
az acr create \
74
+
--resource-group MyResourceGroup \
75
+
--name MyRegistry \
76
+
--sku Standard
77
+
```
78
78
79
79
And enable anonymous pull so that AKS cluster can consume the images in the registry.
80
80
81
-
```azurecli
82
-
az acr update \
83
-
--resource-group MyResourceGroup \
84
-
--name MyRegistry \
85
-
--anonymous-pull-enabled
86
-
```
81
+
```azurecli
82
+
az acr update \
83
+
--resource-group MyResourceGroup \
84
+
--name MyRegistry \
85
+
--anonymous-pull-enabled
86
+
```
87
87
88
88
1. Create a user-assigned managed identity with the following command, or referring to the [tutorial](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities). The user-assigned managed identity is used in service connection creation to enable workload identity for AKS workloads.
89
89
90
-
```azurecli
91
-
az identity create \
92
-
--resource-group MyResourceGroup \
93
-
--name MyIdentity
94
-
```
90
+
```azurecli
91
+
az identity create \
92
+
--resource-group MyResourceGroup \
93
+
--name MyIdentity
94
+
```
95
95
96
96
## Create service connection with Service Connector
97
97
@@ -140,8 +140,7 @@ Provide the following information as prompted:
140
140
***AKS cluster name:** the name of your AKS cluster that connects to the target service.
141
141
***Target service resource group name:** the resource group name of the Azure storage account.
142
142
***Storage account name:** the Azure storage account that is connected.
143
-
***User-assigned identity subscription ID:** the subscription ID of the user-assigned identity used to create workload identity.
144
-
***User-assigned identity client ID:** the client ID of the user-assigned identity used to create workload identity.
143
+
***User-assigned identity resource ID:** the resource ID of the user-assigned identity used to create workload identity.
145
144
146
145
---
147
146
@@ -163,15 +162,15 @@ Provide the following information as prompted:
163
162
164
163
1. Build and push the images to your container registry using the Azure CLI [`az acr build`](/cli/azure/acr#az_acr_build) command.
165
164
166
-
```azurecli
167
-
az acr build --registry <MyRegistry> --image sc-demo-storage-identity:latest ./
168
-
```
165
+
```azurecli
166
+
az acr build --registry <MyRegistry> --image sc-demo-storage-identity:latest ./
167
+
```
169
168
170
169
1. View the images in your container registry using the [`az acr repository list`](/cli/azure/acr/repository#az_acr_repository_list) command.
171
170
172
-
```azurecli
173
-
az acr repository list --name <MyRegistry> --output table
174
-
```
171
+
```azurecli
172
+
az acr repository list --name <MyRegistry> --output table
0 commit comments