Skip to content

Azure AKS cluster basics

Tools

  1. Make sure you have the az command line interface installed.
  2. If you'd like help installing the CLI, check out this page for instructions. Make sure to initialize your Azure credentials via az login

Create your AKS Cluster

Step 1

Creating a kubernetes AKS cluster on Azure is very well documented on this page.

Create a Resource group for AKS to use, choosing the region you want the cluster resources to to use:

az group create --name <RESOURCE_GROUP> --location eastus

Step 2

Create the AKS cluster

az aks create \
--resource-group <RESOURCE_GROUP> \
--name <CLUSTER_NAME> \
--node-count 4 \
--generate-ssh-keys \
--vm-set-type VirtualMachineScaleSets \
--load-balancer-sku standard

Step 3

Go get a cup of coffee. This is going to take a few minutes.

Step 4

When the provisioning is complete get the kubeconfig credentials for kubectl

az aks get-credentials --resource-group <RESOURCE_GROUP> --name <CLUSTER_NAME>

Step 5

Run the following command to check your cluster's configuration which should return something akin to the following

kubectl get svc

This should return something similar to this

  NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
  kubernetes   ClusterIP   10.100.0.1   <none>        443/TCP   9m45s

Now you should be all set to connect to this cluster using Sextant.

Using your Azure AKS Cluster

Now that you have created this cluster you can add it to list of the target clusters available to Sextant by following the instructions here.

Alternatively if you intend to install Sextant on this cluster then you can do so by following the instructions here.

Delete AKS cluster

It's important to tear down any resources you aren't actively using. Otherwise, you will incur charges from Azure.

  1. Before deleting your AKS cluster, delete the active deployment using Sextant.
  2. Then, delete any provisioned clusters in Sextant.
  3. Run the following command to delete the AKS Resource Group that contains your cluster:
az group delete --name <RESOURCE_GROUP> --yes --no-wait

* Please note this may take some time.