Skip to content

How can I deploy an Amazon EKS cluster with the new Auto Mode enabled, using Terraform

0

Amazon EKS Auto Mode was launched at AWS re:Invent 2023

EKS Auto Mode automates:

  • Compute: It creates new nodes when pods can't fit onto existing ones, and identifies low utilization nodes for deletion.
  • Networking: It configures AWS Load Balancers for Kubernetes Service and Ingress resources, to expose cluster apps to the internet.
  • Storage: It creates EBS Volumes to back Kubernetes storage resources.

How can I use Terraform to deploy an EKS Cluster with Auto Mode Enabled including

  • Sample app Deployment
  • ALB Elastic Load Balancer
  • EBS PersistentVolume
3 Answers
1

To deploy an EKS Cluster with Auto Mode enabled using Terraform, including a sample app deployment, ALB Elastic Load Balancer, and EBS PersistentVolume, you can utilize the Terraform AWS EKS module. A great starting point is the example provided in the Terraform Registry.

This example demonstrates how to set up an EKS cluster with Auto Mode enabled, which automates compute, networking, and storage management. You'll need to customize the example to include your specific sample app deployment, configure the ALB Ingress Controller for load balancing, and define the necessary PersistentVolume and PersistentVolumeClaim resources for EBS storage.

Remember to adjust the variables in the Terraform configuration to match your AWS environment and requirements. Additionally, you may need to add separate Terraform resources or modules for any application-specific configurations not covered by the EKS Auto Mode.

AWS
EXPERT
answered 9 months ago
  • Nice Resource! Thanks for sharing 😁 -- I think it is complimentary to my example here: https://github.com/setheliot/eks_auto_mode which also includes a sample app, and ALB, and a EBS volume used as Persistent storage. Check it out and let me know what you think

0
Accepted Answer

This GitHub repro contains everything you need to deploy the EKS Cluster with Auto Mode Enabled

https://github.com/setheliot/eks_auto_mode

Additionally, this blog post goes into deeper detail on how Auto Mode works and how to implement it

https://community.aws/content/2sV2SNSoVeq23OvlyHN2eS6lJfa/amazon-eks-auto-mode-enabled-build-your-super-powered-cluster

EKS Auto Mode Architecture

answered 9 months ago
  • On Stack Exchange this is common way to share knowledge. I worked to find the answer to this question, and now want to share that knowledge with the community. Is that not acceptable on re:Post?

  • Please don't use rePost in this manner to fake post a question and then respond with your own github repo link as the answer.

-1

Amazon EKS Auto Mode was not launched at AWS re:Invent 2024, as that event has not occurred yet. EKS Auto Mode was actually announced and made generally available in 2023.

Regarding deploying an Amazon EKS cluster with Auto Mode enabled using Terraform, as of now, there isn't a direct Terraform resource specifically for EKS Auto Mode. However, you can create an EKS cluster with Auto Mode enabled using other methods, and then manage additional resources with Terraform.

To create an EKS Auto Mode cluster, you can use the AWS CLI, AWS Management Console, or eksctl. For example, using eksctl, you could run:

eksctl create cluster --name=<cluster-name> --enable-auto-mode

After creating the cluster with Auto Mode enabled, you can use Terraform to manage other aspects of your infrastructure, including:

  1. Sample app Deployment: You can define a Kubernetes Deployment resource in Terraform to deploy your application.

  2. ALB (Application Load Balancer): EKS Auto Mode automatically configures AWS Load Balancers for Kubernetes Service and Ingress resources. You would define these Kubernetes resources, and Auto Mode would handle the ALB creation and configuration.

  3. EBS PersistentVolume: EKS Auto Mode automatically creates EBS volumes to back Kubernetes storage resources. You would define a PersistentVolumeClaim in your Terraform configuration, and Auto Mode would handle the EBS volume creation.

It's important to note that while EKS Auto Mode automates many aspects of cluster management, you still have control over specific configurations through Kubernetes resources, which can be managed with Terraform.

For the most up-to-date information on using Terraform with EKS Auto Mode, I recommend checking the official Terraform documentation and AWS EKS documentation, as support and best practices may evolve over time.

Sources
Streamline Kubernetes cluster management with new Amazon EKS Auto Mode | AWS News Blog
Getting started with Amazon EKS Auto Mode | Containers
Automate cluster infrastructure with EKS Auto Mode - Amazon EKS
Create a cluster with Amazon EKS Auto Mode - Amazon EKS

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.