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
  1. ProvisionTerraform · VPC · EC2
  2. Bootstrapkubeadm · control plane + workers
  3. Add-onsLoad balancer controller · DNS
  4. DeliverJenkins pipelines
  5. RouteALB · TLS · subdomains

At a glance

  • kubeadmNot a managed EKS control plane
  • 3 nodes1 control plane, 2 workers
  • 2Environments: dev and prod
  • GoalLearn Kubernetes without a managed control planeBuiltA kubeadm cluster, built from the ground up
    • Terraform
    • Kubernetes
    • Jenkins
    • AWS
  • ALB with TLS and subdomain routing.
  • Pros: lower cost. Cons: more maintenance.

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.