{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreia7k64bywft5l65ri3ar25wnk2wt23vmjzdslhn2ou3fujy65hruy",
"uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mosiscsaeoo2"
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreict6nhnnpayoicviuqwo7yetyad3pf6z74dlgpudr45di7cgrbyhu"
},
"mimeType": "image/webp",
"size": 500362
},
"path": "/prokshita_nagarajan_16a4d/deploying-a-single-node-kubernetes-cluster-on-aws-ec2-with-k3s-25ma",
"publishedAt": "2026-06-21T13:38:52.000Z",
"site": "https://dev.to",
"tags": [
"aws",
"devops",
"kubernetes",
"tutorial"
],
"textContent": "Running a full Kubernetes cluster doesn't always mean spinning up multiple nodes. If you're prototyping, running a small production workload, or just want a lightweight environment to learn on, a **single EC2 instance** running Kubernetes is more than enough — and a lot cheaper.\n\nIn this post, I'll walk through the options for running Kubernetes on a single EC2 instance, why I went with **K3s** , and exactly how to get a working single-node cluster up in under five minutes.\n\n## Options for Running Kubernetes on EC2\n\nBefore picking a tool, it's worth knowing what's out there:\n\n1] **k3s** : Single node, lightweight.\n2] **MicroK8s** : Ubuntu-native, addons built-in.\n3] **Kubeadm** : Full control, standard k8s.\n4] **Kind/Minikube** : Local dev only, not for EC2 prod.\n\nEach has a place. `kubeadm` gives you the full vanilla Kubernetes experience and is the right call if you're planning to scale to multiple nodes later. `MicroK8s` is a solid choice if you're already in the Ubuntu/Canonical ecosystem and want snap-based add-ons. `Kind` and `Minikube` are built for local development and aren't meant for EC2 production use at all.\n\n## Why K3s\n\nSince the goal here was a **single EC2 instance** running a working cluster, K3s was the clear choice:\n\n * **Single command install** — literally one line, no multi-step bootstrap process\n * **Half the memory footprint** of full Kubernetes, so it runs comfortably on smaller instances\n * **Production-grade** — it's not a toy; K3s is used widely in real-world deployments, including edge and IoT environments\n * **Batteries included** — containerd, Flannel (CNI), Traefik (ingress), and CoreDNS all ship built-in, so there's nothing extra to install\n * **100% kubectl compatible** — every `kubectl` command, every manifest, every Helm chart works exactly the same as it would on a \"real\" cluster\n\n\n\n## Prerequisites\n\n 1. An AWS account\n 2. An EC2 instance with:\n * **AMI:** Ubuntu 22.04 LTS\n * **Instance type:** `t3.medium` (2 vCPU, 4GB RAM)\n * **Storage:** 20GB gp3\n\n\n\n## Step 1: Install K3s\n\nSSH into your EC2 instance and run:\n\n\n\n curl -sfL https://get.k3s.io | sh -\n\n\nThat's the entire installation. Behind the scenes, this single command:\n\n * Installs **containerd** as the container runtime\n * Installs the **control plane components** (API server, controller manager, scheduler)\n * Installs **Flannel** for pod networking\n * Installs **Traefik** as the ingress controller\n * Installs **CoreDNS** for cluster DNS\n * Configures the node to act as both **control plane and worker** , since this is a single-node setup\n * Registers itself as a **systemd service** , so it survives reboots\n\n\n\n## Step 2: Verify the Cluster\n\nCheck that the node is up and ready:\n\n\n\n sudo kubectl get nodes\n\n\nYou should see a single node in `Ready` state:\n\n\n\n NAME STATUS ROLES AGE VERSION\n ip-172-31-x-x Ready control-plane,master 1m v1.29.x+k3s1\n\n\nThat's it — you now have a fully functional, kubectl-compatible Kubernetes cluster running on a single EC2 instance, ready to take workloads.\n\n## What's Next\n\nFrom here, the cluster behaves like any other Kubernetes cluster: deploy with manifests, expose services via Traefik ingress, install Helm charts, or wire it into a CI/CD pipeline to pull and run container images from a registry like ECR.\n\nK3s strips away the operational overhead of running Kubernetes without compromising on compatibility — making it the simplest way to get a real cluster running on a single EC2 instance.",
"title": "Deploying a Single-Node Kubernetes Cluster on AWS EC2 with K3s"
}