Skip to main content

Getting Started in AKS

Install Azure CLI Locally

Ignore this step if you already have Azure CLI set up.

Install azure-cli on your machine by following the Azure official guide.

Login to Azure

Run the command below. Note that there are different ways one can log into Azure using the Azure CLI. Refer to the az login docs if you have any questions.

For this guide, we'll use the option Sign in interactively, which will open a browser window to prompt the user for their login credentials.

az login

In case you have access to multiple Azure Subscriptions, set the account using the CLI, as described below:

az account set -s <Subscription name or Id>

Create AKS Cluster

You can ignore this step if you already have a working AKS cluster.

From your terminal, run the commands below to create a AKS cluster. Note that you need to create a new resource group to host the AKS resource (already covered by the commands).

export AKS_RESOURCE_GROUP="<Your Resource Group Name>"
export AKS_CLUSTER="initium-test-aks-cluster" # Set the name of the cluster as you require

# Create Log Analytics Workspace
export AKS_MONITORING_LOG_ANALYTICS_WORKSPACE_ID=$(az monitor log-analytics workspace create \
--resource-group ${AKS_RESOURCE_GROUP} \
--workspace-name initium-test-aks-workspace \
--query id \
-o tsv)

# Create AKS Cluster
az aks create --resource-group ${AKS_RESOURCE_GROUP} \
--name ${AKS_CLUSTER} \
--enable-managed-identity \
--generate-ssh-keys \
--admin-username aksnodeadmin \
--node-count 1 \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 2 \
--network-plugin kubenet \
--node-vm-size Standard_DS3 \
--nodepool-labels nodepool-type=system nodepoolos=linux app=system-apps \
--nodepool-name systempool \
--nodepool-tags nodepool-type=system nodepoolos=linux app=system-apps \
--enable-addons monitoring \
--workspace-resource-id ${AKS_MONITORING_LOG_ANALYTICS_WORKSPACE_ID} \
--network-policy calico \
--vm-set-type VirtualMachineScaleSets \
--kubernetes-version 1.26.6

# Get Kubernetes credentials
az aks get-credentials --name ${AKS_CLUSTER} --resource-group ${AKS_RESOURCE_GROUP}

We recommend you to use Standard_DS3 as the VM Node size as the Initium workloads need some memory (around 14 GiB)

Check Cluster access


export AKS_RESOURCE_GROUP="<Update your resource group>"
export AKS_CLUSTER="initium-test-aks-cluster"

# Configure Credentials
az aks get-credentials --name ${AKS_CLUSTER} --resource-group ${AKS_RESOURCE_GROUP}

# List Nodes
kubectl get nodes

# Cluster Info
kubectl cluster-info