The evolution of AKS: from Containers to Kubernetes to Azure Kubernetes Services (AKS)
For some time now [Azure] Kubernetes is thé platform to orchestrate containers. Why is this and what are the benefits of using Kubernetes and managed Kubernetes (AKS)?
Wolter Kamphuis, Intercept
The basics: containers
For me, the evolution of AKS starts with containers. Even though you don’t recognize containers at first, they are applied everywhere. The app on your phone for example is packaged as a container as well.
A container is a reliable way to package applications and to make them available to multiple environments (Microsoft Azure, private datacentre or Amazon). This is because a container isn’t depending on the platform where it is deployed. To function properly the container contains the application including all the necessary runtime and dictionaries. It doesn’t matter if the container runs on system A or B: the contents remain the same and all dependencies will be provided. For a representation see the image below.
Containers more efficient because they share the same operating system (OS) and resources. In contrary to VMs, which make use of the same OS, containers can often be started in seconds, while a VM often needs minutes to do the same. Containers are also more interesting in terms of costs, because several containers use the same resources.
The use of containers offers many more benefits. If you want to know more about containers, please feel free to read the article ‘write once, run anywhere’, written by Wesley Haakman.
Microservices and Containers go hand in hand
Microservices and containers fit extremely well together. In a Microservice architecture, an application is split into multiple smaller services. Each service performs a specific task, nothing more. Microservices are developed independently and a unique development environment can be chosen for each service. For example, service A could make use of .net core, service B of php and service C of node.js.
It would be very inefficient to start a separate VM for each service. Containers offer an excellent solution to avoid this. By packaging each service in a container all containers can use the same hardware. After all, a container does not only contain the application to function properly, it also contains all the necessary runtime and libraries as well. The results of using the same hardware for multiple containers will give you a large cost benefit.
Kubernetes is THE solution for managing containers
Kubernetes is the solution for the efficient management of larger numbers of containers. Kubernetes combines all VM’s or servers (nodes) into one cluster. This cluster can be managed centrally, by a system administrator or by the development teams themselves.
The main advantages of Kubernetes are:
Kubernetes merges containers in "Pods" so that the most management problems will be solved. You assign properties to Pods such as storage, networking and scheduling. Kubernetes will then look at the available memory and processor usage of each node and will choose the best distribution for you. All nodes within the Kubernetes cluster will be optimally deployed. Eventually resulting in direct cost savings.
Kubernetes ensures that Pods are always present exactly as configured. Kubernetes will create or distribute the new pods in case of maintenance or malfunction. In this way your site or applications is always available.
- Update without downtime
By using rolling updates you can always update without downtime. Rolling updates is a technique for replacing containers with a newer version one by one. The Kubernetes’ built-in load-balancing ensures that requests are always redirected tot the available pods. In most cases this makes sure that it is no longer necessary to update in the evening or at night.
- Central Management
You manage your Kubernetes in one place. Kubernetes has its own storage for configurations, passwords and certificates. No local configuration is needed on VM or server level. This makes the management of a Kubernetes cluster more efficient than the management of many VMs.
Manage your Kubernetes with Azure Kubernetes Services
Setting up a Kubernetes cluster is a serious job and requires extensive knowledge and experience of Linux, Docker and Kubernetes. Even if you accomplish to set up a cluster you still must support and maintain it. You must plan well in advance how to deal with malfunctions, updates and releases. If you do this yourself, it takes a lot of time and effort. So how can you solve this even better?
Azure Kubernetes Services
Azure Kubernetes Services (AKS) is managed Kubernetes in Azure. Microsoft takes over all your complex cluster management with AKS. With a few clicks or a few code lines you have an AKS cluster in production and you can manage your containers easily.
Microsoft is one of the largest participating organizations that actively develops on Kubernetes. This results in perfect support for Kubernetes in Azure. After a new version is released the version is available in Azure within two weeks. Updating a cluster, normally a very complicated job, has been reduced to a single click with AKS.
The reasons why you will love AKS even more:
- It is Free! AKS is a free service. You only pay for the resources (VMs, storage and networking) your cluster uses. No additional costs are charged for the AKS PaaS service itself. Basically, the complex management of the cluster is free of charge.
- Each Kubernetes cluster needs one or more master nodes. These master nodes contain the configuration and take responsibility for the management of the cluster. The master nodes are at the expense of Microsoft, you only pay for the VMs or workloads your cluster consists.
- AKS offers excellent integration with Azure DevOps for setting up CD / CI pipelines. For CI en CD pipelines it is most important that updates are deployed to production systems at any time of the day. With rolling updates, you can update the containers one by one without any downtime.
- The AKS clusters in Azure run on an Availability set. In this way the servers of a cluster are distributed to several physically separated hardware racks. This guarantees that the cluster itself stays online during a failure of underlying hardware. As a result, an AKS cluster and is always available and therefore your application as well.
- Horizontally scaling, dding or removing nodes is possible without any downtime and even is fully automatically. If you ever need any extra power, nodes are added to the cluster in just a few clicks.
- Last, but not least. With Azure Kubernetes Services you have unmatched integrations with other services within Azure. For example, the integration with storage, networking, monitoring and security is flawlessly integrated within Kubernetes.
In the follow-up article you will read what you need to set up an Azure Kubernetes cluster and how you can put this into practice step by step. Subscribe here to Intercept Insights.