DEV Community

Cover image for EKS Auto mode cluster creation from scratch
Vijay Kodam
Vijay Kodam

Posted on

EKS Auto mode cluster creation from scratch

AWS announced EKS Auto mode today at re:Invent. As a Kubernetes SME, who deployed and maintained multiple production Kubernetes workloads, EKS Auto mode is a game changer.

Here is a detailed article to guide you create a new EKS cluster using Auto mode from Management console. Note that there are other ways you can create EKS cluster using eksctl, cloudformation or Terraform.

If you are new to EKS, I highly recommend doing it through Management console as it guides you through every step and provides documentation wherever necessary. This is the best way to learn EKS by creating new EKS cluster.

Follow this article through the end to create a new EKS Auto mode cluster from scratch.

  1. Login to your AWS Console and go to EKS Clusters page.
  2. Click "Create cluster".
  3. In "Configure cluster" section select "Quick configuration (with EKS Auto Mode) - new"
  4. In "Cluster configuration" give a name for your EKS cluster. Leave the Kubernetes version as is, it selects the latest k8s version.

EKS cluster creation step 1

  1. For "Cluster IAM role" select the role if you already have it. Otherwise, click "Create recommended role".

Role creation

It will open a new browser tab, where recommended settings are already selected. Confirm that "Trusted entity type" is set to "AWS service", in the "Use case" section, "Service or use case" is set to "EKS" and "Use case" is set to "EKS - Auto Cluster". Click Next.

IAM ROle

Creating Cluster IAM role

IAM ROle

In "Add permissions" page, permissions are already selected for you. Just click Next.

Role name

Role Name is already added as "AmazonEKSAutoClusterRole". Leave it as is. Scroll down and click "create role".

Create role

role2

  1. Now go back to "Create EKS Cluster" page and click the refresh button as shown below, then you will see the newly create role.

new role

  1. Follow similar steps to create "Node IAM role" by clicking "Create recommended role". Note that this time "Use case" will be "EKS - Auto Node" instead of "EKS - Auto Cluster".

Click Next and then click "Create role".

create role

  1. Go back to EKS creation page, click refresh beside the node role and the role should be auto-populated as shown below.

EKS creation

  1. Now select the VPC and Subnets if you already have created. If not, create the VPC as shown below by clicking "Create VPC"

VPC 1

It will open a new browser tab. Go to that tab. Add name to the VPC.

VPC2

VPC3

We will be creating VPC in two AZs for high availability. Create two public subnets and two private subnets.

For Private subnets to download software from the Internet, you need to create NATGW in at least 1 AZ, as shown below. Then click "Create VPC". It takes couple of minutes to create VPC and all other resources.

I really loved this VPC creation page from long time, as I have used it before this version where you could not create VPC, subnets, NAT GWs and many other resources in a single flow like this. This has been the result of "Customer Obsession" from AWS side. Later, you could automate everything using Cloudformation or Terraform but for the first time user, this VPC creation process is great.

VPC Creation

After you create the VPC, you need to tag the subnets for the AWS ELB discovery.

Public Subnets should be resource tagged with:

kubernetes.io/role/elb: 1

Private Subnets should be tagged with:

kubernetes.io/role/internal-elb: 1

Both private and public subnets should be tagged with:

kubernetes.io/cluster/${your-cluster-name}: owned

or if the subnets are also used by non-EKS resources

kubernetes.io/cluster/${your-cluster-name}: shared

  1. Go back to the EKS creation page and select the newly created VPC.

  2. Make sure, you select only the Private subnets in the Subnets section.

  3. Click "Create" to create the EKS cluster.

EKS Cluster creation

It took me 10 minutes to create new EKS cluster.

EKS Cluster

You can see that EKS Auto Mode is Enabled.

Cluster

  1. Go to "Compute" tab and you can see "Built-in node pools". This is new feature in EKS Auto Mode. The node pools listed are created and managed by AWS.

Before EKS Auto Mode, one has to create EKS cluster first. Then create node groups.

Built-in node pools

  1. Go to observability tab, you can see that Control Plane logs are already enabled. Click on the View logs which will open respective Cloudwatch logs.

Cloudwatch logs enabled

  1. Click the "View dashboard" on the top right.

Dashboard

EKS Observability Dashboard

Go to control plane monitoring tab. It has wealth of information about the EKS cluster observability. This is also a new feature in EKS which was recently released before re:Invent 2024. Previously, I was creating dashboards in Grafana manually.

EKS control plane metrics

You have now successfully created EKS cluster using Auto mode.

Running "kubectl get nodes" at this point will not show any nodes. Don't worry. This is where EKS Auto mode magic kicks-in. Since there are no k8s user applications running, there are no nodes created.

As soon as you create an user k8s app, EKS will automagically create worker nodes, courtesy Karpenter in the background.

I had to test it and see it myself to believe it.

% kubectl get pods -A
NAMESPACE   NAME                               READY   STATUS    RESTARTS   AGE
game-2048   deployment-2048-7df5f9886b-czdl7   1/1     Running   0          90s
game-2048   deployment-2048-7df5f9886b-z2lgd   1/1     Running   0          90s

% kubectl get nodes  
NAME                  STATUS   ROLES    AGE   VERSION
i-0d46f31afc1ab4138   Ready    <none>   81s   v1.31.1-eks-1b3e656

Enter fullscreen mode Exit fullscreen mode

As you can see above, pod creation request was submitted 90s ago and EKS worker node was created only after that 81s ago.

If you have followed the instruction till here and created an EKS cluster then go ahead and deploy your user applications.

EKS Auto mode is the revolutionary feature from AWS which will jumpstart user adoption for sure.

Do follow and connect with me in LinkedIn to know more about EKS and AWS topics. You can also visit my website.

Top comments (0)