Skip to content

Commit c6cc655

Browse files
Merge pull request #234281 from sabbour/patch-2
Updated docs to use the managed identity object id for Web App Routing
2 parents fa7b843 + c4db7ce commit c6cc655

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

articles/aks/web-app-routing.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ The add-on deploys the following components:
2525
## Prerequisites
2626

2727
- An Azure subscription. If you don't have an Azure subscription, you can create a [free account](https://azure.microsoft.com/free).
28-
- [Azure CLI installed](/cli/azure/install-azure-cli).
28+
- Azure CLI version 2.47.0 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
2929
- An Azure Key Vault to store certificates.
30-
- A DNS solution, such as [Azure DNS](../dns/dns-getstarted-portal.md).
30+
- (Optional) A DNS solution, such as [Azure DNS](../dns/dns-getstarted-portal.md).
3131

3232
### Install the `aks-preview` Azure CLI extension
3333

@@ -147,20 +147,13 @@ az aks enable-addons -g <ResourceGroupName> -n <ClusterName> --addons azure-keyv
147147

148148
## Retrieve the add-on's managed identity object ID
149149

150-
Retrieve user managed identity object ID for the add-on. This identity is used in the next steps to grant permissions to manage the Azure DNS zone and retrieve certificates from the Azure Key Vault. Provide your *`<ResourceGroupName>`*, *`<ClusterName>`*, and *`<Location>`* in the script to retrieve the managed identity's object ID.
150+
Retrieve user managed identity object ID for the add-on. This identity is used in the next steps to grant permissions to manage the Azure DNS zone and retrieve certificates from the Azure Key Vault. Provide your *`<ResourceGroupName>`* and *`<ClusterName>`* in the script to retrieve the managed identity's object ID.
151151

152152
```azurecli-interactive
153153
# Provide values for your environment
154154
RGNAME=<ResourceGroupName>
155155
CLUSTERNAME=<ClusterName>
156-
LOCATION=<Location>
157-
158-
# Retrieve user managed identity object ID for the add-on
159-
SUBSCRIPTION_ID=$(az account show --query id --output tsv)
160-
MANAGEDIDENTITYNAME="webapprouting-${CLUSTERNAME}"
161-
MCRGNAME=$(az aks show -g ${RGNAME} -n ${CLUSTERNAME} --query nodeResourceGroup -o tsv)
162-
USERMANAGEDIDENTITY_RESOURCEID="/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${MCRGNAME}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${MANAGEDIDENTITYNAME}"
163-
MANAGEDIDENTITY_OBJECTID=$(az resource show --id $USERMANAGEDIDENTITY_RESOURCEID --query "properties.principalId" -o tsv | tr -d '[:space:]')
156+
MANAGEDIDENTITY_OBJECTID=$(az aks show -g ${RGNAME} -n ${CLUSTERNAME} --query ingressProfile.webAppRouting.identity.objectId -o tsv)
164157
```
165158

166159
## Configure the add-on to use Azure DNS to manage creating DNS zones

0 commit comments

Comments
 (0)