AKS Cluster
Explore how to set up an Azure Kubernetes Service (AKS) cluster by configuring essential elements like node pools, node counts, and Kubernetes version. Understand the roles of control plane and worker nodes. Learn to simplify external client access with AKS automatic HTTP routing. Gain skills how to efficiently deploy and manage Kubernetes clusters in the cloud.
We'll cover the following...
An AKS cluster is basically a Kubernetes cluster hosted on the Azure cloud. The installation and configuration process of the Kubernetes cluster on a local system involves a lot of work and time. On the cloud, the workload is reduced and installation speed is increased because the process is automated while using the AKS cluster.
We can create an AKS cluster either using the Azure portal or the command line. While creating a cluster, we need some basic information, such as:
- Cluster name
- Kubernetes version we want to work with
- The initial size of the node pool
- A DNS prefix to make the master node publicly accessible
Note: By default, the initial node pool size is two. It is recommended to maintain a minimum size of three for the production environment.
Cluster nodes
A cluster consists of multiple virtual machines working as a unit. Each virtual machine is referred to as a node. There are two types of nodes in the Kubernetes cluster, each with a different functionality.
-
Control plane node: The master node, which manages the entire cluster.
-
Node: Nodes other than the master node. These are worker nodes, which are simply referred to as nodes.
Creating an AKS cluster
While creating a cluster, we need some basic information, such as:
- Node pools
- Node count
- Automatic routing
Node pools
In AKS, we can group multiple nodes with the same configuration into one. This group is referred to as a node pool. These node pools contain virtual machines that run our application. While creating a node pool based on our requirements, we specify the virtual machine size and the OS type. By default, the Linux OS is used. To host user applications, node pools must be in either of the following modes:
- User mode: User mode has its OS type as Windows.
- System mode: System mode has its OS type as Linux.
Node count
Node count is the number of nodes we want to be present in the node pools of our cluster. We can choose their size and numbers depending on our requirements.
Automatic routing
By default, a Kubernetes cluster blocks all external connections in order to ensure the security of the nodes in the cluster. This can be an issue if we’ve hosted our application on the cluster where we want the clients to be able to view the page. In order to resolve this issue, we need to create an ingress manually with an exception that allows incoming client connections to that particular service. Depending on our requirement specifications, this can be a complicated process.
To resolve this issue, AKS provides an HTTP routing option. This makes it easy to access applications on the cluster. This is based on an automatically deployed ingress controller.