Running Azure Kubernetes Service (AKS)

Azure + Kubernetes = Azure Kubernetes Service (AKS).


What is Azure Kubernetes Service?

Cloud Infra Process Model

AKS Manual Installation

  • First check in which Azure regions AKS is supported. Then create a resource group in that region.
  • Create an Azure Container Registry (ACR) unless you already have created one for other Docker related purposes.
  • Tag the Docker images you are planning to use in your new Kube infra with the Azure Container Registry prefix and push images to Azure Container Registry.
  • Create the AKS using CLI: “az aks create --resource-group aks-demo --name kube-demo-cluster --node-count 1 --generate-ssh-keys” => takes several minutes to create, finally prints a lot of stuff and “provisioningState”: “Succeeded”.
  • Configure AKS to use Azure Container Registry. This part involves several steps like: 1. Getting the AKS credentials using CLI (“az aks get-credentials --resource-group <your-resource-group-name> --name <your-kube-cluster-name>”), 2. Checking the configuration using kubectl (“kubectl config view” => you should see your new Kube cluster configuration here), 3. Get the service principal (“az aks show --resource-group <your-resource-group-name> --name <your-kube-cluster-name> --query “servicePrincipalProfile.clientId” --output tsv”), 4. Get the ACR resource id (“az acr show --name <your-docker-registry-name> --resource-group <your-resource-group-name> --query “id” --output tsv”), and finally 5. Glue AKS and ACR together (“create --assignee <Service-Principal-id> --role Reader --scope <ACR-Registry-Resource-id>”).

Deploy the Kubernetes Deployment Configuration

Creating AKS Infra Using ARM Template

ARM json code related to AKS infra.
az group deployment create --name <your-deployment-name>
--resource-group <your-resource-group-name> --template-file <your-json-file> --parameters @<your-json-parameters-file>
az aks get-credentials --resource-group <your-resource-group-name> --name <your-kube-cluster-name>az aks browse --resource-group <your-resource-group-name> --name <your-kube-cluster-name>




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Kari Marttila

I’m a Software architect and developer. Currently implementing systems on AWS / GCP / Azure / Docker / Kubernetes using Java, Python, Go and Clojure.