Kubernetes CrashLoopBackOff explained: a step-by-step workflow to diagnose it and fix the six most …
Kubernetes on AWS: EKS Setup with eksctl Kubernetes on AWS: EKS Setup with eksctl

Summary
A local kind cluster is perfect for learning, but eventually you need Kubernetes on real infrastructure. On AWS, the managed option is EKS (Elastic Kubernetes Service), and the fastest way to stand one up is eksctl. This guide takes you from nothing to a running EKS cluster with a workload exposed to the internet — and, just as important, shows you how to tear it down so it does not quietly drain your account.
EKS removes the hardest part of running Kubernetes: you do not manage or patch the control plane. AWS does. With eksctl on top, a production-shaped cluster is a single command. If you are brand new to the objects you will deploy, skim Kubernetes fundamentals first, then come back.

Prerequisites
You need three CLI tools and AWS credentials with permission to create EKS, EC2, and CloudFormation resources.
Expand your knowledge with Docker Logs: From docker logs to a Go Log Collector
# AWS CLI — configure credentials first
aws configure
aws sts get-caller-identity # confirm you are authenticated
# eksctl (macOS / Linux via Homebrew)
brew install eksctl
# kubectl
brew install kubectl
Create the Cluster with One Command
This is the whole setup. eksctl provisions a VPC, the EKS control plane, and a managed node group — all as CloudFormation stacks.
eksctl create cluster \
--name demo \
--region us-east-1 \
--nodes 2 \
--node-type t3.medium \
--managed
It takes 15–20 minutes. eksctl streams progress and, when finished, writes the cluster’s credentials into your ~/.kube/config automatically. Verify:
Deepen your understanding in kubectl Cheat Sheet: 30+ Essential Commands
kubectl get nodes
kubectl get pods -A # core system pods should be Running
graph TD
A[eksctl create cluster] --> B[CloudFormation]
B --> C[VPC + Subnets]
B --> D[EKS Control Plane - managed by AWS]
B --> E[Managed Node Group]
E --> F[EC2 Worker Nodes]
D --> F
F --> G[Your Pods]
Deploy and Expose a Workload
With nodes ready, deploy an app exactly as you would on any cluster. The only EKS-specific part is the Service type.
kubectl create deployment web --image=nginx --replicas=2
kubectl expose deployment web --type=LoadBalancer --port=80 --target-port=80
kubectl get svc web -w
A Service of type LoadBalancer tells the AWS cloud controller to provision an Elastic Load Balancer. After a minute or two, the EXTERNAL-IP column shows a public DNS name — open it in a browser and you are hitting pods running on EKS.
Explore this further in Kubernetes Fundamentals: Pods, Deployments, Services
LoadBalancer to learn, then graduate to Ingress.Inspect and Operate the Cluster
EKS clusters behave like any other Kubernetes cluster, so your usual workflow applies — every command from the kubectl cheat sheet works here.
kubectl get deploy,svc,pods -o wide
kubectl logs deploy/web
eksctl get cluster # eksctl's view of your clusters
eksctl get nodegroup --cluster demo
If a pod will not start, the diagnosis is identical to anywhere else — see how to fix Kubernetes CrashLoopBackOff.
Discover related concepts in Kubernetes Fundamentals: Pods, Deployments, Services
Scaling Nodes
Scaling pods is kubectl scale. Scaling the underlying EC2 capacity is an eksctl (or autoscaler) operation:
eksctl scale nodegroup --cluster demo --name <nodegroup> --nodes 4
For production, install the Cluster Autoscaler or Karpenter so node capacity follows demand automatically instead of being set by hand.
Uncover more details in Database Scaling: From 100K to 5M Users in 18 Months
Clean Up to Avoid a Surprise Bill
This is the step people forget. One command deletes everything eksctl created — control plane, node group, and the load balancer from your Service:
Journey deeper into this topic with The DevOps Stack I'd Pick If I Started Over in 2026
kubectl delete svc web # removes the ELB first
eksctl delete cluster --name demo --region us-east-1
LoadBalancer Service before deleting the cluster. An orphaned ELB created by Kubernetes can survive cluster deletion and keep billing. After cleanup, check the EC2 → Load Balancers console to confirm nothing lingers.Common Pitfalls
- Skipping cleanup. The number one EKS surprise is a forgotten cluster. Make
eksctl delete clustera habit. - Insufficient IAM permissions. eksctl needs broad rights to create CloudFormation, EKS, EC2, and IAM resources. A too-narrow policy fails mid-creation.
- One ELB per Service. Fine for demos, expensive at scale — move to Ingress.
- Region mismatch. Your
kubectlcontext,eksctlcommands, and AWS CLI must all target the same region.
If you already run CI/CD on AWS, the natural follow-on is wiring a pipeline to EKS — the same idea as the existing walkthrough on deploying Jenkins on EKS.
Are you running EKS, self-managed Kubernetes, or another managed service like GKE — and what drove the choice?
Enrich your learning with Troubleshooting common EC2 issues
References and Further Reading
- Amazon Web Services. Amazon EKS User Guide. AWS Documentation.
- Weaveworks & AWS. eksctl — The official CLI for Amazon EKS. eksctl Documentation.
- Amazon Web Services. Getting started with Amazon EKS – eksctl. AWS Documentation.
- Kubernetes Authors. Service of type LoadBalancer. Kubernetes Documentation.
Similar Articles
Related Content
More from cloud
Learn Kubernetes fundamentals hands-on: deploy your first pod, understand Deployments and …
A practical kubectl cheat sheet: 30+ essential commands for pods, deployments, services, logs, and …
You Might Also Like
No related topic suggestions found.
Knowledge Quiz
Test your general knowledge with this quick quiz!
A set of multiple-choice questions to test your knowledge.
Take as much time as you need.
Your score will be shown at the end.
Question 1 of 5
Quiz Complete!
Your score: 0 out of 5
Loading next question...

