Skip to content

Commit ff23163

Browse files
committed
Incorporated feedback
1 parent 8efb022 commit ff23163

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

articles/aks/workload-identity-cross-tenant.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to configure cross-tenant workload identity on Azure Kube
44
author: schaffererin
55
ms.topic: article
66
ms.subservice: aks-security
7-
ms.date: 07/02/2024
7+
ms.date: 07/03/2024
88
ms.author: schaffererin
99
---
1010

@@ -142,17 +142,17 @@ In *Tenant B*, you create an Azure Service Bus, a managed identity and assign it
142142
143143
# Create a new service bus namespace and and return the service bus hostname
144144
SERVICEBUS_HOSTNAME=$(az servicebus namespace create \
145-
--name $SERVICEBUS_NAME \
146-
--resource-group $RESOURCE_GROUP \
147-
--disable-local-auth \
148-
--query serviceBusEndpoint \
149-
--output tsv | sed -e 's/https:\/\///' -e 's/:443\///')
145+
--name $SERVICEBUS_NAME \
146+
--resource-group $RESOURCE_GROUP \
147+
--disable-local-auth \
148+
--query serviceBusEndpoint \
149+
--output tsv | sed -e 's/https:\/\///' -e 's/:443\///')
150150
151151
# Create a new queue in the service bus namespace
152152
az servicebus queue create \
153-
--name myqueue \
154-
--namespace $SERVICEBUS_NAME \
155-
--resource-group $RESOURCE_GROUP
153+
--name myqueue \
154+
--namespace $SERVICEBUS_NAME \
155+
--resource-group $RESOURCE_GROUP
156156
```
157157
158158
1. Create a user-assigned managed identity in *Tenant B* using the [`az identity create`][az-identity-create] command.
@@ -257,7 +257,7 @@ In this section, you deploy an application to your AKS cluster in *Tenant A* tha
257257
258258
### Create Kubernetes resources to send messages to Azure Service Bus queue
259259
260-
1. Create a new Kubernetes ServiceAccount in the `default` namespace and pass in the client ID of your managed identity in *Tenant B* to the `kubectl apply` command. The client ID is used to authenticate the pod to the Azure Service Bus.
260+
1. Create a new Kubernetes ServiceAccount in the `default` namespace and pass in the client ID of your managed identity in *Tenant B* to the `kubectl apply` command. The client ID is used to authenticate the app in *Tenant A* to the Azure Service Bus in *Tenant B*.
261261
262262
```azurecli-interactive
263263
kubectl apply -f - <<EOF
@@ -312,7 +312,7 @@ In this section, you deploy an application to your AKS cluster in *Tenant A* tha
312312
# Get the dynamically generated pod name
313313
POD_NAME=$(kubectl get po --selector job-name=myproducer -o jsonpath='{.items[0].metadata.name}')
314314
315-
# Get the tenant ID environment variable
315+
# Verify the tenant ID environment variable is set for Tenant B
316316
kubectl describe pod $POD_NAME | grep AZURE_TENANT_ID
317317
```
318318
@@ -332,6 +332,9 @@ In this section, you deploy an application to your AKS cluster in *Tenant A* tha
332332
Sent 100 messages
333333
```
334334
335+
> [!NOTE]
336+
> As an extra verification step, you can go to the [Azure portal][azure-portal] and navigate to the Azure Service Bus queue in *Tenant B* to view the messages that were sent in the Service Bus Explorer.
337+
335338
## Clean up resources
336339
337340
After you verify that the deployment is successful, you can clean up the resources to avoid incurring Azure costs.
@@ -402,3 +405,5 @@ In this article, you learned how to configure cross-tenant workload identity on
402405
[az-servicebus-namespace-show]: /cli/azure/servicebus/namespace#az-servicebus-namespace-show
403406
[az-servicebus-queue-create]: /cli/azure/servicebus/queue#az-servicebus-queue-create
404407
[az-group-delete]: /cli/azure/group#az_group_delete
408+
[azure-portal]: https://portal.azure.com
409+

0 commit comments

Comments
 (0)