Get Started with Kubernetes (AKS) in Azure


disney-concert-hall-1147810_640A few weeks ago we wrote an article about how to get started with Docker in Azure.

This time we’ll do it with Kubernetes using Azure AKS Service.

What is Kubernetes?

From https://kubernetes.io/:

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

In the online documentation overview, Kubernetes is further defined as:

  • a container platform
  • a micro-services platform
  • a portable cloud platform

Kubernetes was inspired by Google’s Borg project.  Google uses Borg to run very large clusters (10 000 machines).

There are a lot of Kubernetes tutorials.  We suggest two here:

  1. Kubernetes Interactive Tutorial:  online tutorial giving access to a Kubernetes cluster via a web interface.  Zero install required.  Learn from the source (i.e. https://kubernetes.io/)
  2. Introduction to Kubernetes from Linux Foundation X (LFS158x) by EDX:  like many EDX courses, it is free unless we want a certificate.  It covers Kubernetes at large.  It is text-based (i.e. not much videos).

We suggest getting our hands dirty using Azure AKS right away as opposed to installing Minikube on our laptop.

What is Azure AKS?

AKS is a managed service running Kubernetes Clusters (as we’ve seen in our Overview of containers in Azure).

It is managed in the sense the service manages (e.g. patches) the worker nodes VMs.  Head nodes aren’t charged.

AKS is the next generation of ACS.  ACS was an unmanaged service where both head and worker VMs were the responsibility of the user.

Using AKS

AKS has a very low friction starting scenario using the Azure CLI.  A similar scenario exists using the Azure Portal.  We recommend trying the CLI one as the Portal’s support is still limited (as of this writing, mid-April 2018).

The creation of a cluster is one simple command:


az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 1 --generate-ssh-keys

az aks install-cli

az aks get-credentials --resource-group myResourceGroup --name myAKSCluster

The first command creates the cluster (in a pre-existing resource group).  The second installs Kubernetes CLI.  The third one downloads the cluster’s credentials for Kubernetes CLI to use.

That’s it.

The online documentation goes through those steps and more.  We create two deployments and two services and test them.

It is quite easy and convenient to do this demo on our laptop.  Same thing for any training (e.g. those suggested in the previous section) .  It requires a Linux environment.  We use Windows Subsystem for Linux (aka bash shell).  If for some reason that isn’t possible, we can always provision a VM in Azure with Azure CLI.

Only the Kubernetes CLI gets installed on the client machine.  Kubernetes itself and all running containers are in AKS.  The client machine doesn’t get contaminated.

Doing more

The online documentation is quite good at this point (mid-April 2018).  We can learn many of the basics of AKS:

Finally the FAQ is a good place to go about incoming features and current limitations.

Summary

Azure AKS is a strong addition to the Container family in Azure.  It is growing quite quickly although it isn’t Generally Available (GA) as of this writing (mid April 2018) yet.

The friction free setup and general management of the cluster makes it very quick & easy to start.

Given the popularity of Kubernetes, this service is a must to get familiar with.

Advertisements

6 thoughts on “Get Started with Kubernetes (AKS) 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 )

Google+ photo

You are commenting using your Google+ 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