Over in Part 1 we used Terraform to spin up a really basic Kubernetes cluster in azure. CLI for the win always!

In Part 2, we setup a private Azure Container Register using azure-cli and terraform.

For the 3rd and final instalment of this “Look Ma, I’m playing with Azure!”, we will deploy an application to our AKS cluster using kubectl

Series Overview

Part 1 - get Kubernetes cluster up and running on Azure Kubernetes Managed Service (AKS)

Part 2 - create a private Docker Registry in the cloud using Azure’s Container Registry Managed service (ACR)

Part 3 - deploy a simple application to AKS.

Note: I’m writing Part 3 quite a while after Part’s 1 & 2, and I’ve learned quite a lot in that time and as such my approach and code will be a bit different. So I’ve gone back and updated most of Parts 1 & 2 to hopefully fit Part 3. No promises though.

K8s Service

Again, like the deployment this is just a basic “service” component to be deployed. A Service is an abstraction that defines a set of pods somewhere on your cluster that all do the same thing.
If a node dies and takes all the pods with it, as long as there was a ‘Service’ configured for the functionality of those pods, the new pods that come up with new IP addresses will be known to the Service.