Skip to content

Commit

Permalink
docs/cluster-setup: add details and cleanup, fix commands
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Apr 15, 2024
1 parent caf6dba commit f62ce84
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions docs/docs/getting-started/cluster-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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:

Expand Down Expand Up @@ -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"
```

Expand Down Expand Up @@ -120,3 +134,24 @@ NAME STATUS ROLES AGE VERSION
aks-nodepool1-32049705-vmss000000 Ready <none> 9m47s v1.29.0
aks-nodepool2-32238657-vmss000000 Ready <none> 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"
```

0 comments on commit f62ce84

Please sign in to comment.