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
+38-40Lines changed: 38 additions & 40 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
@@ -49,7 +49,7 @@ az group create \
49
49
--node-count 1
50
50
```
51
51
52
-
1. connect to the cluster with the following command.
52
+
1. Connect to the cluster with the following command.
53
53
54
54
```azurecli
55
55
az aks get-credentials \
@@ -59,39 +59,38 @@ 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
-
```
78
-
79
-
And enable anonymous pull so that AKS cluster can consume the images in the registry.
72
+
```azurecli
73
+
az acr create \
74
+
--resource-group MyResourceGroup \
75
+
--name MyRegistry \
76
+
--sku Standard
77
+
```
78
+
And enable anonymous pull so that AKS cluster can consume the images in the registry.
80
79
81
-
```azurecli
82
-
az acr update \
83
-
--resource-group MyResourceGroup \
84
-
--name MyRegistry \
85
-
--anonymous-pull-enabled
86
-
```
80
+
```azurecli
81
+
az acr update \
82
+
--resource-group MyResourceGroup \
83
+
--name MyRegistry \
84
+
--anonymous-pull-enabled
85
+
```
87
86
88
87
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
88
90
-
```azurecli
91
-
az identity create \
92
-
--resource-group MyResourceGroup \
93
-
--name MyIdentity
94
-
```
89
+
```azurecli
90
+
az identity create \
91
+
--resource-group MyResourceGroup \
92
+
--name MyIdentity
93
+
```
95
94
96
95
## Create service connection with Service Connector
97
96
@@ -140,8 +139,7 @@ Provide the following information as prompted:
140
139
***AKS cluster name:** the name of your AKS cluster that connects to the target service.
141
140
***Target service resource group name:** the resource group name of the Azure storage account.
142
141
***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.
142
+
***User-assigned identity resource ID:** the resource ID of the user-assigned identity used to create workload identity.
145
143
146
144
---
147
145
@@ -163,15 +161,15 @@ Provide the following information as prompted:
163
161
164
162
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
163
166
-
```azurecli
167
-
az acr build --registry <MyRegistry> --image sc-demo-storage-identity:latest ./
168
-
```
164
+
```azurecli
165
+
az acr build --registry <MyRegistry> --image sc-demo-storage-identity:latest ./
166
+
```
169
167
170
168
1. View the images in your container registry using the [`az acr repository list`](/cli/azure/acr/repository#az_acr_repository_list) command.
171
169
172
-
```azurecli
173
-
az acr repository list --name <MyRegistry> --output table
174
-
```
170
+
```azurecli
171
+
az acr repository list --name <MyRegistry> --output table
0 commit comments