Automated Azure Kubernetes Service cluster builds
Automatic
In the list of the managed Kubernetes solutions that dominate the market, the usual suspects are present, operated by the most popular cloud platforms: Google Kubernetes Engine (GKE), AWS Elastic Kubernetes Service (EKS), and Azure Kubernetes Service (AKS).
When you put Kubernetes through its paces in production environments, it's critical that you understand the nuances of your infrastructure to achieve high levels of uptime. When testing Kubernetes and its associated workloads in a laboratory setup, you must emulate your production workloads precisely so that you can ensure the ability to scale to cope with both predictable and unexpected increases in demand.
In this article I create an AKS cluster in Azure with the platform-provided command-line tool az
, which is often referred to as the Azure command-line interface (CLI) tool. With a programmatic approach, you should be able to create clusters that follow a consistent and repeatable structure and configuration. You can then replicate production workloads in whichever environments required. The commands I demonstrate for the end-to-end deployment workflow could easily be added to scripts to automate the process fully.
Of course, you have a few ways of achieving the same result – for example, the user interface (UI) or logging in to the UI and then taking advantage of the graphical interface (i.e., the Cloud Shell). Instead, I'll use a much more portable approach with the CLI binary provided by Microsoft to interact with the cloud platform. Incidentally, in true cloud-native style, you can run the binary from a Docker container, as per the official instructions [1], which could speed up deployments in environments that use continuous integration, continuous deployment (CI/CD) pipelines.
Ones and Zeros
The first step is to make sure the az
CLI
Buy this article as PDF
(incl. VAT)