Introducing eksctl
eksctl is the fastest, most popular way to create and manage EKS clusters from the command line.
Syntax
eksctl create cluster -f cluster.yamleksctl is an open-source CLI (originally by Weaveworks) that turns EKS setup into a single command. Behind the scenes it builds AWS CloudFormation stacks for the VPC, cluster, and node groups.
Two ways to drive it
- Flags — quick, for simple clusters:
eksctl create cluster --name .... - Config file — a versionable YAML manifest for repeatable, reviewable clusters. This is the recommended approach for real environments.
eksctl also manages day-2 tasks: adding node groups, enabling IRSA, installing add-ons, and deleting clusters cleanly.
Example
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: demo
region: us-east-1
version: "1.30"
managedNodeGroups:
- name: ng-default
instanceType: t3.medium
desiredCapacity: 2
minSize: 1
maxSize: 4When to use it
- A DevOps engineer uses eksctl to spin up a complete EKS cluster with VPC and nodes in under 15 minutes for a proof-of-concept demo.
- A platform team uses eksctl ClusterConfig YAML files committed to Git to create reproducible, version-controlled cluster definitions.
- A data engineering team uses eksctl to add a GPU node group to an existing cluster without recreating the control plane.
More examples
Create cluster with one command
The minimal eksctl command that creates a VPC, control plane, and managed node group in one shot.
eksctl create cluster \
--name dev-cluster \
--region us-east-1 \
--version 1.30 \
--nodegroup-name workers \
--node-type t3.medium \
--nodes 2 \
--nodes-min 1 \
--nodes-max 4eksctl ClusterConfig file
A ClusterConfig YAML for eksctl — declarative, Git-committable, and repeatable across environments.
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: prod
region: us-east-1
version: "1.30"
managedNodeGroups:
- name: workers
instanceType: m5.large
minSize: 3
maxSize: 12
desiredCapacity: 3
privateNetworking: trueAdd a node group to existing cluster
Adds a GPU node group to an already-running cluster without touching the control plane or existing node groups.
eksctl create nodegroup \
--cluster prod \
--name gpu-workers \
--node-type g4dn.xlarge \
--nodes 2 \
--nodes-min 0 \
--nodes-max 4 \
--node-labels workload=gpu
Discussion