Wednesday Tidbit: Standing up a Kubernetes cluster in Microsoft Azure

20151204 - 1Recently, Microsot announced the GA release of their Public Cloud Kubernetes offering – Azure Kubernetes Service (AKS). Now DevOps practioners have the ability to stand-up k8s clusters in the cloud and integrate workloads with their existing CI/CD pipelines, without having to go to another provider.

Despite spending a lot of time recently with VMware and Pivotal’s Kubernetes offering (PKS), this week I needed to spin-up a Kubernetes cluster for a POC. Little did I know how easy it would be…

Getting Started

Open the Azure CLI and use the following (sustitute your resource group and location accordingly):

az aks create --resource-group Default_RG -l westeurope -n europe-cluster02 --node-count 3 --generate-ssh-keys

At the time of writing, AKS is not available in my default region (UK West), so I was forced to specify an alternate location.

Next, install the Kubernetes tools (kubectl etc.) to enable you to manage the cluster:

az aks install-cli

Retrieve the cluster credentials:

az aks get-credentials --resource-group Default_RG --name europe-cluster02

Finally, browse to the Kubernetes Dashboard:

az aks browse --resource-group Default_RG --name europe-cluster02

This effectively uses SSH Forwarding from a local port (8001) to your AKS cluster (port 9090). If all went well, you will see the all-familiar dashboard:

I think you’ll agree, Microsoft have done an amazing job in streamlining the process for provisioning a Kubernetes cluster in Azure!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.