Azure Kubernetes Service (AKS) is an orchestrating engine to run multiple containerized applications in a cluster. It is currently growing in the developer and cloud engineering community and gainer more adoption in the enterprise. Learning and working with AKS has known to have a steep learning curve. There are many parts and pieces to get your head wrapped around and how they all work together. And the same goes with all the developer and engineering tools to build, deploy and manage and operate an AKS environment.
For those getting started and wondering what they need to build your tool belt, I will share what’s in my tool belt so this may start as a starting point to build your AKS tool belt. I like to mention that my background is very which Microsoft and windows platform based. Working with Kubernetes is getting me more exposure to the Open Source Software and Linux practices and software.
My Software and tools
My development machine operating system is Windows 10
Visual Studio Code (VS Code)
Lightweight but powerful source code editor. Free.
I prefer this tool as it is very light weight and very popular in the general developer community and not just with Microsoft-centric communities. I prefer it for its plugin extensions. Alternative IDEs, are any code editor you choose, including the latest version Visual Studio which has more rich capabilities.
Docker is a full development platform to build, run, and share containerized applications. Docker Desktop is the best way to get started with Docker on a Windows machine.
Docker Desktop has Kubernetes integrated. So you have a simple local Kubernetes cluster.
Using docker for windows is a main starting point for a developer to build and test containerized applications in your local machine.
Minikube implements a local Kubernetes cluster on macOS, Linux, and Windows. minikube’s primary goals are to be the best tool for local Kubernetes application development and to support all Kubernetes features that fit.
This is another option to Docker Desktop’s OOTB Kubernetes cluster. I found this initially tricky to install and setup, especially with the hyper-v virtual switch on my windows 10 machine. This is solely for local development scenarios and not production. I tried this setup on an Azure VM and I don’t think it is supported well, so don’t bother trying.
Command Line Interface (CLI)
CLIs are text-based interfaces to execute commands against an application or system.
This is installed as part of Docker for Windows. Here is a Docker cheat sheet
Build an image from the Docker file in the current directory
docker build -t helloworldimage:1.0
Run a container from the image
docker container run –name myApp -p 5000:80 helloworldimage:1.0
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. I typically use this for testing the app locally and is optional as part of the Kubernetes app lifecycle.
Compose has commands for managing the whole lifecycle of your application:
- Start, stop, and rebuild services
- View the status of running services
- Stream the log output of running services
- Run a one-off command on a service
Starts and runs your multi-container app based on the yaml file in the current directory
Minikube has its own CLI.
Start a cluster
Access the Kubernetes Dashboard running within the minikube cluster
minikube makes it easy to open this exposed endpoint in your browser
minikube service hello-minikube
Helps manage and configure a kubernetes cluster, including Azure Kubernetes Service (AKS).
For the commands cheat sheet read https://kubernetes.io/docs/reference/kubectl/cheatsheet/
List all services in the namespace
kubectl get services
kubectl get pods
Create a Kubernetes resource
kubectl apply -f ./my-manifest.yaml
Knowing kubectl is core to being a kubernetes developer or engineer.
Helm helps you manage Kubernetes applications — Helm Charts help you define, install, and upgrade even the most complex Kubernetes application. Helm is a tool for managing Charts. Charts are packages of pre-configured Kubernetes resources.
Use Helm to:
- Find and use popular software packaged as Helm Charts to run in Kubernetes
- Share your own applications as Helm Charts
- Create reproducible builds of your Kubernetes applications
- Intelligently manage your Kubernetes manifest files
- Manage releases of Helm packages
I find helm integral in packaging up your applications for deployment. It is fairly easy to work with, but have to understand its syntax. I find helm really useful to deploy applications freely available. A good example would be the nginx controller when setting up a kubernetes cluster.
For source control management. This is a standard tool these days.
Designed to get you working quickly and efficiently with Azure services, with an emphasis on automation.
For managing Azure Kubernetes, most examples lean towards Azure CLI vs Azure PowerShell. They both work well. I just end up using Azure CLI.
You can find the azure aks related commands at https://docs.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest
Creating an AKS cluster
az aks create -g MyResourceGroup -n MyManagedCluster –kubernetes-version 1.13.9 –vm-set-type AvailabilitySet
You can find sample ARM templates related to AKS at https://github.com/Azure/azure-quickstart-templates/tree/master/101-aks. You can find other AKS related samples in this repo. At first it is a learning curve to get going and understand the syntax and how it all works. In my experiences it works well.
VS Code Extension: Azure Resource Manager Tools
Provides language support for Azure Resource Manager deployment templates and template language expressions. This is used to provide a better developer experience in VS Code when building out ARM Templates for AKS and its dependent azure resources such as virtual networks.
VS Code Extension: Kubernetes
The extension for developers building applications to run in Kubernetes clusters and for DevOps staff troubleshooting Kubernetes applications.
I really like this tool and use it regularly. I like how I can easily change between different AKS clusters either in Azure, minikube or Docker Desktop. I prefer any GUI management over CLI.
Works with any Kubernetes anywhere (Azure, Minikube, AWS, GCP and more!).
Skaffold handles the workflow for building, pushing and deploying your application, allowing you to focus on what matters most: writing code.
This tool is more for the app developer in a dev environment. A scenario that is cool is when a developer makes a change in the code, scaffold will build an image and can deploy the helm chart into your development Kubernetes environment. It basically streamlines the process from code to running app in Kubernetes. I think of it as a mini CI/CD pipeline, although it an integrate into a rigorous CI/CD pipeline tool such as Azure DevOps Pipelines.
Tools I plan to explore and will update this blog post to share my experiences and opinion:
Istio as a service mesh
Istio helps reduce the complexity of these deployments, and eases the strain on your development teams. It is a completely open source service mesh that layers transparently onto existing distributed applications. It is also a platform, including APIs that let it integrate into any logging platform, or telemetry or policy system.
Prometheus for monitoring
Prometheus is a popular open source monitoring and alerting toolkit. Prometheus can integrate with Azure Monitor for containers.
Typically, to use Prometheus you need to setup and manage a Prometheus server with a database. With the Azure Monitor integration, no Prometheus server is needed.
I have shown a lap around the tools I have used in practice and real-world scenario given my windows background. I plan to update this blog post further as I continue to build my toolbelt and get more in depth with other technical scenarios using these tools. I hope this helps you start your Kubernetes development journey as you decide what your tool belt will hold.