Creating the Control Plane

Learn how to create a primary cluster in Azure using Terraform definitions.

Azure cluster specifications

Now we have all the prerequisites. The provider is set to azurerm, and we have the backend (for the state) pointing to the blob in the storage container. We can turn our attention to the AKS cluster itself.

A Kubernetes cluster almost always consists of a control plane and one or more pools of worker nodes. In the case of AKS, we can set the default worker node pool while creating the control plane, and others can be added separately. We’ll start with the control plane and the default node pool, and move toward additional pools later.

Viewing control plane file

We can use the azurerm_kubernetes_cluster module to create an AKS control plane and a default worker node pool.

Let’s see the definition of k8s-control-plane.tf.

Get hands-on with 1400+ tech skills courses.