Need a terraform script to setup the latest 2022 EKS cluster including the best goodies like Helm, AWS Load Balancer Controller and External DNS?
Then please have a look at my GitHub repository eks-cluster-with-lb-controller.
The advantage of its configuration is that for the lifecycle of application specific resources (DNS entries, load balancers, target groups), Terraform is not needed. Kubernetes ingress resources with specific annotations are sufficient and can be checked into each application’s repository to fulfill IaC requirements.
If certificates are added to the AWS Certificate Manager in the cluster’s account, the applications will be able to use the certificates as well. The certificates are discovered using Certificate Discovery. This works with wildcard certificates as well.
k8s/game2048.yaml is the 2048 game example used by the AWS Load Balancer Controller, but this version is configured to use HTTP and HTTPS.
This configuration doesn’t create a VPC, but if needed one can easily be added by using the VPC Terraform module.
Note: This setup is loosely based on Provisioning Kubernetes clusters on AWS with Terraform and EKS, but is using the latest software versions from 2022 and supports External DNS as well.