Skip to content

Commit 6702b89

Browse files
authored
Merge pull request #271007 from wchigit/aks-cli
[Service Connector] Fix AKS CLI and indent
2 parents cd49761 + e8100ca commit 6702b89

File tree

2 files changed

+41
-44
lines changed

2 files changed

+41
-44
lines changed

articles/service-connector/quickstart-cli-aks-connection.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,15 @@ Use the Azure CLI command to create a service connection to a Blob Storage with
6969
* **AKS cluster name:** the name of your AKS cluster that connects to the target service.
7070
* **Target service resource group name:** the resource group name of the Blob Storage.
7171
* **Storage account name:** the account name of your Blob Storage.
72-
* **User-assigned identity subscription ID:** the subscription ID of the user assigned identity that used to create workload identity
73-
* **User-assigned identity client ID:** the client ID of the user assigned identity used to create workload identity
72+
* **User-assigned identity resource ID:** the resource ID of the user assigned identity that is used to create workload identity
7473

7574
```azurecli
7675
az aks connection create storage-blob \
77-
--workload-identity client-id="<your-user-assigned-identity-client-id>" subs-id="<your-user-assigned-identity-subscription-id>"
76+
--workload-identity <user-identity-resource-id>
7877
```
7978

8079
> [!NOTE]
81-
> 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.
8281
8382
---
8483

articles/service-connector/tutorial-python-aks-storage-workload-identity.md

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ Learn how to create a pod in an AKS cluster, which talks to an Azure storage acc
3333

3434
1. Create a resource group for this tutorial.
3535

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+
```
4141
4242
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.
4343
@@ -49,7 +49,7 @@ az group create \
4949
--node-count 1
5050
```
5151
52-
1. connect to the cluster with the following command.
52+
1. Connect to the cluster with the following command.
5353
5454
```azurecli
5555
az aks get-credentials \
@@ -59,39 +59,38 @@ az group create \
5959
6060
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.
6161
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+
```
6969
7070
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.
7171
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.
8079
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+
```
8786
8887
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.
8988
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+
```
9594
9695
## Create service connection with Service Connector
9796
@@ -140,8 +139,7 @@ Provide the following information as prompted:
140139
* **AKS cluster name:** the name of your AKS cluster that connects to the target service.
141140
* **Target service resource group name:** the resource group name of the Azure storage account.
142141
* **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.
145143

146144
---
147145

@@ -163,15 +161,15 @@ Provide the following information as prompted:
163161
164162
1. Build and push the images to your container registry using the Azure CLI [`az acr build`](/cli/azure/acr#az_acr_build) command.
165163
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+
```
169167
170168
1. View the images in your container registry using the [`az acr repository list`](/cli/azure/acr/repository#az_acr_repository_list) command.
171169
172-
```azurecli
173-
az acr repository list --name <MyRegistry> --output table
174-
```
170+
```azurecli
171+
az acr repository list --name <MyRegistry> --output table
172+
```
175173
176174
## Run application and test connection
177175

0 commit comments

Comments
 (0)