
Kubernetes on EC2
Built from the ground up.
A self-managed Kubernetes cluster on EC2, provisioned with Terraform and delivered through Jenkins, instead of a managed EKS control plane.
- Dates
- March–May 2025
- Built with
- kubeadm
- AWS EC2
- Terraform
- Jenkins
- ALB
- TLS
- ProvisionTerraform · VPC · EC2
- Bootstrapkubeadm · control plane + workers
- Add-onsLoad balancer controller · DNS
- DeliverJenkins pipelines
- RouteALB · TLS · subdomains
The story
The goal
I wanted to learn Kubernetes from the ground up instead of relying on a managed EKS control plane, and to find out the real trade-offs of running it myself.
What I built
I provisioned the network and EC2 instances with Terraform, bootstrapped the control plane and workers with kubeadm, and set up Jenkins pipelines that deploy to development and production. An AWS Load Balancer Controller provisions an ALB with TLS termination and subdomain routing.
Running something real
To run something real on it, I built a separate internal tool, a ticket board with a Rails API and a Next.js frontend, and shipped it through the same pipelines.
Trade-offs
The trade-offs were clear. Pros: it cost less than a managed control plane. Cons: upgrades, node joins and add-ons became my maintenance, and with a single control-plane node the cluster had no high availability. I knew that going in and accepted it as a measured risk for a learning cluster.
The code is private. I'm happy to walk through it.
