Skip to main content

How to provision an Amazon EKS cluster and deploy a workload

EKS is AWS-managed Kubernetes; eksctl provisions the control plane and managed node groups in one command. Update kubeconfig, deploy a workload, and expose it with a cloud load balancer.

Difficulty
Intermediate
Duration
50 minutes
Steps
6

Provisioning an Amazon EKS cluster

Amazon EKS is AWS's managed Kubernetes service. AWS runs the control plane; you bring worker nodes. eksctl is the simplest way to create a production-style cluster quickly, while Terraform is preferred when you want everything in code.

Prerequisites

  • An AWS account with permissions to create EKS, EC2, and IAM resources.
  • AWS CLI configured, plus eksctl and kubectl installed.

Steps

1. Install and configure tools

Confirm access:

aws sts get-caller-identity
eksctl version

2. Create the cluster

eksctl create cluster \
  --name demo \
  --region us-east-1 \
  --version 1.30 \
  --nodegroup-name workers \
  --nodes 3 --nodes-min 2 --nodes-max 6 \
  --managed

This provisions the VPC, control plane, and a managed node group, which takes several minutes.

3. Update kubeconfig

eksctl updates kubeconfig automatically; confirm with:

kubectl get nodes

To reconnect later: aws eks update-kubeconfig --name demo --region us-east-1.

4. Add managed node groups

Add specialized capacity, for example spot instances, with eksctl create nodegroup. Managed node groups handle AMI updates and graceful draining.

5. Deploy a workload

kubectl create deployment web --image=nginx --replicas=3

6. Expose with a load balancer

kubectl expose deployment web --port=80 --type=LoadBalancer
kubectl get svc web

AWS provisions an external load balancer; the EXTERNAL-IP appears when ready.

Verification

Confirm nodes are Ready with kubectl get nodes and pods are Running. Browse to the load balancer's address and confirm the app responds. Check the EKS console to see the cluster and node group health.

Next Steps

Install the AWS Load Balancer Controller for Ingress, enable IAM Roles for Service Accounts (IRSA) for fine-grained pod permissions, add the Cluster Autoscaler or Karpenter, and codify the whole setup in Terraform for repeatability. Always delete demo clusters with eksctl delete cluster --name demo to avoid charges.

Prerequisites

  • An AWS account with IAM permissions
  • AWS CLI configured
  • eksctl and kubectl installed

Steps

  • 1
    Install and configure tools
  • 2
    Create the cluster
  • 3
    Update kubeconfig
  • 4
    Add managed node groups
  • 5
    Deploy a workload
  • 6
    Expose with a load balancer

Category

Cloud