EKS Auto Mode and Terraform

Amazon recently announced the arrival of Amazon EKS Auto Mode at re:Invent, and I personally think that it’s a game changer for their already hugely popular platform for running Kubernetes at scale.

Some people would say that the best part of Kubernetes is that it allows users a huge amount of control over clusters at almost every level. I would argue that this is also an unnecessary barrier for people who want to use the service but who are overwhelmed with the sheer amount of configuration required - I don’t think I’ve ever heard anyone call Kubernetes “easy”.

Before the release of Auto Mode, AWS managed the Control Plane for their customers, leaving the customer to manage the Data Plane. This meant that the customer was responsible for configuring the Compute, Networking, Storage, and Observability aspects of Kubernetes before they even got to the Application Layer, which is where users want to be spending most of their time.

With this release, AWS has taken their experience of running tens of millions of clusters for customers and removed most of the heavy lifting. Removing a high level of complexity means that they have effectively lowered the barrier for entry when it comes to customers using Kubernetes.

Here are the before and after pictures of how the responsibilities were drawn out between AWS and their customers.

Before EKS AutoBefore EKS Auto

After EKS AutoAfter EKS Auto

What does this mean in practice? Well, AWS now manage all of the following for you:

Compute:

  • Instance selection
  • Instance lifecycle management
  • OS Patches
  • Autoscaling
  • Tools such as Karpenter

Networking

  • Pod-to-Pod networking
  • Exposing applications to the public internet
  • Load Balancers
  • VPC CNI
  • CoreDNS

Storage

  • CSI Drivers
  • Container storage
  • Persistent storage for stateful workloads

Observability

  • Health monitoring
  • Troubleshooting
  • Remedial work

That’s a lot by anyone’s standards, substantially reducing operations and heavy lifting while providing a production grade backend with security baked in. Since it’s also managing instance types and sizes and dynamically scaling cluster compute, it’s also cost optimised and should save you money compared to you doing that yourself.

Terraform

In a future post I’ll go over deploying EKS with Auto Mode, but for now I just wanted to point out that Hashicorp have already released a new version of the AWS Provider that includes support. As ever, the community has been really fast with implementing this, and the main community module for deploying EKS Clusters already has support with examples.

Using the module, deploying EKS with Auto Mode looks something like this:

...
module "eks" {
  source = "../.."

  cluster_name                   = local.name
  cluster_version                = local.cluster_version
  cluster_endpoint_public_access = true

  enable_cluster_creator_admin_permissions = true

  cluster_compute_config = {
    enabled    = true
    node_pools = ["general-purpose"]
  }
...
}
Written by