Skip to content

Commit 62c9137

Browse files
committed
Fixes
1 parent c1ef721 commit 62c9137

1 file changed

Lines changed: 10 additions & 45 deletions

File tree

scenarios/AksKaito/README.md

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This article shows you how to enable the AI toolchain operator add-on and deploy
3636
## Prerequisites
3737

3838
* If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
39-
* If you have multiple Azure subscriptions, make sure you select the correct subscription in which the resources will be created and charged using the [az account set][az-account-set] command.
39+
* If you have multiple Azure subscriptions, make sure you select the correct subscription in which the resources will be created and charged using the [az account set](https://learn.microsoft.com/en-us/cli/azure/account?view=azure-cli-latest#az-account-set) command.
4040

4141
> [!NOTE]
4242
> The subscription you use must have GPU VM quota.
@@ -48,7 +48,7 @@ This article shows you how to enable the AI toolchain operator add-on and deploy
4848

4949
## Set up resource group
5050

51-
Set up a resource group with a random ID. Create an Azure resource group using the [az group create][az-group-create] command.
51+
Set up a resource group with a random ID. Create an Azure resource group using the [az group create](https://learn.microsoft.com/en-us/cli/azure/group?view=azure-cli-latest#az-group-create) command.
5252

5353
```bash
5454
export RANDOM_ID="$(openssl rand -hex 3)"
@@ -63,7 +63,7 @@ az group create \
6363

6464
## Install the Azure CLI preview extension
6565

66-
Install the Azure CLI preview extension using the [az extension add][az-extension-add] command. Then update the extension to make sure you have the latest version using the [az extension update][az-extension-update] command.
66+
Install the Azure CLI preview extension using the [az extension add](https://learn.microsoft.com/en-us/cli/azure/extension?view=azure-cli-latest#az-extension-add) command. Then update the extension to make sure you have the latest version using the [az extension update](https://learn.microsoft.com/en-us/cli/azure/extension?view=azure-cli-latest#az-extension-update) command.
6767

6868
```bash
6969
az extension add --name aks-preview
@@ -81,22 +81,22 @@ az feature register --namespace "Microsoft.ContainerService" --name "AIToolchain
8181

8282
## Verify the AI toolchain operator add-on registration
8383

84-
Verify the registration using the [az feature show][az-feature-show] command.
84+
Verify the registration using the [az feature show](https://learn.microsoft.com/en-us/cli/azure/feature?view=azure-cli-latest#az-feature-show) command.
8585

8686
```bash
8787
while true; do
8888
status=$(az feature show --namespace "Microsoft.ContainerService" --name "AIToolchainOperatorPreview" --query "properties.state" -o tsv)
8989
if [ "$status" == "Registered" ]; then
9090
break
9191
else
92-
sleep 30
92+
sleep 15
9393
fi
9494
done
9595
```
9696

9797
## Create an AKS cluster with the AI toolchain operator add-on enabled
9898

99-
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.
99+
Create an AKS cluster with the AI toolchain operator add-on enabled using the [az aks create](https://learn.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest#az-aks-create) command with the `--enable-ai-toolchain-operator` and `--enable-oidc-issuer` flags.
100100

101101
> [!NOTE]
102102
> AKS creates a managed identity once you enable the AI toolchain operator add-on. The managed identity is used to create GPU node pools in the managed AKS cluster. Proper permissions need to be set for it manually following the steps introduced in the following sections.
@@ -115,20 +115,9 @@ az aks create --location ${REGION} \
115115
--k8s-support-plan KubernetesOfficial
116116
```
117117

118-
## Enable AI toolchain operator for cluster
119-
120-
On an existing AKS cluster, you can enable the AI toolchain operator add-on using the [az aks update][az-aks-update] command.
121-
122-
```bash
123-
az aks update --name ${CLUSTER_NAME} \
124-
--resource-group ${AZURE_RESOURCE_GROUP} \
125-
--enable-oidc-issuer \
126-
--enable-ai-toolchain-operator
127-
```
128-
129118
## Connect to your cluster
130119

131-
Configure `kubectl` to connect to your cluster using the [az aks get-credentials][az-aks-get-credentials] command.
120+
Configure `kubectl` to connect to your cluster using the [az aks get-credentials](https://learn.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest#az-aks-get-credentials) command.
132121

133122
```bash
134123
az aks get-credentials --resource-group ${AZURE_RESOURCE_GROUP} --name ${CLUSTER_NAME}
@@ -142,25 +131,16 @@ kubectl get nodes
142131

143132
## Export environment variables
144133

145-
Export environment variables for the MC resource group, principal ID identity, and KAITO identity using the following commands:
134+
Export environment variables for the MC resource group, KAITO identity, and AKS OIDC Issuer URL using the following commands:
146135

147136
```bash
148137
export MC_RESOURCE_GROUP=$(az aks show --resource-group ${AZURE_RESOURCE_GROUP} \
149138
--name ${CLUSTER_NAME} \
150139
--query nodeResourceGroup \
151140
-o tsv)
152-
export PRINCIPAL_ID=$(az identity show --name "ai-toolchain-operator-${CLUSTER_NAME}" \
153-
--resource-group "${MC_RESOURCE_GROUP}" \
154-
--query 'principalId' \
155-
-o tsv)
156-
export KAITO_IDENTITY_NAME="ai-toolchain-operator-${CLUSTER_NAME}"
157-
```
158-
159-
## Get the AKS OpenID Connect (OIDC) Issuer
160141

161-
Get the AKS OIDC Issuer URL and export it as an environment variable:
142+
export KAITO_IDENTITY_NAME="ai-toolchain-operator-${CLUSTER_NAME}"
162143

163-
```bash
164144
export AKS_OIDC_ISSUER=$(az aks show --resource-group "${AZURE_RESOURCE_GROUP}" \
165145
--name "${CLUSTER_NAME}" \
166146
--query "oidcIssuerProfile.issuerUrl" \
@@ -169,7 +149,7 @@ export AKS_OIDC_ISSUER=$(az aks show --resource-group "${AZURE_RESOURCE_GROUP}"
169149

170150
## Establish a federated identity credential
171151

172-
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.
152+
Create the federated identity credential between the managed identity, AKS OIDC issuer, and subject using the [az identity federated-credential create](https://learn.microsoft.com/en-us/cli/azure/identity/federated-credential?view=azure-cli-latest) command.
173153

174154
```bash
175155
az identity federated-credential create --name "kaito-federated-identity" \
@@ -209,18 +189,3 @@ echo "See last step for details on how to ask questions to the model.
209189
## Next steps
210190
211191
For more inference model options, see the [KAITO GitHub repository](https://github.com/Azure/kaito).
212-
213-
<!-- LINKS -->
214-
[az-group-create]: /cli/azure/group#az_group_create
215-
[az-group-delete]: /cli/azure/group#az_group_delete
216-
[az-aks-create]: /cli/azure/aks#az_aks_create
217-
[az-aks-update]: /cli/azure/aks#az_aks_update
218-
[az-aks-get-credentials]: /cli/azure/aks#az_aks_get_credentials
219-
[az-role-assignment-create]: /cli/azure/role/assignment#az_role_assignment_create
220-
[az-identity-federated-credential-create]: /cli/azure/identity/federated-credential#az_identity_federated_credential_create
221-
[az-account-set]: /cli/azure/account#az_account_set
222-
[az-extension-add]: /cli/azure/extension#az_extension_add
223-
[az-extension-update]: /cli/azure/extension#az_extension_update
224-
[az-feature-register]: /cli/azure/feature#az_feature_register
225-
[az-feature-show]: /cli/azure/feature#az_feature_show
226-
[az-provider-register]: /cli/azure/provider#az_provider_register

0 commit comments

Comments
 (0)