Launch a Kubernetes Cluster¶
| Category | System Design & Kubernetes |
| Status | ✅ Completed |
| Repo | nextwork-launch-a-kubernetes-cluster |
| Original NextWork guide | nextwork.ai |
Learning project
Practice work following a NextWork guide, separate from my production projects.
📚 NextWork learning project. This is a practice project I built while working through NextWork's Launch a Kubernetes Cluster guide. It is part of my Learning portfolio and is fully separate from my production projects.
Category: Learning › System Design & Kubernetes
Status: ✅ Completed
Overview¶
This is the first project of the Kubernetes x AWS series. The guide launches an EKS cluster with eksctl from an EC2 instance, watches CloudFormation build it, and grants console access through an IAM access entry. Here I mirrored the cluster shape (3 worker nodes) locally with kind, proved workloads survive a node failure, and kept the exact eksctl config for EKS.
Summary¶
I launched a real Amazon EKS cluster (eksctl, Kubernetes 1.37) with a 3-node managed node group (t3.small) and no NAT Gateway. For the secret mission I terminated a worker EC2 instance: the node group's Auto Scaling group added a replacement node within about 2 minutes and the app went back to 3/3 replicas. The cluster, node group and CloudFormation stacks were deleted right after.
The checks behind this are in docs/verification.txt.
Skills & tools¶
Kubernetes, Amazon EKS, eksctl, kind, kubectl, Node groups, CloudFormation (concepts), IAM access entries (concepts), Resilience testing
What I built¶
eksctl-cluster.yaml: a declarative version of the guide'seksctl create clustercommand (3 × t3.micro managed node group, Kubernetes 1.33).kind-cluster.yamlandensure-cluster.sh: a local 1 control-plane + 3 worker cluster namednextwork-eks-cluster.resilience-test.sh: the secret mission adapted for local use. It spreads a deployment across the workers, stops one node, and confirms Kubernetes reschedules the pods and the replica count recovers. (On EKS, the Auto Scaling group would replace the node itself.)
How to run¶
./ensure-cluster.sh # creates the local 4-node kind cluster
kubectl get nodes -o wide
./resilience-test.sh # stop a worker, then watch the pods reschedule
kind delete cluster --name nextwork-eks-cluster # cleanup
# On AWS (costs money): eksctl create cluster -f eksctl-cluster.yaml
Verification¶
I ran the verification command on 2026-12-02. The full output is in docs/verification.txt.
./ensure-cluster.sh && kubectl get nodes && ./resilience-test.sh
Real AWS deployment (2026-12-02)¶
I ran one short-lived Amazon EKS session (us-east-1) for the whole four-part Kubernetes x AWS series. I created the cluster once with eksctl, used it for all four parts, and deleted it right after. The ledger records it as a single entry. To keep costs down I didn't pin a version (eksctl picked Kubernetes 1.37, which is in standard support; versions in extended support cost 6x more for the control plane), disabled the NAT Gateway (nodes sit in public subnets), and used 3x t3.small nodes. I ran eksctl, kubectl, docker and the AWS CLI from my own Linux box, where the guide uses an EC2 instance as the control machine. The cluster config I used is in eksctl-cluster.yaml. The local kind setup is still here for free practice.
Evidence (excerpt; the full, sanitized transcript is in docs/aws-real-run.txt, with the account ID redacted):
=== REAL AWS RUN: one short-lived EKS session shared by the 4-part Kubernetes x AWS series, 2026-12-02, us-east-1 ===
(the cluster was created once, used for all four parts, then deleted; account ID redacted)
##### 1) launch-a-kubernetes-cluster: eksctl create cluster (21:07:41 CST)
$ eksctl create cluster -f eksctl-cluster.yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: nextwork-eks-cluster
region: us-east-1
tags: {Project: nextwork-launch-a-kubernetes-cluster}
vpc:
nat: {gateway: Disable} # no NAT Gateway (hourly fee): nodes live in public subnets
managedNodeGroups:
- name: nextwork-nodegroup
instanceType: t3.small # t3.micro only fits 4 pods per node on EKS
desiredCapacity: 3
tags: {Project: nextwork-launch-a-kubernetes-cluster}
2026-12-02 21:24:05 [ℹ] no tasks
2026-12-02 21:24:05 [✔] all EKS cluster resources for "nextwork-eks-cluster" have been created
2026-12-02 21:24:05 [ℹ] nodegroup "nextwork-nodegroup" has 3 node(s)
2026-12-02 21:24:05 [ℹ] node "ip-192-168-16-31.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] node "ip-192-168-4-158.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] node "ip-192-168-59-56.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] nodegroup "nextwork-nodegroup" has 3 node(s)
2026-12-02 21:24:05 [ℹ] node "ip-192-168-16-31.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] node "ip-192-168-4-158.ec2.internal" is ready
2026-12-02 21:24:05 [ℹ] node "ip-192-168-59-56.ec2.internal" is ready
2026-12-02 21:24:05 [✔] created 1 managed nodegroup(s) in cluster "nextwork-eks-cluster"
2026-12-02 21:24:05 [ℹ] creating addon: metrics-server
2026-12-02 21:24:06 [ℹ] successfully created addon: metrics-server
2026-12-02 21:24:07 [ℹ] kubectl command should work with "/tmp/eks-kubeconfig", try 'kubectl --kubeconfig=/tmp/eks-kubeconfig get nodes'
2026-12-02 21:24:07 [✔] EKS cluster "nextwork-eks-cluster" in "us-east-1" region is ready
$ kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
ip-192-168-16-31.ec2.internal Ready <none> 2m48s v1.37.1-eks-9adbfea 192.168.16.31 13.220.172.95 Amazon Linux 2023.12.20261118 6.18.62-127.179.amzn2023.x86_64 (amd64) containerd://2.3.7+unknown
ip-192-168-4-158.ec2.internal Ready <none> 2m16s v1.37.1-eks-9adbfea 192.168.4.158 18.210.12.119 Amazon Linux 2023.12.20261118 6.18.62-127.179.amzn2023.x86_64 (amd64) containerd://2.3.7+unknown
ip-192-168-59-56.ec2.internal Ready <none> 2m45s v1.37.1-eks-9adbfea 192.168.59.56 44.223.48.201 Amazon Linux 2023.12.20261118 6.18.62-127.179.amzn2023.x86_64 (amd64) containerd://2.3.7+unknown
$ aws eks describe-cluster
1.37 ACTIVE eks.9
##### Secret mission (launch-a-kubernetes-cluster): terminate a worker node and watch EKS heal (21:24:44 CST)
pods per node before:
1 ip-192-168-16-31.ec2.internal
1 ip-192-168-4-158.ec2.internal
1 ip-192-168-59-56.ec2.internal
$ aws ec2 terminate-instances --instance-ids i-054c31f9ef0eee407 (node ip-192-168-4-158.ec2.internal)
shutting-down
after (~120s): nodes
NAME STATUS ROLES AGE VERSION
ip-192-168-16-31.ec2.internal Ready <none> 6m6s v1.37.1-eks-9adbfea
ip-192-168-21-230.ec2.internal Ready <none> 111s v1.37.1-eks-9adbfea
ip-192-168-59-56.ec2.internal Ready <none> 6m3s v1.37.1-eks-9adbfea
deployment
NAME READY UP-TO-DATE AVAILABLE AGE
nextwork-flask-backend 3/3 3 3 3m
pods per node after:
2 ip-192-168-16-31.ec2.internal
1 ip-192-168-59-56.ec2.internal
Teardown¶
The EKS session ran from 21:07 to 21:39 CST on 2026-12-02. eksctl delete cluster --wait removed the node group, the cluster and their CloudFormation stacks (VPC included), and the ECR repository was force-deleted with its images:
##### TEARDOWN (21:27:28 CST)
deployment.apps "nextwork-flask-backend" deleted
service "nextwork-flask-backend" deleted
$ eksctl delete cluster --name nextwork-eks-cluster --region us-east-1 --wait
2026-12-02 21:27:31 [✔] kubeconfig has been updated
2026-12-02 21:27:31 [ℹ] cleaning up AWS load balancers created by Kubernetes objects of Kind Service, Ingress, or Gateway
2026-12-02 21:27:32 [ℹ]
2 sequential tasks: { delete nodegroup "nextwork-nodegroup", delete cluster control plane "nextwork-eks-cluster"
}
2026-12-02 21:27:32 [ℹ] will delete stack "eksctl-nextwork-eks-cluster-nodegroup-nextwork-nodegroup"
2026-12-02 21:36:36 [ℹ] will delete stack "eksctl-nextwork-eks-cluster-cluster"
2026-12-02 21:38:58 [✔] all cluster resources were deleted
$ aws ecr delete-repository --repository-name nextwork-flask-backend --force
nextwork-flask-backend
$ verify: eks clusters / cfn stacks / ecr repos / tagged instances (should be empty)
##### teardown verified (21:39:07 CST)
Cost¶
Estimated cost of the whole EKS session, shared by the four projects: about $0.20 (a conservative estimate) (EKS control plane $0.10/hr, 3x t3.small at about $0.02/hr each, EBS and public IPv4 for well under an hour; ECR storage for minutes). The account has a $50/month budget with email alerts at $5, $20 and $40, and the whole AWS series is logged in a private spend ledger.
Original project: https://nextwork.ai/projects/aa8525df-82a0-5697-8721-a03b2db2c635 · Part of my NextWork Learning portfolio (hub).
Verification output¶
From docs/verification.txt:
$ ./ensure-cluster.sh && kubectl get nodes && ./resilience-test.sh
NAME STATUS ROLES AGE VERSION
nextwork-eks-cluster-control-plane Ready control-plane 73s v1.31.2
nextwork-eks-cluster-worker Ready <none> 61s v1.31.2
nextwork-eks-cluster-worker2 Ready <none> 61s v1.31.2
nextwork-eks-cluster-worker3 Ready <none> 61s v1.31.2
node/nextwork-eks-cluster-control-plane condition met
node/nextwork-eks-cluster-worker condition met
node/nextwork-eks-cluster-worker2 condition met
node/nextwork-eks-cluster-worker3 condition met
deployment.apps/resilience-demo created
Waiting for deployment "resilience-demo" rollout to finish: 0 out of 6 new replicas have been updated...
Waiting for deployment "resilience-demo" rollout to finish: 0 of 6 updated replicas are available...
Waiting for deployment "resilience-demo" rollout to finish: 1 of 6 updated replicas are available...
Waiting for deployment "resilience-demo" rollout to finish: 2 of 6 updated replicas are available...
Waiting for deployment "resilience-demo" rollout to finish: 3 of 6 updated replicas are available...
Waiting for deployment "resilience-demo" rollout to finish: 5 of 6 updated replicas are available...
deployment "resilience-demo" successfully rolled out
Pods per node before:
2 nextwork-eks-cluster-worker
2 nextwork-eks-cluster-worker2
2 nextwork-eks-cluster-worker3
Stopping node nextwork-eks-cluster-worker ...
Node status: NotReady
Waiting for deployment "resilience-demo" rollout to finish: 4 of 6 updated replicas are available...
Waiting for deployment "resilience-demo" rollout to finish: 5 of 6 updated replicas are available...
deployment "resilience-demo" successfully rolled out
Pods per node after:
3 nextwork-eks-cluster-worker2
3 nextwork-eks-cluster-worker3
PASS: 6/6 replicas running on surviving nodes; nextwork-eks-cluster-worker after restart: Ready
Set kubectl context to "kind-nextwork-eks-cluster"
[exit code 0]