Skip to content

Commit 9425989

Browse files
committed
add CLI line breaks
1 parent 1b3851d commit 9425989

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

articles/aks/ai-toolchain-operator.md

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ This article shows you how to enable the AI toolchain operator add-on and deploy
7575
7676
## Enable the AI toolchain operator add-on on an AKS cluster
7777
78+
The following sections describe how to create an AKS cluster with the AI toolchain operator add-on enabled and deploy a default hosted AI model.
79+
7880
### Create an AKS cluster with the AI toolchain operator add-on enabled
7981
8082
1. Create an Azure resource group using the [`az group create`][az-group-create] command.
@@ -86,7 +88,12 @@ This article shows you how to enable the AI toolchain operator add-on and deploy
8688
2. Create an AKS cluster with the AI toolchain operator add-on enabled using the [`az aks create`][az-aks-create] command with the `--enable-ai-toolchain-operator` and `--enable-oidc-issuer` flags.
8789
8890
```azurecli-interactive
89-
az aks create --location ${AZURE_LOCATION} --resource-group ${AZURE_RESOURCE_GROUP} --name ${CLUSTER_NAME} --enable-managed-identity --enable-oidc-issuer --enable-ai-toolchain-operator
91+
az aks create --location ${AZURE_LOCATION} \
92+
--resource-group ${AZURE_RESOURCE_GROUP} \
93+
--name ${CLUSTER_NAME} \
94+
--enable-managed-identity \
95+
--enable-oidc-issuer \
96+
--enable-ai-toolchain-operator
9097
```
9198
9299
> [!NOTE]
@@ -111,30 +118,49 @@ This article shows you how to enable the AI toolchain operator add-on and deploy
111118
3. Export environment variables for the MC resource group, principal ID identity, and KAITO identity using the following commands:
112119
113120
```azurecli-interactive
114-
export MC_RESOURCE_GROUP=$(az aks show --resource-group ${AZURE_RESOURCE_GROUP} --name ${CLUSTER_NAME} --query nodeResourceGroup -o tsv)
115-
export PRINCIPAL_ID=$(az identity show --name "ai-toolchain-operator-${CLUSTER_NAME}" --resource-group "${MC_RESOURCE_GROUP}" --query 'principalId' -o tsv)
121+
export MC_RESOURCE_GROUP=$(az aks show --resource-group ${AZURE_RESOURCE_GROUP} \
122+
--name ${CLUSTER_NAME} \
123+
--query nodeResourceGroup \
124+
-o tsv)
125+
export PRINCIPAL_ID=$(az identity show --name "ai-toolchain-operator-${CLUSTER_NAME}" \
126+
--resource-group "${MC_RESOURCE_GROUP}" \
127+
--query 'principalId'
128+
-o tsv)
116129
export KAITO_IDENTITY_NAME="ai-toolchain-operator-${CLUSTER_NAME}"
117130
```
131+
118132
## Get the AKS OpenID Connect (OIDC) Issuer
133+
119134
* Get the AKS OIDC Issuer URL and export it as an environment variable:
120135
121136
```azurecli-interactive
122-
export AKS_OIDC_ISSUER=$(az aks show --resource-group "${AZURE_RESOURCE_GROUP}" --name "${CLUSTER_NAME}" --query "oidcIssuerProfile.issuerUrl" -o tsv)
137+
export AKS_OIDC_ISSUER=$(az aks show --resource-group "${AZURE_RESOURCE_GROUP}" \
138+
--name "${CLUSTER_NAME}" \
139+
--query "oidcIssuerProfile.issuerUrl" \
140+
-o tsv)
123141
```
142+
124143
## Create role assignment for the service principal
144+
125145
* Create a new role assignment for the service principal using the [`az role assignment create`][az-role-assignment-create] command.
126146
127147
```azurecli-interactive
128-
az role assignment create --role "Contributor" --assignee "${PRINCIPAL_ID}" --scope "/subscriptions/${AZURE_SUBSCRIPTION_ID}/resourcegroups/${AZURE_RESOURCE_GROUP}"
148+
az role assignment create --role "Contributor" \
149+
--assignee "${PRINCIPAL_ID}" \
150+
--scope "/subscriptions/${AZURE_SUBSCRIPTION_ID}/resourcegroups/${AZURE_RESOURCE_GROUP}"
129151
```
130152
131153
## Establish a federated identity credential
132154
133-
134155
* Create the federated identity credential between the managed identity, AKS OIDC issuer, and subject using the [`az identity federated-credential create`][az-identity-federated-credential-create] command.
135156
136157
```azurecli-interactive
137-
az identity federated-credential create --name "kaito-federated-identity" --identity-name "${KAITO_IDENTITY_NAME}" -g "${MC_RESOURCE_GROUP}" --issuer "${AKS_OIDC_ISSUER}" --subject system:serviceaccount:"kube-system:kaito-gpu-provisioner" --audience api://AzureADTokenExchange
158+
az identity federated-credential create --name "kaito-federated-identity" \
159+
--identity-name "${KAITO_IDENTITY_NAME}" \
160+
-g "${MC_RESOURCE_GROUP}" \
161+
--issuer "${AKS_OIDC_ISSUER}" \
162+
--subject system:serviceaccount:"kube-system:kaito-gpu-provisioner" \
163+
--audience api://AzureADTokenExchange
138164
```
139165
140166
## Verify that your deployment is running
@@ -144,6 +170,7 @@ This article shows you how to enable the AI toolchain operator add-on and deploy
144170
```azurecli-interactive
145171
kubectl rollout restart deployment/kaito-gpu-provisioner -n kube-system
146172
```
173+
147174
2. Verify that the deployment is running using the `kubectl get` command:
148175
149176
```azurecli-interactive

0 commit comments

Comments
 (0)