Setting up an AWS EKS cluster with addons like coredns, kube-proxy, and vpc-cni, utilizing terraform modules terraform-aws-modules/eks/aws and terraform-aws-modules/vpc/aws. It also includes configuring the AWS load balancer controller
To create resources you will need:
1 - Creation of resources
-
Check for terraform remote backend in s3 exists
is required exist a s3 with name expected in version.tf
aws s3 ls --profile default # Example output: # 2023-10-18 19:51:18 terraform-state-516735145595
-
Download modules used in
main.tf
terraform init
-
Preview the resources that will be created
terraform plan
-
Create the resources
# Estimated time to create all resources: 20 minutes terraform apply
2 - Update kubeconfig File
Update your kubeconfig file to access the created cluster
# update config file in ~/.kube
aws eks update-kubeconfig --name apps --region us-east-1
3 - Communicate with the Cluster
Use kubectl to interact with your cluster
# get all resources created in kubernetes
kubectl get all -A