<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: prokshita nagarajan</title>
    <description>The latest articles on DEV Community by prokshita nagarajan (@prokshita_nagarajan_16a4d).</description>
    <link>https://dev.to/prokshita_nagarajan_16a4d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3898901%2Fd352a09a-0a6c-48ee-95d5-ea99e63a43be.png</url>
      <title>DEV Community: prokshita nagarajan</title>
      <link>https://dev.to/prokshita_nagarajan_16a4d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prokshita_nagarajan_16a4d"/>
    <language>en</language>
    <item>
      <title>Deploying a Single-Node Kubernetes Cluster on AWS EC2 with K3s</title>
      <dc:creator>prokshita nagarajan</dc:creator>
      <pubDate>Sun, 21 Jun 2026 13:38:52 +0000</pubDate>
      <link>https://dev.to/prokshita_nagarajan_16a4d/deploying-a-single-node-kubernetes-cluster-on-aws-ec2-with-k3s-25ma</link>
      <guid>https://dev.to/prokshita_nagarajan_16a4d/deploying-a-single-node-kubernetes-cluster-on-aws-ec2-with-k3s-25ma</guid>
      <description>&lt;p&gt;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 &lt;strong&gt;single EC2 instance&lt;/strong&gt; running Kubernetes is more than enough — and a lot cheaper.&lt;/p&gt;

&lt;p&gt;In this post, I'll walk through the options for running Kubernetes on a single EC2 instance, why I went with &lt;strong&gt;K3s&lt;/strong&gt;, and exactly how to get a working single-node cluster up in under five minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Options for Running Kubernetes on EC2
&lt;/h2&gt;

&lt;p&gt;Before picking a tool, it's worth knowing what's out there:&lt;/p&gt;

&lt;p&gt;1] &lt;strong&gt;k3s&lt;/strong&gt;           : Single node, lightweight.&lt;br&gt;
 2] &lt;strong&gt;MicroK8s&lt;/strong&gt;     : Ubuntu-native, addons built-in.&lt;br&gt;
 3] &lt;strong&gt;Kubeadm&lt;/strong&gt;       : Full control, standard k8s.&lt;br&gt;
 4] &lt;strong&gt;Kind/Minikube&lt;/strong&gt; : Local dev only, not for EC2 prod.&lt;/p&gt;

&lt;p&gt;Each has a place. &lt;code&gt;kubeadm&lt;/code&gt; gives you the full vanilla Kubernetes experience and is the right call if you're planning to scale to multiple nodes later. &lt;code&gt;MicroK8s&lt;/code&gt; is a solid choice if you're already in the Ubuntu/Canonical ecosystem and want snap-based add-ons. &lt;code&gt;Kind&lt;/code&gt; and &lt;code&gt;Minikube&lt;/code&gt; are built for local development and aren't meant for EC2 production use at all.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why K3s
&lt;/h2&gt;

&lt;p&gt;Since the goal here was a &lt;strong&gt;single EC2 instance&lt;/strong&gt; running a working cluster, K3s was the clear choice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Single command install&lt;/strong&gt; — literally one line, no multi-step bootstrap process&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Half the memory footprint&lt;/strong&gt; of full Kubernetes, so it runs comfortably on smaller instances&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Production-grade&lt;/strong&gt; — it's not a toy; K3s is used widely in real-world deployments, including edge and IoT environments&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batteries included&lt;/strong&gt; — containerd, Flannel (CNI), Traefik (ingress), and CoreDNS all ship built-in, so there's nothing extra to install&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;100% kubectl compatible&lt;/strong&gt; — every &lt;code&gt;kubectl&lt;/code&gt; command, every manifest, every Helm chart works exactly the same as it would on a "real" cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;An AWS account&lt;/li&gt;
&lt;li&gt;An EC2 instance with:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AMI:&lt;/strong&gt; Ubuntu 22.04 LTS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instance type:&lt;/strong&gt; &lt;code&gt;t3.medium&lt;/code&gt; (2 vCPU, 4GB RAM)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; 20GB gp3&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Step 1: Install K3s
&lt;/h2&gt;

&lt;p&gt;SSH into your EC2 instance and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-sfL&lt;/span&gt; https://get.k3s.io | sh -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the entire installation. Behind the scenes, this single command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installs &lt;strong&gt;containerd&lt;/strong&gt; as the container runtime&lt;/li&gt;
&lt;li&gt;Installs the &lt;strong&gt;control plane components&lt;/strong&gt; (API server, controller manager, scheduler)&lt;/li&gt;
&lt;li&gt;Installs &lt;strong&gt;Flannel&lt;/strong&gt; for pod networking&lt;/li&gt;
&lt;li&gt;Installs &lt;strong&gt;Traefik&lt;/strong&gt; as the ingress controller&lt;/li&gt;
&lt;li&gt;Installs &lt;strong&gt;CoreDNS&lt;/strong&gt; for cluster DNS&lt;/li&gt;
&lt;li&gt;Configures the node to act as both &lt;strong&gt;control plane and worker&lt;/strong&gt;, since this is a single-node setup&lt;/li&gt;
&lt;li&gt;Registers itself as a &lt;strong&gt;systemd service&lt;/strong&gt;, so it survives reboots&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 2: Verify the Cluster
&lt;/h2&gt;

&lt;p&gt;Check that the node is up and ready:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;kubectl get nodes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a single node in &lt;code&gt;Ready&lt;/code&gt; state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;NAME              STATUS   ROLES                  AGE   VERSION
ip-172-31-x-x     Ready    control-plane,master   1m    v1.29.x+k3s1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it — you now have a fully functional, kubectl-compatible Kubernetes cluster running on a single EC2 instance, ready to take workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;From 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.&lt;/p&gt;

&lt;p&gt;K3s 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.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>kubernetes</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
