diff --git a/docs/docs/getting-started/cluster-setup.md b/docs/docs/getting-started/cluster-setup.md index 19b0c20de6..48bd02532e 100644 --- a/docs/docs/getting-started/cluster-setup.md +++ b/docs/docs/getting-started/cluster-setup.md @@ -10,8 +10,10 @@ the permissions to create an AKS cluster, by executing: az login ``` -CoCo on AKS is currently in preview. An extension is needed to create such a cluster. Add the -extension with the following commands: +## Prepare using the AKS preview + +CoCo on AKS is currently in preview. An extension for the `az` CLI is needed to create such a cluster. +Add the extension with the following commands: ```bash az extension add \ @@ -22,20 +24,32 @@ az extension update \ --allow-preview true ``` -Then register the required features: +Then register the required feature flags in your subscription to allow access to the public preview: ```bash az feature register \ --namespace "Microsoft.ContainerService" \ --name "KataCcIsolationPreview" +``` + +The registration can a few minutes. The status of the operation can be checked with the folowing +command, which should show the registration state is `Registered`: + +```sh az feature show \ --namespace "Microsoft.ContainerService" \ - --name "KataCcIsolationPreview" + --name "KataCcIsolationPreview" \ + --output table +``` + +Afterwards, refresh the registration of the ContainerService provider: + +```sh az provider register \ - --name Microsoft.ContainerService + --namespace "Microsoft.ContainerService" ``` -## Set resource group +## Create resource group The AKS with CoCo preview is currently available in the following locations: @@ -64,7 +78,7 @@ You can either use an existing one or create a new resource group with the follo azLocation="westus" # Select a location from the list above az group create \ - --name "$azResourceGroup" + --name "$azResourceGroup" \ --location "$azLocation" ``` @@ -120,3 +134,24 @@ NAME STATUS ROLES AGE VERSION aks-nodepool1-32049705-vmss000000 Ready 9m47s v1.29.0 aks-nodepool2-32238657-vmss000000 Ready 45s v1.29.0 ``` + +## Cleanup + +After trying out Contrast, you might want to clean up the cloud resources created in this step. +In case you've created a new resource group, you can just delete that group with + +```sh +az group delete \ + --name "$azResourceGroup" \ + --location "$azLocation" +``` + +Deleting the resource group will also delete the cluster and all other related resources. + +To only cleanup the AKS cluster and node pools, run + +```sh +az aks delete \ + --resource-group "$azResourceGroup" \ + --name "$azClusterName" +```