Creating the Control Plane

AWS Cluster Specifications

Now we have all the prerequisites. The provider is set to AWS, and we have the backend (for the state) pointing to the bucket. We can turn our attention to the EKS cluster itself.

A Kubernetes cluster (almost) always consists of a control plane and one or more pools of worker nodes. In the case of EKS, those two are separate types of resources. We’ll start with the control plane and move toward worker nodes later.

We can use the aws_eks_cluster module to create an EKS control plane. Unlike other major providers (e.g., GKE, AKS), EKS cannot be created alone. It requires quite a few other resources. Specifically, we need to create a role ARN, a security group, and a subnet. Those, in turn, might require a few other resources.

Viewing control plane file

Let’s see the definition of k8s-control-plane.tf. The output is as follows.

Get hands-on with 1200+ tech skills courses.