Terraform EKS Module — Provision EKS Cluster with in <30 minutes
When it comes to deploying applications on Amazon Web Services (AWS), the Elastic Kubernetes Service (EKS) has emerged as a popular choice thanks to its ability to automate the deployment, scaling, and management of containerized applications. However, setting up an EKS cluster can be time-consuming and complex without a proper tool. This is where the Terraform EKS Module comes in. In this essay, we will explore we will launch latest version of EKS version 1.27 by leveraging the Terraform EKS Module to provision an EKS cluster in less than 30 minutes.
Setting Up the Environment
To set up the environment for provisioning an EKS cluster using the Terraform EKS Module, we need to perform several steps:
Installing Terraform
Install Terraform on your local machine by downloading the appropriate Terraform binary and adding it to your system path.
Acquiring AWS Credentials
Create an AWS account or use an existing one, then generate an access key and secret key pair in the AWS console. Save these credentials in a secure location.
Creating an IAM User for Terraform
Create an IAM user in the AWS console with the necessary permissions to provision EKS resources, then attach an appropriate policy to the user.
Obtaining the Terraform EKS Module
In this tutorial we will use this module officially from AWS. This example will the create following EKS resources.
- EKS Cluster
- managed node_group
- add-ons
- AWS CNI
- kube-proxy
- core-dns
- access to two IAM users.
https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest
Creating the Terraform EKS Configuration
Create a new Terraform configuration file main.tf
and copy the contents below.
In this example we will launch the latest version as of today is 1.27
continue reading here