<?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: Phu Hoang</title>
    <description>The latest articles on DEV Community by Phu Hoang (@posibble).</description>
    <link>https://dev.to/posibble</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%2F2579967%2Faa0ef91a-55fd-462a-a1df-51add78ebff9.jpg</url>
      <title>DEV Community: Phu Hoang</title>
      <link>https://dev.to/posibble</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/posibble"/>
    <language>en</language>
    <item>
      <title>Jenkins Fundamentals - Part 2: Installing Jenkins Controller on AWS EC2</title>
      <dc:creator>Phu Hoang</dc:creator>
      <pubDate>Fri, 13 Nov 2026 11:30:40 +0000</pubDate>
      <link>https://dev.to/posibble/jenkins-fundamentals-part-2-installing-jenkins-controller-on-aws-ec2-1cg9</link>
      <guid>https://dev.to/posibble/jenkins-fundamentals-part-2-installing-jenkins-controller-on-aws-ec2-1cg9</guid>
      <description>&lt;p&gt;In Part 1 — Jenkins Fundamentals: What Are We Actually Operating?, we built the mental model for Jenkins: the Controller receives a build request, the Queue holds work waiting for execution capacity, an Executor provides a slot to run the workload, and a Workspace becomes the build's working directory.&lt;/p&gt;

&lt;p&gt;Now we are going to make that model concrete.&lt;/p&gt;

&lt;p&gt;In Part 2, we will launch a single Amazon EC2 instance, install a Jenkins Controller manually, complete the initial setup, and run our first Pipeline directly on the Controller. This is intentionally the simplest architecture in the series: easy to understand, easy to inspect, and deliberately not our production target.&lt;/p&gt;

&lt;p&gt;By the end of the lab, the concepts introduced in Part 1 should no longer feel abstract. You will be able to identify the Jenkins process, &lt;code&gt;JENKINS_HOME&lt;/code&gt;, the built-in node, its Executor, a real Workspace, Console Output, and an archived Artifact.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. What We Are Building
&lt;/h2&gt;

&lt;p&gt;For our first real Jenkins environment, we will use a single EC2 instance:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0ogdnoytwv77a9yydnr9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0ogdnoytwv77a9yydnr9.png" alt="jenkins_ec2" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Jenkins Controller and the first build workload will share the same machine.&lt;/p&gt;

&lt;p&gt;That is an important detail. It makes the lab simple because there is only one host to understand, but it also means the control plane and build workload compete for the same CPU, memory, disk, and failure domain.&lt;/p&gt;

&lt;p&gt;We will keep that limitation on purpose. In Part 3 — Adding Static Jenkins Agents on AWS EC2, we will move build execution onto a separate EC2 Agent and compare the two models directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lab choices
&lt;/h3&gt;

&lt;p&gt;For this article, we will use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Operating system:&lt;/strong&gt; Ubuntu Server 24.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, 4 GiB memory)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; 20 GiB gp3 EBS root volume&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jenkins:&lt;/strong&gt; Jenkins LTS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Java:&lt;/strong&gt; OpenJDK 21&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access:&lt;/strong&gt; SSH for administration and TCP/8080 from your own public IP for the Jenkins UI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A smaller instance may work for a very small lab, but Jenkins plugin installation and builds can consume noticeable memory. Using 4 GiB gives us enough room to observe Jenkins without immediately turning memory pressure into the main lesson.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Provision the EC2 Baseline
&lt;/h2&gt;

&lt;p&gt;We will assume you are already comfortable launching and connecting to EC2, so we will keep the infrastructure setup intentionally brief.&lt;/p&gt;

&lt;p&gt;Create an EC2 instance named &lt;code&gt;jenkins-controller-lab&lt;/code&gt; using &lt;strong&gt;Ubuntu Server 24.04 LTS&lt;/strong&gt;, a &lt;strong&gt;&lt;code&gt;t3.medium&lt;/code&gt;&lt;/strong&gt; instance, and a &lt;strong&gt;20 GiB gp3&lt;/strong&gt; root volume. Place it in a subnet with outbound Internet access so the host can download Ubuntu packages and Jenkins plugins.&lt;/p&gt;

&lt;p&gt;For this learning environment, allow &lt;strong&gt;SSH/22&lt;/strong&gt; and &lt;strong&gt;TCP/8080&lt;/strong&gt; only from your own public IP. Jenkins itself does not need AWS API permissions for this article, so avoid attaching broad IAM policies such as &lt;code&gt;AdministratorAccess&lt;/code&gt;. If you prefer Session Manager instead of SSH, attach only the instance profile permissions required for Systems Manager.&lt;/p&gt;

&lt;p&gt;At this stage, both the operating system and &lt;code&gt;JENKINS_HOME&lt;/code&gt; will live on the root EBS volume. We will intentionally keep the design simple now and separate Jenkins state from compute later in the series.&lt;/p&gt;

&lt;p&gt;Once the instance is healthy, connect to it using SSH or Session Manager and continue with the Jenkins installation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9v8ryaibtwcactqltgkf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9v8ryaibtwcactqltgkf.png" alt="instance_summary" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Install Java 21
&lt;/h2&gt;

&lt;p&gt;Jenkins runs on the JVM, so Java is the first runtime dependency we need.&lt;/p&gt;

&lt;p&gt;Update the package index and install OpenJDK 21:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt update

sudo apt install -y fontconfig openjdk-21-jre
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the runtime:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;java -version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see Java 21 in the output.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe908pdoxnhgn0j4h5iuh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe908pdoxnhgn0j4h5iuh.png" alt="java_version" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why install Java before Jenkins? Because the Jenkins service needs a supported Java runtime when it starts. Installing the runtime first also makes failures easier to reason about: we can validate Java independently before adding Jenkins.&lt;/p&gt;

&lt;p&gt;ℹ️&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Version note:&lt;/strong&gt; this lab uses Java 21 with Jenkins LTS. Jenkins also supports newer Java releases for supported Jenkins versions, but Java 21 keeps the lab simple and broadly compatible. If you are reading this article much later, check the Jenkins Java Support Policy before installing.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Install Jenkins LTS
&lt;/h2&gt;

&lt;p&gt;For the series, we will use the Jenkins &lt;strong&gt;Long-Term Support (LTS)&lt;/strong&gt; release rather than the weekly release.&lt;/p&gt;

&lt;p&gt;Add the Jenkins stable package signing key and repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2026.key

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc]"&lt;/span&gt; \
  https://pkg.jenkins.io/debian-stable binary/ &lt;span class="o"&gt;|&lt;/span&gt; sudo tee \
  /etc/apt/sources.list.d/jenkins.list &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Update the package index and install Jenkins:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo apt update
sudo apt install -y jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The package creates a &lt;code&gt;jenkins&lt;/code&gt; system user and installs Jenkins as a &lt;code&gt;systemd&lt;/code&gt; service.&lt;/p&gt;

&lt;p&gt;Enable Jenkins at boot and start it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; jenkins
sudo systemctl start jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl status jenkins --no-pager
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg4u32rbe42uartkauici.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg4u32rbe42uartkauici.png" alt="jenkins_service" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You are looking for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Active: active (running)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also confirm that Jenkins is listening on port 8080:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo ss -lntp &lt;span class="o"&gt;|&lt;/span&gt; grep 8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And inspect recent service logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo journalctl -u jenkins --no-pager -n 50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, we can connect the installation back to Part 1: the Jenkins Controller is now a real Java process running as a Linux service on our EC2 instance.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Unlock Jenkins and Complete the Initial Setup
&lt;/h2&gt;

&lt;p&gt;Open the following address in your browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://&amp;lt;EC2_PUBLIC_IP&amp;gt;:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the Security Group is correct and Jenkins is running, you should see the &lt;strong&gt;Unlock Jenkins&lt;/strong&gt; page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tun1muw6fmkw189a0xl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tun1muw6fmkw189a0xl.png" alt="unlock_jenkins" width="800" height="879"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Jenkins creates a one-time administrator password during the initial startup. Retrieve it from the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo cat /var/lib/jenkins/secrets/initialAdminPassword
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the value into the browser.&lt;/p&gt;

&lt;h3&gt;
  
  
  Plugin installation
&lt;/h3&gt;

&lt;p&gt;For this learning environment, choose &lt;strong&gt;Install suggested plugins&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc05cxgd3uncn2ahbcs7m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc05cxgd3uncn2ahbcs7m.png" alt="plugin_install" width="800" height="873"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The purpose of Part 2 is to understand the Jenkins runtime and execution model, not to design plugin governance yet. Suggested plugins give us the common Pipeline capabilities needed for the lab without turning the article into a plugin-selection exercise.&lt;/p&gt;

&lt;p&gt;In production, plugin installation should be much more deliberate. Plugin versions, dependencies, upgrades, rollback, and Configuration as Code will appear later in the series.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create the first administrator
&lt;/h3&gt;

&lt;p&gt;Create the first Jenkins administrator account and finish the setup wizard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd1693i9j9g00llwbo11g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd1693i9j9g00llwbo11g.png" alt="create_first_admin" width="800" height="889"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the Jenkins dashboard appears, stop for a moment. We now have a usable Controller, but before creating a job, let us inspect what the installer actually created.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Find JENKINS_HOME on the Server
&lt;/h2&gt;

&lt;p&gt;In Part 1, &lt;code&gt;JENKINS_HOME&lt;/code&gt; was an architectural concept. Now we can see it.&lt;/p&gt;

&lt;p&gt;For this package-based Ubuntu installation, the default location is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/lib/jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo ls -lah /var/lib/jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will see directories and files related to Jenkins configuration and runtime state. The exact contents evolve as plugins are installed and jobs are created, but this directory is the persistent state boundary introduced in Part 1.&lt;/p&gt;

&lt;p&gt;Check its current size:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo du -sh /var/lib/jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also inspect the service definition:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl cat jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And confirm which user owns the Jenkins process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ps -ef &lt;span class="o"&gt;|&lt;/span&gt; grep &lt;span class="s1"&gt;'[j]enkins'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the Jenkins process restarts, or the EC2 instance reboots while the EBS volume remains intact, &lt;code&gt;JENKINS_HOME&lt;/code&gt; remains available. If the storage containing this directory is lost without a backup, the Jenkins state on it is lost as well.&lt;/p&gt;

&lt;p&gt;That is why storage and recovery become first-class design decisions once we move beyond this lab.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Understand the Built-In Node
&lt;/h2&gt;

&lt;p&gt;Go to: &lt;strong&gt;Manage Jenkins -&amp;gt; Nodes&lt;/strong&gt;. You should see the Jenkins built-in node.&lt;/p&gt;

&lt;p&gt;For this first lab, the Controller is also providing execution capacity. In other words:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwu17980i88cevbyv0gye.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwu17980i88cevbyv0gye.png" alt="built_in_node" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the simplest possible Jenkins architecture.&lt;/p&gt;

&lt;p&gt;It is also the exact situation we warned about in Part 1: control-plane work and build work share the same compute resources.&lt;/p&gt;

&lt;p&gt;We are going to use it once because it makes the execution model easy to observe. In Part 3, we will deliberately move builds away from the Controller.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Create Our First Pipeline
&lt;/h2&gt;

&lt;p&gt;Let us reuse the small "Hello, World!" Pipeline from Part 1.&lt;/p&gt;

&lt;p&gt;From the Jenkins dashboard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Choose &lt;strong&gt;New Item&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter the name &lt;code&gt;hello-jenkins&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Pipeline&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;OK&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scroll to the &lt;strong&gt;Pipeline&lt;/strong&gt; section.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Pipeline script&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Paste the following Jenkinsfile.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight groovy"&gt;&lt;code&gt;&lt;span class="n"&gt;pipeline&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="n"&gt;any&lt;/span&gt;

    &lt;span class="n"&gt;stages&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Build'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;steps&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="s1"&gt;'echo "building..."'&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="nf"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Test'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;steps&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="s1"&gt;'echo "testing..."'&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="nf"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Package'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;steps&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="s1"&gt;'echo "hello Jenkins" &amp;gt; artifact.txt'&lt;/span&gt;
                &lt;span class="n"&gt;archiveArtifacts&lt;/span&gt; &lt;span class="n"&gt;artifacts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'artifact.txt'&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save the job and choose &lt;strong&gt;Build Now&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fde1bld7ponxbcorv3su4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fde1bld7ponxbcorv3su4.png" alt="build_status" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the point where the diagram from Part 1 becomes a running system.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. Observe the Pipeline Lifecycle
&lt;/h2&gt;

&lt;p&gt;Do not look only at the final green check mark. The purpose of this lab is to inspect what Jenkins does along the way.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.1 Build request and Queue
&lt;/h3&gt;

&lt;p&gt;When you choose &lt;strong&gt;Build Now&lt;/strong&gt;, the Controller creates a build request.&lt;/p&gt;

&lt;p&gt;If an Executor is immediately available, the Queue stage may be so short that you barely notice it. That does not mean the Queue was irrelevant; it simply means demand was matched with execution capacity immediately.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu2prki8b1u1qb4zm9uu8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu2prki8b1u1qb4zm9uu8.png" alt="build_request" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  9.2 Executor
&lt;/h3&gt;

&lt;p&gt;Watch &lt;strong&gt;Build Executor Status&lt;/strong&gt; on the Jenkins UI while the job is running.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flgwfbdouuzcmexgfdhdl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flgwfbdouuzcmexgfdhdl.png" alt="build_executor_status" width="800" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The build is assigned to one of the Executors on the built-in node. That Executor is the execution slot described in Part 1.&lt;/p&gt;

&lt;p&gt;The EC2 instance is the machine. The built-in node represents Jenkins' view of the execution environment. The Executor is the slot that runs this particular workload.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.3 Console Output
&lt;/h3&gt;

&lt;p&gt;Open the running build and select &lt;strong&gt;Console Output&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You should see output corresponding to the Pipeline stages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;building...
testing...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will also see Jenkins Pipeline bookkeeping around those commands.&lt;/p&gt;

&lt;p&gt;The distinction matters: the Controller orchestrates the Pipeline, while the &lt;code&gt;sh&lt;/code&gt; steps are workload execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.4 Workspace
&lt;/h3&gt;

&lt;p&gt;While the build is running, or after it finishes, inspect the Workspace from the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo ls -lah /var/lib/jenkins/workspace/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a directory for the job, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/lib/jenkins/workspace/hello-jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inspect it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo ls -lah /var/lib/jenkins/workspace/hello-jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The file created by the Package stage should appear in the Workspace: &lt;code&gt;artifact.txt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fly8dne4ct4999djjq97i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fly8dne4ct4999djjq97i.png" alt="artifact_in_workspace" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is exactly why the Workspace is not the same thing as Jenkins state. It is a working directory for the build.&lt;/p&gt;

&lt;h3&gt;
  
  
  9.5 Archived Artifact
&lt;/h3&gt;

&lt;p&gt;Return to the completed build in the Jenkins UI.&lt;/p&gt;

&lt;p&gt;Because the Pipeline contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight groovy"&gt;&lt;code&gt;&lt;span class="n"&gt;archiveArtifacts&lt;/span&gt; &lt;span class="n"&gt;artifacts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'artifact.txt'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Jenkins records the file as an archived Artifact.&lt;/p&gt;

&lt;p&gt;The same file therefore participates in two different lifecycles:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5ml0pl6jj5p37ayzov2w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5ml0pl6jj5p37ayzov2w.png" alt="artifact_lifecycles" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That difference becomes critical once Agents become disposable.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Restart Jenkins and Verify Persistence
&lt;/h2&gt;

&lt;p&gt;We have already said that Jenkins is stateful. Let us verify it.&lt;/p&gt;

&lt;p&gt;Restart the Jenkins service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl restart jenkins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wait a few seconds and check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl status jenkins --no-pager
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Refresh the browser.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;hello-jenkins&lt;/code&gt; job and its build history should still exist because they are stored under &lt;code&gt;JENKINS_HOME&lt;/code&gt; on persistent EBS storage.&lt;/p&gt;

&lt;p&gt;This is a small experiment, but it demonstrates the difference between &lt;strong&gt;process lifetime&lt;/strong&gt; and &lt;strong&gt;state lifetime&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5fh72x443s313amnlhes.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5fh72x443s313amnlhes.png" alt="process_and_state" width="800" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Restarting a process is not the same as rebuilding Jenkins from nothing.&lt;/p&gt;

&lt;p&gt;At the same time, EBS persistence alone is not a backup or a disaster-recovery strategy. We will treat those separately later in the series.&lt;/p&gt;




&lt;h2&gt;
  
  
  11. Verify What You Built
&lt;/h2&gt;

&lt;p&gt;Before moving on, make sure you can verify the core concepts from your own environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ]  Jenkins is running as a &lt;code&gt;systemd&lt;/code&gt; service with Java 21.&lt;/li&gt;
&lt;li&gt;[ ]  You can locate &lt;code&gt;JENKINS_HOME&lt;/code&gt; at &lt;code&gt;/var/lib/jenkins&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;[ ]  The Pipeline runs on the built-in node through an Executor.&lt;/li&gt;
&lt;li&gt;[ ]  You can locate the &lt;code&gt;hello-jenkins&lt;/code&gt; Workspace and &lt;code&gt;artifact.txt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;[ ]  The archived Artifact is visible in the Jenkins UI.&lt;/li&gt;
&lt;li&gt;[ ]  The job and build history survive a Jenkins service restart.&lt;/li&gt;
&lt;li&gt;[ ]  You can explain why running builds on the Controller is only a temporary learning design.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you can verify these points, the mental model from Part 1 is now connected to a real Jenkins installation.&lt;/p&gt;




&lt;h2&gt;
  
  
  12. Cost and Cleanup
&lt;/h2&gt;

&lt;p&gt;This lab incurs normal EC2 and EBS charges while the resources exist.&lt;/p&gt;

&lt;p&gt;If you plan to continue directly to Part 3, keep the Jenkins Controller because we will reuse it and attach a separate static EC2 Agent.&lt;/p&gt;

&lt;p&gt;If you are pausing the series, you can stop the EC2 instance to stop compute charges, but the EBS volume continues to incur storage charges.&lt;/p&gt;

&lt;p&gt;If you no longer need the lab at all, terminate the instance and confirm whether the root EBS volume is configured to be deleted on termination.&lt;/p&gt;

&lt;p&gt;Do not delete the environment if you intend to continue to Part 3.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Jenkins is now a real Linux service.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;The Controller runs as a Java process managed by &lt;code&gt;systemd&lt;/code&gt; on an EC2 instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Jenkins state in &lt;code&gt;JENKINS_HOME&lt;/code&gt; is persistent.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;In this baseline, &lt;code&gt;/var/lib/jenkins&lt;/code&gt; lives on EBS, so Jenkins state survives a service restart or instance reboot as long as the volume remains intact. Persistence, however, is not the same as backup or disaster recovery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The Pipeline lifecycle from Part 1 is now observable.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;A build moves through the Controller, Queue, Executor allocation, Workspace execution, Console Output, and Artifact handling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. The built-in node couples orchestration and build execution.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;The Controller and build workload share CPU, memory, disk, and the same failure domain. A problematic build can therefore affect the Controller itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Direct port 8080 access and manual installation are learning shortcuts.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;They make the platform easy to inspect, but they are not the ingress, security, or automation model we ultimately want for production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. The all-in-one EC2 architecture is a baseline, not a mistake.&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Its purpose is to expose the limitations that justify the next step: moving build execution away from the Controller and onto Jenkins Agents.&lt;/p&gt;




&lt;h2&gt;
  
  
  Next: Part 3 — Adding Static Jenkins Agents on AWS EC2
&lt;/h2&gt;

&lt;p&gt;We now have a working Jenkins Controller, but it is still executing the build workload itself. In &lt;strong&gt;Part 3 — Adding Static Jenkins Agents on AWS EC2&lt;/strong&gt;, we will launch a second EC2 instance, connect it as a static Jenkins Agent, and use labels and Executors to move Pipeline execution away from the Controller.&lt;/p&gt;

&lt;p&gt;That separation will let the Controller focus on orchestration while build workloads run on independently managed compute—the first meaningful step from a learning installation toward a scalable Jenkins platform.&lt;/p&gt;




&lt;h2&gt;
  
  
  References and Version Notes
&lt;/h2&gt;

&lt;p&gt;This lab follows the Jenkins project's current Linux installation guidance and Java support policy. The commands shown here use the Jenkins stable Debian repository and Java 21.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.jenkins.io/doc/book/installing/linux/" rel="noopener noreferrer"&gt;Jenkins - Installing on Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.jenkins.io/doc/book/platform-information/support-policy-java/" rel="noopener noreferrer"&gt;Jenkins - Java Support Policy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.jenkins.io/doc/book/managing/nodes/" rel="noopener noreferrer"&gt;Jenkins - Managing Nodes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are following the series long after publication, verify the supported Java version and Jenkins repository signing key against the current Jenkins documentation before installing.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>jenkins</category>
      <category>cicd</category>
    </item>
    <item>
      <title>Jenkins Fundamentals - Part 1: What Are We Actually Operating?</title>
      <dc:creator>Phu Hoang</dc:creator>
      <pubDate>Sat, 07 Nov 2026 17:47:23 +0000</pubDate>
      <link>https://dev.to/posibble/jenkins-fundamentals-part-1-what-are-we-actually-operating-2fb9</link>
      <guid>https://dev.to/posibble/jenkins-fundamentals-part-1-what-are-we-actually-operating-2fb9</guid>
      <description>&lt;p&gt;When someone first learns Jenkins, the workflow often looks deceptively simple: a developer pushes code, Jenkins runs, and the build either succeeds or fails.&lt;/p&gt;

&lt;p&gt;That view is useful at the beginning, but it hides most of the concepts that matter once Jenkins becomes part of a real engineering platform. Between the moment Jenkins receives a build request and the moment a build command actually starts running, several components are involved: the Controller, Queue, execution node, Executor, Workspace, and persistent Jenkins state.&lt;/p&gt;

&lt;p&gt;Before we install Jenkins on AWS, add build workers, introduce ephemeral agents, or discuss production architecture, we first need a precise mental model of what is actually happening inside Jenkins.&lt;/p&gt;

&lt;p&gt;That is the goal of this article.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Jenkins Is More Than a Build Server
&lt;/h2&gt;

&lt;p&gt;At a high level, Jenkins is an automation server that orchestrates CI/CD workloads. A more useful way to think about it, however, is to separate Jenkins into two responsibilities: &lt;strong&gt;control and orchestration&lt;/strong&gt;, and &lt;strong&gt;workload execution&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The Jenkins Controller is responsible for coordinating the system. The execution environment is responsible for running the actual build commands.&lt;/p&gt;

&lt;p&gt;A simplified Jenkins environment can be visualized like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo13njy64cuwd1e12rbmb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo13njy64cuwd1e12rbmb.png" alt="jenkins_fundamentals__simplest" width="496" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In a small installation, the Controller itself may also act as the execution node. That is convenient for learning because everything runs on one machine, but it also mixes orchestration and build workloads together.&lt;/p&gt;

&lt;p&gt;Later in the series, we will separate those responsibilities. For now, the important thing is to understand the building blocks.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Jenkins Controller
&lt;/h2&gt;

&lt;p&gt;The Jenkins Controller is the central coordination point of a Jenkins environment. It serves the Jenkins Web UI and API, receives build triggers, maintains the Queue, schedules workloads, coordinates Pipeline execution, manages Agents, and stores Jenkins configuration and build metadata.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Controller decides &lt;strong&gt;what should run, when it should run, and where it should run&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That does not mean the Controller has to perform the actual compilation, testing, scanning, packaging, or deployment itself. Those workloads can be delegated to Jenkins Agents.&lt;/p&gt;

&lt;p&gt;This separation between orchestration and execution is one of the most important architectural ideas in Jenkins. It allows the platform to evolve from a simple all-in-one installation into a distributed system without changing the fundamental execution model.&lt;/p&gt;

&lt;p&gt;For example, the architecture may evolve in several steps.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We may begin with the Controller and build workloads sharing a single EC2 instance:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzw95q9x7mmpax3x72pqh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzw95q9x7mmpax3x72pqh.png" alt="jenkins_fundamentals__example_being" width="407" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Then move to a dedicated Controller with multiple static EC2 Agents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fef4k7aafcjdje4rowddw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fef4k7aafcjdje4rowddw.png" alt="jenkins_fundamentals-example_multi_agents" width="610" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Later, we can replace static workers with ephemeral Agents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvf9bwvw0w64rx6samxzi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvf9bwvw0w64rx6samxzi.png" alt="jenkins_fundamentals__example_ephemeral_agents" width="751" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The infrastructure changes, but the Controller remains responsible for orchestration.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Jenkins Agent
&lt;/h2&gt;

&lt;p&gt;A Jenkins Agent is an execution environment that performs work assigned by the Controller. This is where commands such as compilation, testing, security scanning, packaging, or deployment usually take place.&lt;/p&gt;

&lt;p&gt;Depending on the pipeline, an Agent might run commands such as:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8ylvqtl574z8kzjamuub.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8ylvqtl574z8kzjamuub.png" alt="command" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An Agent can be implemented in many ways. It may be a long-running EC2 instance, a virtual machine in another cloud, a Kubernetes Pod, a Docker container, an ECS Fargate Task, or even a physical server.&lt;/p&gt;

&lt;p&gt;From Jenkins' point of view, these are all execution nodes capable of running workloads. Agents also make workload separation possible. For example, a Java build can use an environment with Java and Maven installed, while an infrastructure pipeline can use a different Agent with Terraform and the AWS CLI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent: java-builder
Tools:
- Java
- Maven
- Gradle

Agent: node-builder
Tools:
- Node.js
- npm

Agent: terraform
Tools:
- Terraform
- AWS CLI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will build a static Jenkins Agent on Amazon EC2 in a later article. For now, the key distinction is simple: &lt;strong&gt;Controller = orchestration&lt;/strong&gt;, while &lt;strong&gt;Agent = execution environment&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Executor: An Execution Slot
&lt;/h2&gt;

&lt;p&gt;One of the easiest Jenkins concepts to misunderstand is the Executor.&lt;/p&gt;

&lt;p&gt;An Agent and an Executor are not the same thing. The Agent is the compute environment, while the Executor represents a slot on that environment that Jenkins can use to run a workload.&lt;/p&gt;

&lt;p&gt;Suppose an EC2 Agent is configured with two executors:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8ksrrga9euq7ivq26ox3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8ksrrga9euq7ivq26ox3.png" alt="jenkins_fundamentals-execution_slot" width="393" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That node can potentially execute two Jenkins workloads concurrently. If both Executors are busy and another compatible build arrives, that build has to wait in the Queue.&lt;/p&gt;

&lt;p&gt;This is where the Jenkins Queue becomes important.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Jenkins Queue
&lt;/h2&gt;

&lt;p&gt;Receiving a build request does not necessarily mean Jenkins starts executing it immediately. The request may first enter the Jenkins Queue while the Controller waits for a suitable execution environment and an available Executor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fka0su59op2jw75doloxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fka0su59op2jw75doloxq.png" alt="jenkins_fundamentals-queue.drawio" width="798" height="214"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A build may remain in the Queue because all compatible Executors are busy, the required Agent is offline, the Pipeline requests a label that no available node provides, or a concurrency restriction or resource constraint prevents the build from starting.&lt;/p&gt;

&lt;p&gt;The important idea at this stage is that &lt;strong&gt;triggering a build and executing a build are two different events&lt;/strong&gt;. The Queue is the boundary between those two stages.&lt;/p&gt;

&lt;p&gt;Later, when we discuss scaling and troubleshooting, Queue behavior will become one of the most useful signals for understanding whether Jenkins has enough execution capacity or whether the bottleneck exists somewhere else.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Pipeline and Jenkinsfile
&lt;/h2&gt;

&lt;p&gt;Modern Jenkins workloads are commonly defined as code using a &lt;code&gt;Jenkinsfile&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To make the execution model concrete, let’s use the Jenkins Pipeline equivalent of &lt;strong&gt;“Hello, World!”&lt;/strong&gt;: a tiny Declarative Pipeline that is easy to read but still contains enough structure to follow a real build from start to finish.&lt;/p&gt;

&lt;p&gt;Consider this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight groovy"&gt;&lt;code&gt;&lt;span class="n"&gt;pipeline&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="n"&gt;any&lt;/span&gt;

    &lt;span class="n"&gt;stages&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Build'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;steps&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="s1"&gt;'echo "building..."'&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;

        &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Test'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;steps&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="s1"&gt;'echo "testing..."'&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;

        &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Package'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;steps&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="s1"&gt;'echo "hello Jenkins" &amp;gt; artifact.txt'&lt;/span&gt;
                &lt;span class="n"&gt;archiveArtifacts&lt;/span&gt; &lt;span class="nl"&gt;artifacts:&lt;/span&gt; &lt;span class="s1"&gt;'artifact.txt'&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are not going to explore the entire Declarative Pipeline syntax in this article. Instead, this Jenkinsfile gives us something concrete to trace through the Jenkins execution lifecycle.&lt;/p&gt;

&lt;p&gt;The pipeline contains three stages:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuaksmj3ywi3mq6s0r70x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuaksmj3ywi3mq6s0r70x.png" alt="pipeline" width="572" height="190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The line &lt;code&gt;agent any&lt;/code&gt; tells Jenkins that the Pipeline can run on any available execution node. The Controller coordinates the Pipeline, while the execution environment runs the actual shell commands.&lt;/p&gt;

&lt;p&gt;That distinction becomes clearer once we walk through what happens after a build is triggered.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. What Happens After You Click "Build Now"?
&lt;/h2&gt;

&lt;p&gt;With that Jenkinsfile in mind, we can now trace what Jenkins actually does when a build is triggered. This execution lifecycle is the core mental model we will use throughout the rest of the series.&lt;/p&gt;

&lt;p&gt;At a high level, the execution path looks like this:&lt;/p&gt;

&lt;p&gt;→ Trigger&lt;/p&gt;

&lt;p&gt;→ Controller &lt;/p&gt;

&lt;p&gt;→ Queue&lt;/p&gt;

&lt;p&gt;→ Executor Allocation&lt;/p&gt;

&lt;p&gt;→ Workspace&lt;/p&gt;

&lt;p&gt;→ Build / Test / Package &lt;/p&gt;

&lt;p&gt;→ Artifact + Result&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 — Trigger
&lt;/h3&gt;

&lt;p&gt;A Jenkins build can be triggered manually, by a Git webhook, by a scheduled event, by another pipeline, or through an API call. The trigger simply tells Jenkins that work should be performed, and the Controller receives the request and begins coordinating what happens next.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Queue
&lt;/h3&gt;

&lt;p&gt;Jenkins creates a build request and determines whether suitable execution capacity is available. If an appropriate node and Executor are immediately available, the Queue wait may be almost invisible. If not, the build remains queued until Jenkins can schedule it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpaz2v6id5ljqnqbxg6h9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpaz2v6id5ljqnqbxg6h9.png" alt="jenkins_fundamentals-queue_details" width="724" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Queue therefore represents build demand that has not yet been matched with available execution capacity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 — Executor Allocation
&lt;/h3&gt;

&lt;p&gt;Once Jenkins identifies a suitable node, it also needs an available Executor on that node. A useful analogy is to think of the Agent as a machine and the Executor as one available seat on that machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7lc31jpcuwngaqth14bo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7lc31jpcuwngaqth14bo.png" alt="jenkins_fundamentals-executor-allocation" width="391" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The new workload can use Executor 2. At this point Jenkins has successfully matched the build request with both an execution environment and an execution slot.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Workspace
&lt;/h3&gt;

&lt;p&gt;Before running commands, Jenkins needs a working directory. That directory is called the Workspace.&lt;/p&gt;

&lt;p&gt;A Workspace may contain source code, downloaded dependencies, temporary files, test results, and intermediate build outputs.&lt;/p&gt;

&lt;p&gt;Commands such as &lt;code&gt;npm test&lt;/code&gt; or &lt;code&gt;mvn package&lt;/code&gt; execute from this environment. The key operational point is that a Workspace is a &lt;strong&gt;working directory&lt;/strong&gt;, not permanent storage. It may disappear when a node is rebuilt, the Workspace is cleaned, or an ephemeral execution environment is terminated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 — Pipeline Stages Execute
&lt;/h3&gt;

&lt;p&gt;Once the Workspace is prepared, Jenkins begins executing the Pipeline stages. Using our example, the build flows from Build to Test and then Package.&lt;/p&gt;

&lt;p&gt;The Controller continues to orchestrate the Pipeline and track its execution state, while the shell commands themselves execute on the selected node. For example, &lt;code&gt;sh 'echo "building..."'&lt;/code&gt; is a workload execution step.&lt;/p&gt;

&lt;p&gt;A useful way to visualize the responsibility boundary is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbvclksxfqic9qu35nqmi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbvclksxfqic9qu35nqmi.png" alt="pic_1" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6 — Result and Artifact
&lt;/h3&gt;

&lt;p&gt;When the build finishes, Jenkins records the result along with console logs, timestamps, build numbers, test information, and other metadata.&lt;/p&gt;

&lt;p&gt;The Pipeline may also produce files that need to survive after execution, such as JAR files, packages, reports, or deployment bundles. In our example, &lt;code&gt;archiveArtifacts artifacts: 'artifact.txt'&lt;/code&gt; tells Jenkins to retain &lt;code&gt;artifact.txt&lt;/code&gt; rather than leave it only in the Workspace.&lt;/p&gt;

&lt;p&gt;This distinction is important. The Workspace belongs to the execution environment and may be temporary. An Artifact is build output that we intentionally preserve beyond the lifetime of the Workspace or execution environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. JENKINS_HOME: Stateful Controller, HA, and Recovery
&lt;/h2&gt;

&lt;p&gt;So far, we have focused mainly on execution. The next question is where Jenkins keeps its own configuration and operational state.&lt;/p&gt;

&lt;p&gt;The answer is primarily &lt;code&gt;JENKINS_HOME&lt;/code&gt;. This directory contains important Jenkins data such as job configuration, global configuration, plugin files, build metadata, node configuration, credentials-related configuration, and other state required for the Controller to operate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhgeuu0bq2rzts12a4bap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhgeuu0bq2rzts12a4bap.png" alt="pic_2" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The important architectural implication is that the Jenkins Controller is &lt;strong&gt;stateful&lt;/strong&gt;. This directly affects how we design for high availability (HA).&lt;/p&gt;

&lt;p&gt;For a typical stateless web application, we can place several identical instances behind a load balancer and replace any failed instance without losing application state. Jenkins does not fit that model so easily.&lt;/p&gt;

&lt;p&gt;If multiple Controllers independently modify the same Jenkins state, coordination becomes a serious problem. Simply placing two Jenkins Controllers behind a load balancer and pointing both of them at the same persistent filesystem does &lt;strong&gt;not&lt;/strong&gt; automatically create a safe active-active Jenkins cluster.&lt;/p&gt;

&lt;p&gt;Persistent storage solves the durability problem by preserving Jenkins state when the underlying compute is replaced or fails. It does not solve concurrent state modification, Controller coordination, Pipeline execution ownership, plugin state consistency, in-memory execution state, leader election, or safe active-active behavior.&lt;/p&gt;

&lt;p&gt;For a traditional Jenkins Controller, HA is often better approached as a &lt;strong&gt;durability, recovery, and controlled failover problem&lt;/strong&gt; rather than an active-active scaling problem. A more realistic design uses one active Controller backed by durable state, with a recovery mechanism capable of starting a replacement Controller when the current compute fails.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu46ck70qx199baolltmy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu46ck70qx199baolltmy.png" alt="pic_3" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That design still requires decisions around health checks, startup behavior, backup, recovery time, and preventing multiple Controllers from incorrectly operating against the same state.&lt;/p&gt;

&lt;p&gt;This distinction will become important when we later move the Controller from EC2 to ECS Fargate. The Fargate task running the Controller may be replaceable, but &lt;code&gt;JENKINS_HOME&lt;/code&gt; is not. So when we eventually describe Jenkins as running on serverless compute, we need to be precise: &lt;strong&gt;the compute layer may be ephemeral, but the Jenkins application remains stateful&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. Jenkins State, Workspace, and Artifact Are Different Things
&lt;/h2&gt;

&lt;p&gt;Jenkins state, Workspace data, and build Artifacts may all exist during a Pipeline run, but they have very different lifecycles.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Data&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;JENKINS_HOME&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Persistent Jenkins Controller state&lt;/td&gt;
&lt;td&gt;Jobs, configuration, plugins, build metadata&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workspace&lt;/td&gt;
&lt;td&gt;Working directory for execution&lt;/td&gt;
&lt;td&gt;Source code, dependencies, temporary build files&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Artifact&lt;/td&gt;
&lt;td&gt;Build output intentionally retained&lt;/td&gt;
&lt;td&gt;JAR, ZIP, reports, packages&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Jenkins state must survive Controller replacement and be available during recovery. Workspace data may be safely discarded after execution depending on the workload. Artifacts should survive whenever another build, release process, or deployment needs to consume them later.&lt;/p&gt;

&lt;p&gt;A production architecture should therefore avoid treating these storage categories as interchangeable. This becomes especially important once execution environments become ephemeral.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. What We Have Not Solved Yet
&lt;/h2&gt;

&lt;p&gt;We now understand Jenkins logically, but we have not built anything yet.&lt;/p&gt;

&lt;p&gt;There are still several infrastructure questions to answer. Where should the Controller run? Where should &lt;code&gt;JENKINS_HOME&lt;/code&gt; live? How should users access Jenkins? How much compute does the Controller need? Should builds execute directly on it? How do we introduce separate Agents, and eventually elastic ones?&lt;/p&gt;

&lt;p&gt;Those questions are where AWS enters the story.&lt;/p&gt;

&lt;p&gt;The architecture will evolve gradually throughout this series:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flldohti5yy41at5r206z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flldohti5yy41at5r206z.png" alt="pic_4" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will not jump directly to the final design. Instead, we will build each stage, understand its limitations, and then use those limitations to justify the next architectural step.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;The Jenkins Controller is the control plane of the system. It coordinates jobs, scheduling, Pipeline execution, configuration, and Jenkins state.&lt;/p&gt;

&lt;p&gt;The Queue separates build demand from available execution capacity, so a triggered build does not necessarily start immediately.&lt;/p&gt;

&lt;p&gt;An Agent is an execution environment, while an Executor is an execution slot on that environment.&lt;/p&gt;

&lt;p&gt;Workspace data, Artifacts, and &lt;code&gt;JENKINS_HOME&lt;/code&gt; represent different categories of state with different lifecycles and should be designed accordingly.&lt;/p&gt;

&lt;p&gt;Finally, Jenkins is stateful. That statefulness affects not only persistence and backup, but also how we approach High Availability. HA is not simply a matter of running multiple Controllers behind a load balancer; recovery, failover, and state ownership must be designed explicitly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Next: Installing Jenkins Controller on AWS EC2
&lt;/h2&gt;

&lt;p&gt;We now understand what Jenkins needs logically. The next step is to place those concepts onto real infrastructure.&lt;/p&gt;

&lt;p&gt;In the next article, we will provision an Amazon EC2 instance and install a Jenkins Controller from scratch. That will give us our first real Jenkins environment and allow us to run the Pipeline used in this article.&lt;/p&gt;

&lt;p&gt;For the first time, we will observe the full execution flow directly in Jenkins: Queue → Executor → Workspace → Console Output → Artifact&lt;/p&gt;

&lt;p&gt;That simple EC2 installation will become the baseline architecture that we gradually evolve throughout the rest of the series.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>jenkins</category>
      <category>aws</category>
    </item>
    <item>
      <title>OpenVPN on AWS: Secure Access to Private Infrastructure</title>
      <dc:creator>Phu Hoang</dc:creator>
      <pubDate>Fri, 12 Jun 2026 01:11:08 +0000</pubDate>
      <link>https://dev.to/posibble/openvpn-on-aws-secure-access-to-private-infrastructure-534n</link>
      <guid>https://dev.to/posibble/openvpn-on-aws-secure-access-to-private-infrastructure-534n</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Many DevOps engineers and Site Reliability Engineers (SREs) have likely worked on projects where the highest priority during the early stages was always:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Get the system running first.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When deadlines are tight, infrastructure must be provisioned quickly, and environments need to be ready immediately for developers to deploy applications, many trade-offs are often made in exchange for deployment speed. SSH is exposed publicly for easier access. Grafana, Jenkins, or ArgoCD are directly accessible from the Internet for easier troubleshooting. Sometimes even databases are temporarily opened to public access simply so the team can move faster.&lt;/p&gt;

&lt;p&gt;At that moment, everyone knows:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“This isn’t ideal.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But most people also think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;““It can be improved later.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then real users start arriving, traffic increases, and the production environment begins operating at scale. And that is exactly when security debt starts demanding repayment.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is it really safe when every service is exposed to the Internet?&lt;/li&gt;
&lt;li&gt;How can engineers still access private resources without exposing the entire system?&lt;/li&gt;
&lt;li&gt;How do we maintain operational convenience without turning production into a massive attack surface?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this article, we will explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What VPN actually is&lt;/li&gt;
&lt;li&gt;Why VPN remains extremely important&lt;/li&gt;
&lt;li&gt;How OpenVPN works&lt;/li&gt;
&lt;li&gt;A hands-on demonstration of deploying OpenVPN Access Server on AWS and securely accessing private resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This article shares practical lessons learned from operating real-world infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Section 1 — VPN Fundamentals
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. What Is a VPN?
&lt;/h3&gt;

&lt;p&gt;VPN (Virtual Private Network) is a technology that creates a private and encrypted connection over the public Internet infrastructure.&lt;/p&gt;

&lt;p&gt;Instead of exposing the entire system directly to the Internet for access, we create a secure tunnel between the user’s computer and the internal system.&lt;/p&gt;

&lt;p&gt;Once the VPN connection is established successfully, your device behaves almost as if it were located inside the company’s private network or cloud infrastructure.&lt;/p&gt;

&lt;p&gt;That is why, after enabling VPN, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSH into private EC2 instances&lt;/li&gt;
&lt;li&gt;Access internal databases&lt;/li&gt;
&lt;li&gt;Open non-public Grafana dashboards&lt;/li&gt;
&lt;li&gt;Interact with private Kubernetes API endpoints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the system’s perspective, your laptop essentially becomes “a member” of the internal network.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. What Problems Does VPN Solve?
&lt;/h3&gt;

&lt;p&gt;One common misconception is that VPN is only used to change IP addresses, hide locations and stay anonymous. In reality, those are merely side effects. The true value of VPN lies in creating a secure connection between users and internal systems.&lt;/p&gt;

&lt;h4&gt;
  
  
  Accessing Private Resources from the Internet
&lt;/h4&gt;

&lt;p&gt;❓If everything is publicly exposed to the Internet, access certainly becomes convenient — but it also means anyone on the Internet can “knock on the door.”&lt;/p&gt;

&lt;p&gt;In properly designed systems, many resources are intentionally kept private, such as: EC2 instances, databases, Kubernetes control planes, Jenkins servers. However, operations teams still need daily access to them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developers need SSH access for debugging&lt;/li&gt;
&lt;li&gt;DevOps engineers need monitoring access&lt;/li&gt;
&lt;li&gt;SREs need to handle midnight incidents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ VPN solves this problem by creating a secure connection between the user device and the private network. After connecting to the VPN, users can access private resources as if they were operating inside the same internal network.&lt;/p&gt;

&lt;h4&gt;
  
  
  Reducing the Attack Surface
&lt;/h4&gt;

&lt;p&gt;❓Every service exposed to the Internet — such as SSH, RDP, PostgreSQL, or administrative dashboards — can become a target for port scanning, brute-force attacks, vulnerability exploitation. As systems grow larger, temporarily exposing “just a few services” often evolves into dozens of security groups, numerous exceptions, complex rule chains. Eventually, the environment becomes difficult to manage securely.&lt;/p&gt;

&lt;p&gt;✅ VPN reverses this mindset. Instead of exposing services and attempting to protect them afterward, we keep services private from the beginning. Only users with valid accounts, successful authentication, authorized VPN access can reach internal resources.&lt;/p&gt;

&lt;h4&gt;
  
  
  Replacing Traditional IP Whitelisting &amp;amp; Protecting Data on Public Networks
&lt;/h4&gt;

&lt;p&gt;❓IP whitelisting is a common approach for restricting access by allowing only specific IP addresses. This works well... Until engineers work remotely, travel for business, use mobile networks, sit in coffee shops. Their IP addresses constantly change, leading to requests such as “Can you whitelist my new IP”, “My Wi-Fi changed”, “I’m at the airport”, “I urgently need production access”.&lt;/p&gt;

&lt;p&gt;✅ VPN approaches the problem differently. Instead of trusting IP addresses, we trust user identities, certificates, authentication mechanisms, multi-factor authentication (MFA). As long as authentication succeeds, users can securely access the system from anywhere. VPN also creates an encrypted communication channel between the user device and the VPN server, protecting data during transmission.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. How Does VPN Work?
&lt;/h3&gt;

&lt;p&gt;Behind the seemingly simple “Connect” button, many components work together.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u3r1de8otd7swff8y0p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u3r1de8otd7swff8y0p.png" alt="VPN Work" width="462" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication: Users must authenticate with the VPN server using username/password, certificates, MFA. Only authorized users can establish VPN connections&lt;/li&gt;
&lt;li&gt;Tunneling Protocol &amp;amp; Encryption: After authentication succeeds, the VPN establishes an encrypted tunnel between the VPN client and VPN server. All traffic transmitted through this tunnel is encrypted. As a result VPN significantly reduces the risk of traffic sniffing when using public Wi-Fi. Common protocols include TLS, SSL, IPSec&lt;/li&gt;
&lt;li&gt;Virtual Network Interface: Once the VPN connection is established, the operating system creates a virtual network interface. For example: Windows creates a new adapter, Linux creates &lt;code&gt;tun0&lt;/code&gt; or &lt;code&gt;tap0&lt;/code&gt; , macOS creates a similar interface. At the same time, the device receives an IP address belonging to the VPN network. At that moment, your laptop officially becomes part of the VPN network&lt;/li&gt;
&lt;li&gt;Traffic Routing / Route Table: The VPN client receives required routes from the VPN server. As a result, traffic destined for private networks goes through the VPN tunnel, normal Internet traffic may still go directly to the Internet depending on configuration. This is exactly how Split Tunnel works&lt;/li&gt;
&lt;li&gt;NAT: In many VPN deployment models, the VPN server performs NAT or routing to allow VPN clients to communicate with the private network behind it. Depending on the architecture, VPN clients may be routed directly, or NATed through the VPN server before accessing internal resources&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Full Tunnel vs Split Tunnel
&lt;/h3&gt;

&lt;p&gt;After a VPN connection is established, there are two common routing models.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criteria&lt;/th&gt;
&lt;th&gt;Full Tunnel&lt;/th&gt;
&lt;th&gt;Split Tunnel&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Traffic through VPN&lt;/td&gt;
&lt;td&gt;All traffic&lt;/td&gt;
&lt;td&gt;Only internal traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VPN Server bandwidth usage&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Lower&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internet performance&lt;/td&gt;
&lt;td&gt;Lower&lt;/td&gt;
&lt;td&gt;Better&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Level of control&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Suitable for&lt;/td&gt;
&lt;td&gt;Enterprises needing full traffic control&lt;/td&gt;
&lt;td&gt;DevOps, SRE, Cloud Infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Throughout this guide, we will use Split Tunnel to access private resources on AWS while allowing normal Internet traffic to go directly to the Internet.&lt;/p&gt;

&lt;p&gt;Now that we understand the fundamentals of VPN technology, let’s explore why OpenVPN remains one of the most widely adopted VPN solutions today.&lt;/p&gt;




&lt;h2&gt;
  
  
  Section 2 — OpenVPN Solution Overview
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Popular VPN Solutions
&lt;/h3&gt;

&lt;p&gt;Today, many VPN solutions are available on the market. Each solution is designed for different use cases and environments.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Solution&lt;/th&gt;
&lt;th&gt;Highlights&lt;/th&gt;
&lt;th&gt;Suitable For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenVPN&lt;/td&gt;
&lt;td&gt;Open-source, stable, widely adopted&lt;/td&gt;
&lt;td&gt;Personal use, enterprise, cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WireGuard&lt;/td&gt;
&lt;td&gt;High performance, modern, simple configuration&lt;/td&gt;
&lt;td&gt;Cloud, Kubernetes, homelab&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IPSec VPN&lt;/td&gt;
&lt;td&gt;Traditional VPN standard integrated into networking devices&lt;/td&gt;
&lt;td&gt;Enterprise networks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AWS Client VPN&lt;/td&gt;
&lt;td&gt;AWS-managed VPN service&lt;/td&gt;
&lt;td&gt;Pure AWS environments&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Site-to-Site VPN&lt;/td&gt;
&lt;td&gt;Connects two separate networks&lt;/td&gt;
&lt;td&gt;Hybrid cloud, data centers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In this article, we choose OpenVPN because it is almost a “classic” technology in the infrastructure world:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Beginner-friendly&lt;/li&gt;
&lt;li&gt;Large community support&lt;/li&gt;
&lt;li&gt;Rich documentation&lt;/li&gt;
&lt;li&gt;Multi-platform support&lt;/li&gt;
&lt;li&gt;Excellent for understanding VPN fundamentals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally, many modern VPN solutions still inherit concepts similar to OpenVPN, so understanding OpenVPN also helps explain how other VPN systems operate.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. OpenVPN Community Edition vs Access Server
&lt;/h3&gt;

&lt;p&gt;OpenVPN currently has two common deployment approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenVPN Community Edition&lt;/li&gt;
&lt;li&gt;OpenVPN Access Server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although both are based on the same OpenVPN technology, they target different audiences.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criteria&lt;/th&gt;
&lt;th&gt;Community Edition&lt;/th&gt;
&lt;th&gt;Access Server&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;Completely free&lt;/td&gt;
&lt;td&gt;Free with limited concurrent connections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Management Interface&lt;/td&gt;
&lt;td&gt;CLI&lt;/td&gt;
&lt;td&gt;Web UI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User Management&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;td&gt;Built-in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Certificate Management&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;td&gt;Automated&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Routing Configuration&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;td&gt;Web UI&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MFA Support&lt;/td&gt;
&lt;td&gt;Manual setup&lt;/td&gt;
&lt;td&gt;Built-in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment Complexity&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Primary Use Case&lt;/td&gt;
&lt;td&gt;Learning, deep customization&lt;/td&gt;
&lt;td&gt;Fast deployment, easy operations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In this article, instead of spending too much time on manual configuration, we will use Access Server to focus more on VPN concepts, networking flow and operational workflows.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. OpenVPN Access Server Architecture
&lt;/h3&gt;

&lt;p&gt;One reason OpenVPN Access Server is widely adopted is because its architecture is relatively simple and easy to deploy.&lt;/p&gt;

&lt;p&gt;In a basic deployment model, the Access Server acts as the gateway into the internal network.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndk3h64g1klpkkj1zjk2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndk3h64g1klpkkj1zjk2.png" alt="OpenVPN Architecture" width="800" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When users connect to the VPN:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;OpenVPN Access Server authenticates the user&lt;/li&gt;
&lt;li&gt;A VPN tunnel is established&lt;/li&gt;
&lt;li&gt;An IP address belonging to the VPN network is assigned&lt;/li&gt;
&lt;li&gt;Required routes are pushed to the VPN client&lt;/li&gt;
&lt;li&gt;Traffic is forwarded to internal resources&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With the core concepts covered, we can now move on to deploying a practical OpenVPN environment on AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  Section 3 — Deploying OpenVPN Access Server on AWS
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Demo Objective — Hands-On Time
&lt;/h3&gt;

&lt;p&gt;At this stage, the theory should provide a solid understanding of what VPN is, how it works and why it appears in nearly every modern cloud system. So instead of continuing with concepts, we will build a real AWS lab environment to observe how VPN traffic behaves in a production-like environment.&lt;/p&gt;

&lt;p&gt;The objectives of this demo are straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect a personal laptop to AWS through VPN&lt;/li&gt;
&lt;li&gt;Access an EC2 instance located inside a private subnet&lt;/li&gt;
&lt;li&gt;SSH into an instance without a public IP&lt;/li&gt;
&lt;li&gt;Observe how traffic is routed through the VPN tunnel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If everything works correctly, our laptop connected from the public Internet will be able to access private infrastructure as if it were located inside the same internal network.&lt;/p&gt;

&lt;p&gt;That is the real value of VPN in cloud environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. AWS Architecture
&lt;/h3&gt;

&lt;p&gt;To focus on VPN and networking flow instead of complicated infrastructure, we will use a minimal architecture consisting of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 VPC&lt;/li&gt;
&lt;li&gt;1 Public Subnet&lt;/li&gt;
&lt;li&gt;1 Private Subnet&lt;/li&gt;
&lt;li&gt;1 OpenVPN Access Server&lt;/li&gt;
&lt;li&gt;1 Private EC2 Instance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft3f7q2nemakp6ea7wthj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft3f7q2nemakp6ea7wthj.png" alt="AWS Architecture" width="800" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenVPN Access Server accepts VPN connections from the Internet&lt;/li&gt;
&lt;li&gt;The private EC2 instance has no public IP&lt;/li&gt;
&lt;li&gt;All access to the private EC2 instance must go through the VPN&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This architecture reflects how many organizations secure production environments on AWS.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Preparing AWS Infrastructure
&lt;/h3&gt;

&lt;p&gt;The goal of this article is to focus on VPN and networking concepts rather than detailed infrastructure provisioning. Therefore, instead of manually creating every AWS resource, we will use a prepared Terraform configuration to provision the lab environment quickly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://raw.githubusercontent.com/orez-fu/blog_content/refs/heads/master/vpn/part_1/main.tf" rel="noopener noreferrer"&gt;Terraform Source Code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Terraform provisions the following components:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;VPC&lt;/td&gt;
&lt;td&gt;Private network&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Public Subnet&lt;/td&gt;
&lt;td&gt;Hosts OpenVPN Access Server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Private Subnet&lt;/td&gt;
&lt;td&gt;Hosts Private EC2&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internet Gateway&lt;/td&gt;
&lt;td&gt;Provides Internet access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Route Table&lt;/td&gt;
&lt;td&gt;Controls traffic routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Security Group&lt;/td&gt;
&lt;td&gt;Controls network access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EC2 Instance&lt;/td&gt;
&lt;td&gt;OpenVPN Server with Elastic IP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EC2 Instance&lt;/td&gt;
&lt;td&gt;Private test server without Public IP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Elastic IP&lt;/td&gt;
&lt;td&gt;Public IP for OpenVPN Server&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Instead of installing OpenVPN manually by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generating CA certificates&lt;/li&gt;
&lt;li&gt;Creating certificates&lt;/li&gt;
&lt;li&gt;Configuring daemons&lt;/li&gt;
&lt;li&gt;Setting up routing&lt;/li&gt;
&lt;li&gt;Configuring NAT&lt;/li&gt;
&lt;li&gt;Managing iptables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;we will use the official OpenVPN Access Server AMI from AWS Marketplace. This is a common real-world approach because it enables faster deployment, easier maintenance, practical lab and PoC environments.&lt;/p&gt;

&lt;p&gt;Before Terraform can provision the EC2 instance using this AMI, AWS requires the account to subscribe to the Marketplace product first.&lt;/p&gt;

&lt;p&gt;Access the OpenVPN Access Server Marketplace product:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/marketplace/procurement/?productId=fe8020db-5343-4c43-9e65-5ed4a825c931&amp;amp;redirectUrl=https%3A%2F%2Faws.amazon.com%2Fmarketplace%2Fpp%2Fprodview-y3m73u6jd5srk" rel="noopener noreferrer"&gt;AWS Marketplace Procurement Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then follow these steps:&lt;/p&gt;

&lt;p&gt;→ Select &lt;strong&gt;Continue to Subscribe&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Accept the terms and conditions (&lt;strong&gt;Accept Terms&lt;/strong&gt;)&lt;/p&gt;

&lt;p&gt;→ Wait until the status changes to &lt;strong&gt;Subscribed&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once completed, you can monitor the subscription status. Please note that the OpenVPN Access Server version used in this article is the &lt;strong&gt;BYOL (Bring Your Own License)&lt;/strong&gt; edition. This version allows free usage with a limited number of concurrent connections, making it suitable for learning and testing purposes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3mce9vwsitao2390e6l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm3mce9vwsitao2390e6l.png" alt="AWS AMI Subscription" width="799" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After completing the Marketplace subscription, we can begin setting up the lab environment. Make sure your computer has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html" rel="noopener noreferrer"&gt;AWS CLI&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Configure &lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html" rel="noopener noreferrer"&gt;AWS credentials&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install &lt;a href="https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli" rel="noopener noreferrer"&gt;Terraform CLI&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next, download the Terraform source code and provision the AWS infrastructure using the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;terraform init
terraform plan
terraform apply &lt;span class="nt"&gt;-auto-approve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The provisioning process may take several minutes.&lt;/p&gt;

&lt;p&gt;Once completed, Terraform outputs the public IP address assigned to the OpenVPN Access Server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwhk3gr6zwnhf6bhzt181.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwhk3gr6zwnhf6bhzt181.png" alt="Terraform Outputs" width="799" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Installing OpenVPN Access Server
&lt;/h3&gt;

&lt;h4&gt;
  
  
  4.1 Creating an OpenVPN Access Server Account
&lt;/h4&gt;

&lt;p&gt;Visit the following link: &lt;a href="https://myaccount.openvpn.com/signin/product-select" rel="noopener noreferrer"&gt;https://myaccount.openvpn.com/signin/product-select&lt;/a&gt; and register for a new account, or sign in using your Google or Microsoft account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Firsv7g9a300dme7rwxw0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Firsv7g9a300dme7rwxw0.png" alt="OpenVPN Signup" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the &lt;strong&gt;Access Server&lt;/strong&gt; product and complete the account information setup process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo1c1qycixux608uxl6xv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo1c1qycixux608uxl6xv.png" alt="OpenVPN Signup" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will then be redirected to the OpenVPN application console. From the &lt;strong&gt;Subscription&lt;/strong&gt; menu, you will see the default subscription plan set to &lt;strong&gt;Free Plan&lt;/strong&gt;, along with the &lt;strong&gt;Activation Key&lt;/strong&gt; used to activate your OpenVPN Access Server instance. Copy this key for use in the next step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8mpmhgndrn0vp88nefbt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8mpmhgndrn0vp88nefbt.png" alt="OpenVPN Get Activation Key" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4.2 Initial Setup
&lt;/h4&gt;

&lt;p&gt;Once the EC2 instance has finished provisioning, OpenVPN Access Server is actually already pre-installed inside the instance through the AWS Marketplace AMI. However, the system still requires an initial setup before it can operate fully.&lt;/p&gt;

&lt;p&gt;Access the &lt;code&gt;openvpn-access-server&lt;/code&gt; EC2 instance through the AWS Console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5rzcxkpbxlptf51zynw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5rzcxkpbxlptf51zynw.png" alt="AWS Connect Public EC2" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By default, when accessing the instance for the first time, OpenVPN Access Server will prompt you to perform the initial configuration. Alternatively, you can run the following command to start or re-run the setup process:&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;ovpn-init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During the initial setup, you will be prompted to configure several settings. (You can type &lt;strong&gt;Yes&lt;/strong&gt; or press &lt;strong&gt;Enter&lt;/strong&gt; to use the default configuration.)&lt;/p&gt;

&lt;p&gt;The setup process includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Accepting the license agreement&lt;/li&gt;
&lt;li&gt;Confirming the Primary Node role&lt;/li&gt;
&lt;li&gt;Selecting the network interface&lt;/li&gt;
&lt;li&gt;Choosing the encryption algorithm&lt;/li&gt;
&lt;li&gt;Configuring the ports for the Web Admin UI and OpenVPN Daemon&lt;/li&gt;
&lt;li&gt;Setting the password for the Web Admin UI&lt;/li&gt;
&lt;li&gt;Entering the Activation Key collected in the previous step&lt;/li&gt;
&lt;li&gt;Configuring other optional settings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the installation is completed, you will see both the &lt;strong&gt;Admin UI&lt;/strong&gt; and &lt;strong&gt;Client UI&lt;/strong&gt; URLs. Please note that these URLs use private IP addresses by default, so you will need to replace them with the corresponding public IP address when accessing them externally.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39mkl58k8td4pah6vfxb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39mkl58k8td4pah6vfxb.png" alt="AWS Init OPVN Server" width="799" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4.3 Accessing the Admin UI &amp;amp; Client UI
&lt;/h4&gt;

&lt;p&gt;After the initial setup is completed, OpenVPN Access Server provides two interfaces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Admin UI&lt;/strong&gt;: used to manage users, routing, authentication, and VPN configurations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client UI&lt;/strong&gt;: used to download the OpenVPN Client application, download connection profiles, and connect to the VPN.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Access the Admin UI in your web browser using the Public IP Address of the &lt;code&gt;openvpn-access-server&lt;/code&gt; EC2 instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://&amp;lt;Public-IP&amp;gt;:943/admin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fakhonzo82o5bl4d2bldl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fakhonzo82o5bl4d2bldl.png" alt="OpenVPN Admin UI Login" width="799" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Log in using the username &lt;code&gt;openvpn&lt;/code&gt; and the password configured in the previous step. If you skipped that step, you will be prompted to set a new password.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2fx9jri6l6xqvjsc0wx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2fx9jri6l6xqvjsc0wx.png" alt="OpenVPN Admin UI Status" width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By default, OpenVPN Access Server is typically configured to use the EC2 instance’s private IP address as the Server Address. You can verify this information under &lt;strong&gt;Server Details &amp;gt; Server address&lt;/strong&gt;. However, in this lab environment, clients will connect from the public Internet. If the private IP address remains unchanged, the generated VPN profile will contain a private address, preventing external clients from connecting successfully.&lt;/p&gt;

&lt;p&gt;Therefore, after logging into the Admin UI, we need to update the Server Address to use the Public IP Address, specifically the Elastic IP Address associated with the EC2 instance.&lt;/p&gt;

&lt;p&gt;Navigate to the &lt;strong&gt;VPN Server&lt;/strong&gt; menu:&lt;/p&gt;

&lt;p&gt;→ Enter the Public IP Address in the &lt;strong&gt;Hostname (or IP address)&lt;/strong&gt; field&lt;/p&gt;

&lt;p&gt;→ Click the &lt;strong&gt;Save&lt;/strong&gt; button&lt;/p&gt;

&lt;p&gt;→ Click the &lt;strong&gt;Restart&lt;/strong&gt; button&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjismi6vhq4v0v63yi7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjismi6vhq4v0v63yi7z.png" alt="OpenVPN Admin UI VPN Server" width="799" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait for OpenVPN Access Server to restart. Afterward, you should verify that the Server Address has been updated to the public IP address.&lt;/p&gt;

&lt;p&gt;The next step is very important. &lt;strong&gt;Access Controls&lt;/strong&gt;, also known as &lt;strong&gt;Routing Policy&lt;/strong&gt;, are used to route connections to private resources. In the Admin UI, create the first policy through the &lt;strong&gt;Access Controls&lt;/strong&gt; menu:&lt;/p&gt;

&lt;p&gt;→ Click the &lt;strong&gt;New Access Rule&lt;/strong&gt; button&lt;/p&gt;

&lt;p&gt;→ Enter the username &lt;code&gt;openvpn&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Enter the CIDR &lt;code&gt;10.0.0.0/16&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Click &lt;strong&gt;Save rule&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Click the &lt;strong&gt;Restart&lt;/strong&gt; button to apply the configuration changes&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw294ov7p42ja4iokj4ys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw294ov7p42ja4iokj4ys.png" alt="OpenVPN Admin UI Access Control" width="799" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the Access Controls configuration is completed, OpenVPN Access Server will begin pushing routes to VPN clients, allowing traffic destined for the VPC CIDR to be routed through the VPN tunnel into the AWS VPC. You will verify this behavior in the following steps.&lt;/p&gt;

&lt;p&gt;Next, open a new browser tab and access the Client UI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://&amp;lt;Public-IP&amp;gt;:943/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since you have already logged into the OpenVPN Admin UI, your session credentials will also be reused for the Client UI.&lt;/p&gt;

&lt;p&gt;In this application, you will perform the following tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download and install the OpenVPN Client application for your computer or smartphone. Be sure to uncheck the option &lt;strong&gt;Include connection profile (User-locked)&lt;/strong&gt; so that the connection profile can be customized later. OpenVPN clients are also available for multiple platforms including Windows, macOS, Linux, iOS, and Android.&lt;/li&gt;
&lt;li&gt;Download the &lt;strong&gt;Connection Profile&lt;/strong&gt;. All required routing information, certificates, and VPN configurations are already embedded inside this profile.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdqpq7xtgmm5s38715y5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdqpq7xtgmm5s38715y5.png" alt="OpenVPN Client UI" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Configuring OpenVPN Client
&lt;/h3&gt;

&lt;p&gt;At this point, the infrastructure setup is nearly complete. OpenVPN Access Server is now running on AWS, the client profile has been downloaded, and the private EC2 instance is quietly waiting inside the Private Subnet to be accessed.&lt;/p&gt;

&lt;p&gt;Now comes the most interesting part: turning your laptop on the public Internet into a member of the private AWS network through three simple steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the OpenVPN Client application installed earlier.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F907ygl88qmpspx06wm7t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F907ygl88qmpspx06wm7t.png" alt="OpenVPN Client Upload Profile" width="691" height="1190"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload the Connection Profile file downloaded in the previous step.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstrvytsz0w2lb5wurtt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstrvytsz0w2lb5wurtt3.png" alt="OpenVPN Client Import Profile" width="689" height="1177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Connect&lt;/strong&gt; and enter your password.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecnqjxwqkf2td88x8svt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecnqjxwqkf2td88x8svt.png" alt="OpenVPN Client Connect" width="390" height="670"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The moment the &lt;strong&gt;Connect&lt;/strong&gt; button is pressed, many things begin happening behind the scenes almost invisibly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenVPN Client starts the handshake process with the VPN Server&lt;/li&gt;
&lt;li&gt;Authentication is performed&lt;/li&gt;
&lt;li&gt;A TLS tunnel is established&lt;/li&gt;
&lt;li&gt;Certificates are validated&lt;/li&gt;
&lt;li&gt;The route table is updated&lt;/li&gt;
&lt;li&gt;A virtual network interface is created&lt;/li&gt;
&lt;li&gt;A VPN IP address is assigned to the device&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The entire process usually takes only a few seconds. If everything works correctly, the OpenVPN Client status will change to &lt;strong&gt;Securely Connected&lt;/strong&gt;, along with a small traffic graph.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen6iktjn326p6wqn4yoe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen6iktjn326p6wqn4yoe.png" alt="OpenVPN Client Connected" width="393" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the VPN connection is successfully established, your operating system will display a new virtual network interface. You can verify the new interface using the following commands:&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="c"&gt;# For Windows&lt;/span&gt;
ipconfig /all

&lt;span class="c"&gt;# For macOS&lt;/span&gt;
ifconfig

&lt;span class="c"&gt;# For Linux (Ubuntu, Debian, RHEL, ...)&lt;/span&gt;
ip addr show
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglbq1j9dmz4h9d4nx5iu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fglbq1j9dmz4h9d4nx5iu.png" alt="Verify New Interface" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to dig a little deeper, you can also inspect your operating system’s route table. You will notice that traffic destined for the AWS VPC is now routed through the VPN interface instead of going directly to the Internet.&lt;/p&gt;

&lt;p&gt;This mechanism that allows a private EC2 instance to remain without a Public IP address while still being securely accessible from your personal laptop.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Testing VPN Connectivity
&lt;/h3&gt;

&lt;p&gt;From the AWS VPC’s perspective, your computer has now become a member of the internal network. You now have a “secure tunnel” that allows access to resources inside the Private Subnet — in this case, establishing an SSH connection to the private instance &lt;code&gt;private-test-server&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When provisioning the AWS infrastructure, Terraform also creates an SSH key pair to provide authentication for the private instance. Run the following command to connect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-i&lt;/span&gt; vpn-demo-ssh-key.pem ec2-user@&amp;lt;Private-Instance-IP&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flghvbe8i6lalv2h3iq9c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flghvbe8i6lalv2h3iq9c.png" alt="Verify SSH Private EC2" width="799" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please note that you should configure secure file permissions for &lt;code&gt;vpn-demo-ssh-key.pem&lt;/code&gt; before executing the SSH command above.&lt;/p&gt;

&lt;p&gt;Once you successfully connect to the private EC2 instance, it proves that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The VPN tunnel is working correctly&lt;/li&gt;
&lt;li&gt;Routing has been configured properly&lt;/li&gt;
&lt;li&gt;Private resources can be accessed without exposing them to the public Internet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the true power of VPNs in cloud environments:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Keeping infrastructure private while still allowing operations teams to securely access resources whenever necessary.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At this point, everything is working successfully. You can try disconnecting the VPN session in the OpenVPN Client. The SSH connection will eventually time out because the private EC2 instance does not have a Public IP address and cannot be accessed directly from the Internet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fasxj3h2g48yz2fm7sq5t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fasxj3h2g48yz2fm7sq5t.png" alt="Verify SSH Private EC2 Failed" width="509" height="89"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Section 4 — Conclusion
&lt;/h2&gt;

&lt;p&gt;VPNs are far more than tools for masking IP addresses. It is also one of the most important solutions for protecting infrastructure and controlling access in cloud environments. Through this article, we explored the fundamental concepts of VPNs, how VPNs work, the problems they help solve, and successfully deployed OpenVPN Access Server on AWS to securely access private resources.&lt;/p&gt;

&lt;p&gt;Although VPNs significantly improve security, the VPN Server itself is also a critical access point that must be carefully protected. Some recommended security best practices include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use strong passwords and avoid using default accounts&lt;/li&gt;
&lt;li&gt;Enable MFA whenever possible&lt;/li&gt;
&lt;li&gt;Restrict Security Groups following the principle of least privilege&lt;/li&gt;
&lt;li&gt;Rotate credentials and certificates regularly&lt;/li&gt;
&lt;li&gt;Avoid directly exposing internal resources to the public Internet&lt;/li&gt;
&lt;li&gt;Monitor access logs to detect suspicious activities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding VPN fundamentals is essential for building secure cloud infrastructure. OpenVPN provides a practical and accessible way to implement secure remote access while keeping critical systems private.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;OpenVPN Documentation (&lt;a href="https://openvpn.net/as-docs/" rel="noopener noreferrer"&gt;https://openvpn.net/as-docs/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;AWS VPC Documentation (&lt;a href="https://docs.aws.amazon.com/vpc/?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/vpc/?utm_source=chatgpt.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;AWS EC2 Documentation (&lt;a href="https://docs.aws.amazon.com/ec2/?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/ec2/?utm_source=chatgpt.com&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>vpn</category>
    </item>
    <item>
      <title>Amazon EKS From The Ground Up - Part 2: Worker Nodes with AWS Managed Nodes</title>
      <dc:creator>Phu Hoang</dc:creator>
      <pubDate>Sat, 10 Jan 2026 08:03:00 +0000</pubDate>
      <link>https://dev.to/posibble/amazon-eks-from-the-ground-up-part-2-worker-nodes-in-aws-managed-nodes-way-en-1lhh</link>
      <guid>https://dev.to/posibble/amazon-eks-from-the-ground-up-part-2-worker-nodes-in-aws-managed-nodes-way-en-1lhh</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://dev.to/posibble/amazon-eks-from-the-ground-up-part-1-control-plane-infrastructure-47pf"&gt;&lt;strong&gt;Part 1&lt;/strong&gt;&lt;/a&gt;, we successfully finished building the EKS &lt;strong&gt;Control Plane&lt;/strong&gt;, we set up the VPC, Subnets, NAT Gateway, the Kubernetes API Server, and configured &lt;code&gt;kubectl&lt;/code&gt; connectivity.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VPC, Subnets, NAT&lt;/li&gt;
&lt;li&gt;Kubernetes API Server&lt;/li&gt;
&lt;li&gt;An IAM role with enough permissions for the Control Plane&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl&lt;/code&gt; already connected to the cluster&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But if you run:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;you’ll see… &lt;strong&gt;nothing&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That’s the real state of the cluster we created: it has a &lt;strong&gt;brain (Control Plane)&lt;/strong&gt;, but no &lt;strong&gt;hands and feet (Worker Nodes)&lt;/strong&gt;. Without compute capacity, the Kubernetes Scheduler can only stare at Pods stuck in the &lt;code&gt;Pending&lt;/code&gt; state.&lt;/p&gt;

&lt;p&gt;In this Part 2, we’ll “grow limbs” for your EKS cluster by deploying Worker Nodes using &lt;strong&gt;AWS Managed Nodes&lt;/strong&gt; - the most practical middle ground between production readiness and operational effort.&lt;/p&gt;

&lt;p&gt;This post won’t stop at “click and it works.” We’ll also explore what AWS quietly builds for you in a Managed Node Group, and contrast it with the &lt;strong&gt;Self-managed&lt;/strong&gt; way so you understand the fundamentals and can debug with confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  📝A Quick Primer on Worker Nodes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is a Worker Node, really?
&lt;/h3&gt;

&lt;p&gt;In the most accurate - and simplest - definition:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A Worker Node is an EC2 instance configured to run Kubernetes workloads (Pods).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At minimum, every worker node runs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;kubelet&lt;/code&gt; — the agent that talks to the Kubernetes API Server&lt;/li&gt;
&lt;li&gt;a container runtime — typically &lt;code&gt;containerd&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kube-proxy&lt;/code&gt; — manages service/network rules&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS VPC CNI&lt;/strong&gt; — the plugin that allocates Pod IPs from your VPC&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Following production best practices, EKS worker nodes usually live inside &lt;strong&gt;private subnets&lt;/strong&gt; without public IPs. That significantly reduces exposure: workloads are not directly reachable from the Internet, and outbound connectivity is handled through a &lt;strong&gt;NAT Gateway&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Worker Node Deployment Models
&lt;/h3&gt;

&lt;p&gt;AWS offers three main ways to run compute for EKS, each with a different balance of control, operational cost, and “serverless-ness”:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criteria&lt;/th&gt;
&lt;th&gt;Managed Nodes&lt;/th&gt;
&lt;th&gt;Self-managed Nodes&lt;/th&gt;
&lt;th&gt;AWS Fargate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Infrastructure&lt;/td&gt;
&lt;td&gt;EC2 Instances (partly managed by AWS)&lt;/td&gt;
&lt;td&gt;EC2 Instances (fully managed by you)&lt;/td&gt;
&lt;td&gt;Serverless (no nodes to manage)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Operational cost (OpEx)&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Very low&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Control&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Highest&lt;/td&gt;
&lt;td&gt;Lowest&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Billing&lt;/td&gt;
&lt;td&gt;Per EC2 instance&lt;/td&gt;
&lt;td&gt;Per EC2 instance&lt;/td&gt;
&lt;td&gt;Per Pod (CPU/Mem)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Fargate hides almost everything—including the “node layer.” That’s convenient, but if your goal is to understand EKS fundamentals, the interesting engineering happens in Managed Nodes vs Self-managed Nodes.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criteria&lt;/th&gt;
&lt;th&gt;Managed Nodes (Managed Node Group)&lt;/th&gt;
&lt;th&gt;Self-managed Nodes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Node creation&lt;/td&gt;
&lt;td&gt;EKS Console or CLI command creates a Node Group&lt;/td&gt;
&lt;td&gt;EC2 Launch Template + ASG +  User Data (bootstrap)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ASG management&lt;/td&gt;
&lt;td&gt;AWS manages the Auto Scaling Group lifecycle&lt;/td&gt;
&lt;td&gt;You manage the ASG entirely&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cluster Join&lt;/td&gt;
&lt;td&gt;AWS automatically handles the wiring and credentials for join&lt;/td&gt;
&lt;td&gt;You must provide user data calling &lt;code&gt;/etc/eks/bootstrap.sh&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Node auth mapping (IAM→ RBAC)&lt;/td&gt;
&lt;td&gt;AWS typically maps the Node Role automatically&lt;/td&gt;
&lt;td&gt;You must manually update &lt;code&gt;aws-auth&lt;/code&gt; to map the Node Role&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Upgrades/Updates&lt;/td&gt;
&lt;td&gt;Built-in, managed rolling update workflows&lt;/td&gt;
&lt;td&gt;You design and manage &lt;code&gt;drain&lt;/code&gt; / &lt;code&gt;replace&lt;/code&gt; strategies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debug level&lt;/td&gt;
&lt;td&gt;Fewer common traps, higher abstraction&lt;/td&gt;
&lt;td&gt;More control, but more responsibility for low-level configuration&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  What AWS does for you in a Managed Node Group
&lt;/h3&gt;

&lt;p&gt;When you click &lt;strong&gt;Create Node Group&lt;/strong&gt;, AWS typically handles a long checklist that Self-managed nodes would require you to build manually:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creates an &lt;strong&gt;Auto Scaling Group&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Picks an &lt;strong&gt;EKS-Optimized AMI&lt;/strong&gt; compatible with your cluster version&lt;/li&gt;
&lt;li&gt;Creates/manages a &lt;strong&gt;Launch Template&lt;/strong&gt; (or uses one you provide)&lt;/li&gt;
&lt;li&gt;Attaches an &lt;strong&gt;IAM Instance Profile&lt;/strong&gt; using your Node IAM Role&lt;/li&gt;
&lt;li&gt;Injects the bootstrap configuration so nodes can join the cluster&lt;/li&gt;
&lt;li&gt;Automates the node registration path&lt;/li&gt;
&lt;li&gt;Provides a &lt;strong&gt;rolling update workflow&lt;/strong&gt; for node group upgrades&lt;/li&gt;
&lt;li&gt;Typically handles node role mapping into the cluster auth mechanism&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Recommendation: Use Managed Nodes for most production setups to reduce operational overhead. Choose Self-managed only when you have very specific requirements (custom OS hardening, special bootstrap, deep control of the node lifecycle).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Cluster IAM Role vs Node IAM Role
&lt;/h3&gt;

&lt;p&gt;This is one of the most common points of confusion, so let’s make it crystal clear.&lt;/p&gt;

&lt;h4&gt;
  
  
  Cluster IAM Role
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Used by the &lt;strong&gt;EKS Control Plane&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Allows the Control Plane to manage ENIs and interact with your VPC resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This role is &lt;strong&gt;not&lt;/strong&gt; meant for workloads.&lt;/p&gt;

&lt;h4&gt;
  
  
  Node IAM Role
&lt;/h4&gt;

&lt;p&gt;Worker nodes need a Node IAM Role to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Join the cluster&lt;/li&gt;
&lt;li&gt;Allow the VPC CNI to attach ENIs and allocate Pod IPs&lt;/li&gt;
&lt;li&gt;Pull images from ECR&lt;/li&gt;
&lt;li&gt;Access other required AWS APIs (later: secrets, parameters, logs, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your worker nodes won’t become &lt;code&gt;Ready&lt;/code&gt; without (at least) these managed policies:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Policy&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonEKSWorkerNodePolicy.html" rel="noopener noreferrer"&gt;&lt;code&gt;AmazonEKSWorkerNodePolicy&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Join cluster, talk to the API Server&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonEKS_CNI_Policy.html" rel="noopener noreferrer"&gt;&lt;code&gt;AmazonEKS_CNI_Policy&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Attach ENIs, allocate Pod IPs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonEC2ContainerRegistryReadOnly.html" rel="noopener noreferrer"&gt;&lt;code&gt;AmazonEC2ContainerRegistryReadOnly&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Pull images from ECR&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  AWS IAM &amp;amp; Kubernetes Authentication
&lt;/h3&gt;

&lt;p&gt;Access to an EKS cluster is a combination of two layers: &lt;strong&gt;AWS IAM&lt;/strong&gt; &amp;amp; &lt;strong&gt;Kubernetes RBAC&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  IAM = Authentication
&lt;/h4&gt;

&lt;p&gt;IAM answers: &lt;strong&gt;“Who are you?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a principal (an EC2 node or a human user) calls the Kubernetes API Server, EKS uses IAM authentication to verify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which IAM principal (Role/User) the request comes from&lt;/li&gt;
&lt;li&gt;Whether the request has a valid SigV4 signature&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;✅ This is why worker nodes must have a proper Node IAM Role attached.&lt;/p&gt;

&lt;h4&gt;
  
  
  Kubernetes RBAC = Authorization
&lt;/h4&gt;

&lt;p&gt;RBAC answers: &lt;strong&gt;“What are you allowed to do?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even if IAM authentication succeeds, the API call can still fail with &lt;code&gt;Forbidden&lt;/code&gt; if RBAC doesn’t grant the required permissions.&lt;/p&gt;

&lt;h4&gt;
  
  
  Bridging the two worlds: mapping IAM → Kubernetes identity
&lt;/h4&gt;

&lt;p&gt;After IAM authentication, EKS maps IAM identity into Kubernetes users/groups so RBAC can evaluate permissions. Two common mechanisms exist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;aws-auth ConfigMap&lt;/strong&gt; (classic, still widely used), example:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;mapRoles&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
  &lt;span class="s"&gt;- rolearn: arn:aws:iam::&amp;lt;account-id&amp;gt;:role/EKSNodeRole&lt;/span&gt;
    &lt;span class="s"&gt;username: system:node:{{EC2PrivateDNSName}}&lt;/span&gt;
    &lt;span class="s"&gt;groups:&lt;/span&gt;
      &lt;span class="s"&gt;- system:bootstrappers&lt;/span&gt;
      &lt;span class="s"&gt;- system:nodes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;EKS Access Entries / Access Policies&lt;/strong&gt; (newer Console-based approach)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this article:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Nodes&lt;/strong&gt; must be mapped into groups like &lt;code&gt;system:bootstrappers&lt;/code&gt; and &lt;code&gt;system:nodes&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Humans/admins&lt;/strong&gt; are commonly mapped to &lt;code&gt;system:masters&lt;/code&gt; or granted an equivalent Access Policy&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hands-on Time
&lt;/h2&gt;

&lt;p&gt;The AWS architecture after completing the steps below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15xyqwg5xsilfrfuvwve.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15xyqwg5xsilfrfuvwve.png" alt="part_2_aws_architecture.png" width="800" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 0 — Preparation
&lt;/h3&gt;

&lt;p&gt;Make sure all resources from Part 1 are created correctly and your cluster is &lt;code&gt;ACTIVE&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 — Create the IAM Role for Worker Nodes
&lt;/h3&gt;

&lt;p&gt;Open the AWS Console:&lt;/p&gt;

&lt;p&gt;→ Go to &lt;strong&gt;IAM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Choose &lt;strong&gt;Roles&lt;/strong&gt; → &lt;strong&gt;Create role&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Configure &lt;strong&gt;Trusted entity&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trusted entity type: &lt;strong&gt;AWS service&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Service or use case: &lt;strong&gt;EC2&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use case: &lt;strong&gt;EC2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb75z1neletp23m4ijeox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb75z1neletp23m4ijeox.png" alt="part_2_IAM_Role_create_step_1.png" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ Click &lt;strong&gt;Next&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Attach policies:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AmazonEKSWorkerNodePolicy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AmazonEKS_CNI_Policy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;AmazonEC2ContainerRegistryReadOnly&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ Role name: &lt;code&gt;EKSNodeRole&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Click &lt;strong&gt;Create role&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj5exsoblbo20litvd46o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj5exsoblbo20litvd46o.png" alt="part_2_IAM_Role_create_step_3.png" width="800" height="714"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Create a Managed Node Group
&lt;/h3&gt;

&lt;p&gt;→ Open the &lt;strong&gt;EKS&lt;/strong&gt; service&lt;/p&gt;

&lt;p&gt;→ Select cluster &lt;code&gt;demo-eks-cluster&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Go to &lt;strong&gt;Compute&lt;/strong&gt; → &lt;strong&gt;Add node group&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb50cnftd7fl7zey42p26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb50cnftd7fl7zey42p26.png" alt="part_2_eks_compute_add.png" width="800" height="622"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Configure node group
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Name: &lt;code&gt;eks-mng-general&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Node IAM role: &lt;code&gt;EKSNodeRole&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fffnxs5h7hi41lweoptn2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fffnxs5h7hi41lweoptn2.png" alt="part_2_eks_add_node_group_step_1.png" width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Configure compute &amp;amp; scaling
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;AMI type: &lt;strong&gt;EKS optimized&lt;/strong&gt; (Amazon Linux / Bottlerocket)&lt;/li&gt;
&lt;li&gt;Capacity type: &lt;strong&gt;On-Demand&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Instance type: &lt;code&gt;t3.medium&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Disk size: 20 GiB&lt;/li&gt;
&lt;li&gt;Scaling:

&lt;ul&gt;
&lt;li&gt;Desired: 2&lt;/li&gt;
&lt;li&gt;Min: 1&lt;/li&gt;
&lt;li&gt;Max: 3&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ Keep other settings as default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftisi3i2bmwqaa8mdrldb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftisi3i2bmwqaa8mdrldb.png" alt="part_2_eks_add_node_group_step_2.png" width="800" height="708"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ Click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Configure networking
&lt;/h4&gt;

&lt;p&gt;Select &lt;strong&gt;only the two private subnets&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is critical: subnet selection here determines where your worker nodes live. Private subnets are ideal for production worker nodes because they don’t expose instances to the Internet.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxq0cz5fonl5iyn8rtzk5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxq0cz5fonl5iyn8rtzk5.png" alt="part_2_eks_add_node_group_step_3.png" width="799" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ Click &lt;strong&gt;Next&lt;/strong&gt; → &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Wait until the node group status becomes &lt;strong&gt;Active&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8wf3fbu839xqmrmygf8p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8wf3fbu839xqmrmygf8p.png" alt="part_2_eks_node_group_active.png" width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 - Join the Cluster - AWS handles it
&lt;/h3&gt;

&lt;p&gt;You don’t need to manually configure bootstrap steps for a Managed Node Group - but understanding the join flow is what makes you effective at troubleshooting.&lt;/p&gt;

&lt;h4&gt;
  
  
  3.1 Node join flow
&lt;/h4&gt;

&lt;p&gt;When you create a Managed Node Group, AWS launches EC2 worker nodes. Each instance gets an &lt;strong&gt;Instance Profile&lt;/strong&gt; containing your &lt;strong&gt;Node IAM Role&lt;/strong&gt; (&lt;code&gt;EKSNodeRole&lt;/code&gt;). The join flow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The EC2 instance boots using an EKS-Optimized AMI&lt;/li&gt;
&lt;li&gt;Bootstrap config provides &lt;code&gt;kubelet&lt;/code&gt; with:

&lt;ul&gt;
&lt;li&gt;cluster name&lt;/li&gt;
&lt;li&gt;API endpoint&lt;/li&gt;
&lt;li&gt;cluster CA certificate&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubelet&lt;/code&gt; calls the Kubernetes API Server to register the node&lt;/li&gt;
&lt;li&gt;EKS performs &lt;strong&gt;IAM authentication&lt;/strong&gt; and identifies the IAM Role from the instance profile&lt;/li&gt;
&lt;li&gt;EKS maps IAM identity → Kubernetes identity via &lt;strong&gt;aws-auth / Access Entries&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;If mapping is valid (node is in &lt;code&gt;system:nodes&lt;/code&gt;), the node becomes &lt;strong&gt;Ready&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In short: nodes don’t “join by Kubernetes magic.” They join because:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;IAM authentication proves identity + Kubernetes group mapping allows the node role to function.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  3.2 What Managed Node Group eliminates compared to Self-managed
&lt;/h4&gt;

&lt;p&gt;With Self-managed nodes, you must build the join path yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create Launch Template (AMI, instance profile, user data)&lt;/li&gt;
&lt;li&gt;Ensure bootstrap via &lt;code&gt;/etc/eks/bootstrap.sh &amp;lt;cluster-name&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create ASG and subnet placement&lt;/li&gt;
&lt;li&gt;Manually update &lt;code&gt;aws-auth&lt;/code&gt; to map the node role into:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;system:bootstrappers&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;system:nodes&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Managed Node Groups remove most of this plumbing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 — Verify
&lt;/h3&gt;

&lt;p&gt;This is the moment your EKS cluster finally starts to feel alive.&lt;/p&gt;

&lt;h4&gt;
  
  
  4.1 Verify with kubectl
&lt;/h4&gt;

&lt;p&gt;→ Open a terminal 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;kubectl get nodes &lt;span class="nt"&gt;-o&lt;/span&gt; wide
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ Then check system pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl get pods &lt;span class="nt"&gt;-n&lt;/span&gt; kube-system

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected results:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You should see &lt;strong&gt;two nodes&lt;/strong&gt; (based on desired size), in &lt;code&gt;Ready&lt;/code&gt; state&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;coredns&lt;/code&gt;, &lt;code&gt;metrics-server&lt;/code&gt;, and &lt;code&gt;kube-proxy&lt;/code&gt; should transition to &lt;code&gt;Running&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwhce8dpvqhww2p50aqz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwhce8dpvqhww2p50aqz.png" alt="part_2_verify_kubectl.png" width="800" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  4.2 What AWS resources were created behind the scenes?
&lt;/h4&gt;

&lt;p&gt;Now let’s satisfy curiosity and confirm what AWS created inside your account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(1) Auto Scaling Group&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Open EKS Service &lt;/p&gt;

&lt;p&gt;→ Select EKS cluster &lt;code&gt;demo-eks-cluster&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;→ Click &lt;strong&gt;Compute&lt;/strong&gt; tab&lt;/p&gt;

&lt;p&gt;→ Select node group &lt;code&gt;eks-mng-general&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe64k3fdjwlq4pvl97zo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe64k3fdjwlq4pvl97zo3.png" alt="part_2_verify_node_group.png" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ In &lt;strong&gt;Details&lt;/strong&gt;, click the &lt;strong&gt;Auto Scaling Group&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8o3hxqrn62muwta1o2mw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8o3hxqrn62muwta1o2mw.png" alt="part_2_verify_asg.png" width="800" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inside the ASG page, you’ll find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Desired / Min / Max configuration&lt;/li&gt;
&lt;li&gt;EC2 instances in &lt;code&gt;InService&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Launch Template reference&lt;/li&gt;
&lt;li&gt;Security Groups&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1o7ivyljqg2wwcb4scrt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1o7ivyljqg2wwcb4scrt.png" alt="part_2_verify_asg_detail.png" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(2) Launch Template&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From the ASG page:&lt;/p&gt;

&lt;p&gt;→ Click the &lt;strong&gt;Launch template&lt;/strong&gt; link.&lt;/p&gt;

&lt;p&gt;You’ll see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AMI ID&lt;/li&gt;
&lt;li&gt;Instance type&lt;/li&gt;
&lt;li&gt;Security groups attached&lt;/li&gt;
&lt;li&gt;User data/bootstrap wiring (partly hidden, but it’s there)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu20mcj1umutg04usank5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu20mcj1umutg04usank5.png" alt="part_2_verify_launch_template.png" width="800" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(3) Security Group for worker nodes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From the ASG details page&lt;/p&gt;

&lt;p&gt;→ Click the &lt;strong&gt;Security group IDs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Review inbound/outbound rules applied to worker nodes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Pitfalls
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1) Node group is Active, but &lt;code&gt;kubectl get nodes&lt;/code&gt; shows nothing
&lt;/h3&gt;

&lt;p&gt;Likely causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The node group is using the wrong IAM role (not &lt;code&gt;EKSNodeRole&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Node IAM role is missing required policies&lt;/li&gt;
&lt;li&gt;Wrong subnet selection or private subnet route tables are incorrect&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2) Instances keep launching and terminating in the ASG
&lt;/h3&gt;

&lt;p&gt;Likely causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instance type capacity shortage → try a more common type (&lt;code&gt;t3.large&lt;/code&gt;, &lt;code&gt;m5.large&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Subnet/AZ constraints → expand to more AZs/subnets&lt;/li&gt;
&lt;li&gt;EC2 quota limits → request quota increase&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3) Pods stuck in &lt;code&gt;Pending&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Likely causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Insufficient node resources (CPU/memory) → choose a larger instance type&lt;/li&gt;
&lt;li&gt;Taints/labels preventing scheduling → remove taints or adjust selectors&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4) &lt;code&gt;ImagePullBackOff&lt;/code&gt; / &lt;code&gt;ErrImagePull&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Likely causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Private subnets have no NAT gateway, or routes are wrong&lt;/li&gt;
&lt;li&gt;DNS resolution is broken → check VPC settings (&lt;strong&gt;DNS resolution&lt;/strong&gt; and &lt;strong&gt;DNS hostnames&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In Part 2, we:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Added production-style worker nodes (private subnets) so workloads finally have somewhere to run&lt;/li&gt;
&lt;li&gt;Clearly separated Cluster Role vs Node Role&lt;/li&gt;
&lt;li&gt;Covered the IAM → Kubernetes authentication story&lt;/li&gt;
&lt;li&gt;Explored what a Managed Node Group creates behind the scenes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next, in &lt;strong&gt;Part 3&lt;/strong&gt;, we’ll go deeper into EKS networking: VPC CNI, ENIs, Pod IP allocation, and traffic flow debugging.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>eks</category>
      <category>devops</category>
    </item>
    <item>
      <title>Amazon EKS From The Ground Up - Part 1: Control Plane &amp; Infrastructure</title>
      <dc:creator>Phu Hoang</dc:creator>
      <pubDate>Thu, 25 Dec 2025 10:25:30 +0000</pubDate>
      <link>https://dev.to/posibble/amazon-eks-from-the-ground-up-part-1-control-plane-infrastructure-47pf</link>
      <guid>https://dev.to/posibble/amazon-eks-from-the-ground-up-part-1-control-plane-infrastructure-47pf</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As a DevOps engineer, the ability to provision and manage Kubernetes clusters efficiently is essential. Amazon EKS (Elastic Kubernetes Service) makes this significantly easier—you can create an EKS cluster with just a single command or a few clicks in the AWS Console.&lt;/p&gt;

&lt;p&gt;While you’re sipping your coffee, however, &lt;strong&gt;a lot is happening behind the scenes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This article is the first part of a deep-dive series that breaks down those behind-the-scenes actions. We will examine the components that make up an Amazon EKS cluster, focusing specifically on the &lt;strong&gt;Infrastructure layer&lt;/strong&gt; and &lt;strong&gt;IAM &amp;amp; Security&lt;/strong&gt;, which form the foundation of everything that comes later.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Brief Concept of EKS
&lt;/h2&gt;

&lt;p&gt;Amazon EKS is a managed Kubernetes service that allows you to run Kubernetes without having to operate the Control Plane yourself.&lt;/p&gt;

&lt;p&gt;In simple terms, EKS handles the two most difficult aspects of running Kubernetes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Setting up and managing the Control Plane&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Control Plane is the “brain” of Kubernetes. It consists of the API server, the etcd database (which stores cluster state), the scheduler, and the controller manager. AWS ensures that this Control Plane is highly available, secure, and continuously patched.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Deep integration with AWS services&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;EKS tightly integrates Kubernetes with core AWS services such as VPC networking, IAM-based security, and Elastic Load Balancing.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Building the Foundation – Infrastructure First
&lt;/h2&gt;

&lt;p&gt;A very common misconception among newcomers is the following:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;EKS = Kubernetes, and AWS handles everything.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In reality, EKS is split into two distinct responsibility domains:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component Partition&lt;/th&gt;
&lt;th&gt;Components&lt;/th&gt;
&lt;th&gt;Management Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AWS-managed (Control Plane)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;API Server, etcd, Scheduler, Controller Manager&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;AWS&lt;/strong&gt; (not configurable)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Your AWS Account (Data Plane &amp;amp; Networking)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;VPC, Subnets, Security Groups, IAM Roles, EC2 Worker Nodes or Fargate Pods&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;You&lt;/strong&gt; (must be designed and maintained)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For this reason, the remainder of this article focuses on &lt;strong&gt;the infrastructure that you are responsible for&lt;/strong&gt;, before the EKS Control Plane is even created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmoq6sdk57gxjrbuop5dp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmoq6sdk57gxjrbuop5dp.png" alt="part_1_architecture" width="800" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 0 – Preparing the Tools
&lt;/h2&gt;

&lt;p&gt;Before creating the EKS cluster, ensure you have the following ready:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account with access to the AWS Console&lt;/li&gt;
&lt;li&gt;AWS CLI installed and configured&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;kubectl&lt;/code&gt; installed&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Although this article is console-first, we will use the CLI to verify and explain what happens under the hood.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 – Preparing the VPC
&lt;/h2&gt;

&lt;p&gt;The EKS Control Plane itself does &lt;strong&gt;not&lt;/strong&gt; run inside your VPC. However, you still need a VPC for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 worker nodes&lt;/li&gt;
&lt;li&gt;Pod IP address allocation&lt;/li&gt;
&lt;li&gt;Security groups to control traffic&lt;/li&gt;
&lt;li&gt;Internet or NAT access for outbound communication&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short: &lt;strong&gt;without a properly designed VPC, EKS cannot function.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1.1. Actions in the AWS Console
&lt;/h3&gt;

&lt;p&gt;→ Open the &lt;strong&gt;Amazon VPC&lt;/strong&gt; service&lt;/p&gt;

&lt;p&gt;→ Click &lt;strong&gt;Create VPC&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Choose &lt;strong&gt;VPC and more&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Recommended Configuration (Practice / Production-Ready Baseline)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;eks-demo-vpc&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IPv4 CIDR&lt;/td&gt;
&lt;td&gt;&lt;code&gt;10.0.0.0/16&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Availability Zones&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;High availability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Public subnets&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Used for NAT Gateways and public load balancers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Private subnets&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Where worker nodes will run&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NAT Gateway&lt;/td&gt;
&lt;td&gt;1 per AZ&lt;/td&gt;
&lt;td&gt;Required for outbound access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DNS Hostnames&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Enabled&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Required for nodes to resolve the API server&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xwh5t807c2s2zk3ml1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xwh5t807c2s2zk3ml1p.png" alt="image.png" width="800" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 – Adding Tags to Subnets
&lt;/h2&gt;

&lt;p&gt;Amazon EKS does &lt;strong&gt;not&lt;/strong&gt; automatically infer which subnets it should use. Many EKS features—especially the AWS Load Balancer Controller—depend entirely on &lt;strong&gt;subnet tags&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.1. Required Tags
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Cluster discovery tag&lt;/strong&gt; (required on &lt;strong&gt;all&lt;/strong&gt; subnets):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubernetes.io/cluster/demo-eks-cluster = shared
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Public load balancer subnets&lt;/strong&gt; (public subnets only):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubernetes.io/role/elb=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Internal load balancer subnets&lt;/strong&gt; (private subnets only):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubernetes.io/role/internal-elb =1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Incorrect or missing tags are one of the most common causes of load balancer failures in EKS.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2. Actions in the AWS Console
&lt;/h3&gt;

&lt;p&gt;→ Open &lt;strong&gt;VPC → Subnets&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Locate subnets named &lt;code&gt;eks-demo-subnet-*&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Select &lt;code&gt;eks-demo-subnet-public1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Open the &lt;strong&gt;Tags&lt;/strong&gt; tab → &lt;strong&gt;Manage tags&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fem8reh809q22sledevkr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fem8reh809q22sledevkr.png" alt="image.png" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ Add tags:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kubernetes.io/cluster/demo-eks-cluster = shared&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubernetes.io/role/elb = 1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ Save&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldrizcuxko86xl9yguug.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldrizcuxko86xl9yguug.png" alt="image.png" width="799" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Repeat for &lt;code&gt;eks-demo-subnet-public2&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7pr5x4430cshv3ayn2l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7pr5x4430cshv3ayn2l.png" alt="image.png" width="799" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For each private subnets, add tags:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kubernetes.io/cluster/demo-eks-cluster = shared&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubernetes.io/role/internal-elb = 1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ge22vljm6npfaaj5ru4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ge22vljm6npfaaj5ru4.png" alt="image.png" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbb7qvrpeypa2qt5p6g1r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbb7qvrpeypa2qt5p6g1r.png" alt="image.png" width="800" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 - Add a dedicated Security Group for the EKS Cluster
&lt;/h2&gt;

&lt;p&gt;In this step, we’ll create a &lt;strong&gt;separate Security Group&lt;/strong&gt; for the EKS cluster. The goal is to establish a clean security boundary early (even if you’re still in the “control plane only” stage).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inbound:&lt;/strong&gt; allow internal traffic within the same Security Group so EKS-related components that share this SG can communicate with each other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outbound:&lt;/strong&gt; allow outbound traffic so the cluster and its components can reach required endpoints (e.g., AWS APIs, image registries, etc.).&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: This is a learning/bootstrapping-friendly baseline. In production, you typically tighten inbound/outbound rules based on actual traffic requirements.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3.1. Actions in the AWS Console
&lt;/h3&gt;

&lt;p&gt;→ Open &lt;strong&gt;VPC&lt;/strong&gt; service&lt;/p&gt;

&lt;p&gt;→ Go to &lt;strong&gt;Security Groups&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Configure the Security Group&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security group name:&lt;/strong&gt; &lt;code&gt;eks-cluster-sg&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VPC:&lt;/strong&gt; &lt;code&gt;eks-demo-vpc&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→  Add (or keep) this outbound rule:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Protocol&lt;/th&gt;
&lt;th&gt;Port range&lt;/th&gt;
&lt;th&gt;Destination&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;All traffic&lt;/td&gt;
&lt;td&gt;All&lt;/td&gt;
&lt;td&gt;All&lt;/td&gt;
&lt;td&gt;0.0.0.0/0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fno8hk6ia1raa029xs6ef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fno8hk6ia1raa029xs6ef.png" alt="image.png" width="800" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ Then click &lt;strong&gt;Create security group&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now we’ll allow “intra-SG” traffic:&lt;/p&gt;

&lt;p&gt;→ Select the Security Group &lt;strong&gt;&lt;code&gt;eks-cluster-sg&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Open the &lt;strong&gt;Inbound rules&lt;/strong&gt; tab → click &lt;strong&gt;Edit inbound rules&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Add a new rule:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Protocol&lt;/th&gt;
&lt;th&gt;Port range&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;All traffic&lt;/td&gt;
&lt;td&gt;All&lt;/td&gt;
&lt;td&gt;All&lt;/td&gt;
&lt;td&gt;Custom → &lt;strong&gt;Security group&lt;/strong&gt;: &lt;code&gt;eks-cluster-sg&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;→ Save the rule.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe41jkdfnu9qucb4m9oph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe41jkdfnu9qucb4m9oph.png" alt=" " width="799" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4 – Creating the IAM Role for the EKS Control Plane
&lt;/h2&gt;

&lt;p&gt;Although AWS manages the Control Plane, it still needs permissions to interact with resources in &lt;strong&gt;your AWS account&lt;/strong&gt;, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creating and managing ENIs&lt;/li&gt;
&lt;li&gt;Attaching security groups&lt;/li&gt;
&lt;li&gt;Communicating with VPC resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is achieved through an &lt;strong&gt;IAM Role&lt;/strong&gt; that the EKS service assumes.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.1. Actions in the AWS Console
&lt;/h3&gt;

&lt;p&gt;→ Open &lt;strong&gt;IAM → Roles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Click &lt;strong&gt;Create role&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vib2v17i6kl7t79h7dp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6vib2v17i6kl7t79h7dp.png" alt="image.png" width="799" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ Trusted entity:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type: &lt;strong&gt;AWS service&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Service: &lt;strong&gt;EKS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use case: &lt;strong&gt;EKS – Cluster&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmkxgzwo9gcj3irhwrz8l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmkxgzwo9gcj3irhwrz8l.png" alt="image.png" width="800" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ Continue to permissions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;AmazonEKSClusterPolicy&lt;/code&gt; is attached automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fcc6y77da2mhypo8l5u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fcc6y77da2mhypo8l5u.png" alt="image.png" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;→ Name the role: &lt;code&gt;EKSClusterRole&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Create the role&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxx9jfc34iqzkx8s6ix25.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxx9jfc34iqzkx8s6ix25.png" alt="image.png" width="800" height="777"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4.2. Trust Policy Explanation
&lt;/h3&gt;

&lt;p&gt;The role’s trust policy contains the following statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Service"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"eks.amazonaws.com"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"sts:AssumeRole"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“Allow the EKS service to assume this role and call AWS APIs using the permissions defined in &lt;code&gt;AmazonEKSClusterPolicy&lt;/code&gt;.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Granting only this policy follows the &lt;strong&gt;Principle of Least Privilege&lt;/strong&gt; and is sufficient for the Control Plane to operate correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5 – Creating the EKS Cluster
&lt;/h2&gt;

&lt;p&gt;With the infrastructure and IAM role in place, we can now create the Control Plane.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1. Actions in the AWS Console
&lt;/h3&gt;

&lt;p&gt;→ Open &lt;strong&gt;Amazon EKS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Click &lt;strong&gt;Create cluster&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Choose &lt;strong&gt;Custom configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Disable &lt;strong&gt;EKS Auto Mode&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Cluster Configuration step:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Name: &lt;code&gt;demo-eks-cluster&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ IAM role: &lt;code&gt;EKSClusterRole&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Kubernetes version: &lt;strong&gt;1.34&lt;/strong&gt; (latest stable at the time of writing)&lt;/p&gt;

&lt;p&gt;→ Leave other settings as default&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsv822piuad9q9gvug45s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsv822piuad9q9gvug45s.png" alt="image.png" width="800" height="771"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Networking Configuration step:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ VPC: &lt;code&gt;eks-demo-vpc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Subnets: &lt;strong&gt;select all 4 subnets&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Security group: &lt;code&gt;eks-cluster-sg&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;→ Endpoint access: &lt;strong&gt;Public and Private&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Public + Private access allows management from your local machine while ensuring worker nodes communicate internally within the VPC.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpca0ju29s7wyacazqve7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpca0ju29s7wyacazqve7.png" alt="image.png" width="800" height="886"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Logging Configuration step:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Enable the following logs (recommended):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API server&lt;/li&gt;
&lt;li&gt;Audit&lt;/li&gt;
&lt;li&gt;Authenticator&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frq5j0e5cy64evi4bjp1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frq5j0e5cy64evi4bjp1b.png" alt="image.png" width="800" height="717"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Add-ons Configuration step:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;→ Keep the AWS-recommended defaults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;kube-proxy&lt;/li&gt;
&lt;li&gt;Amazon VPC CNI&lt;/li&gt;
&lt;li&gt;Node monitoring agent&lt;/li&gt;
&lt;li&gt;CoreDNS&lt;/li&gt;
&lt;li&gt;Amazon EKS Pod Identity Agent&lt;/li&gt;
&lt;li&gt;External DNS&lt;/li&gt;
&lt;li&gt;Metrics Server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ Click &lt;strong&gt;Create&lt;/strong&gt; and wait for the cluster status to become &lt;strong&gt;Healthy&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fylqf3k88a8ce0dgiylzd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fylqf3k88a8ce0dgiylzd.png" alt="image.png" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Behind the scenes, this is equivalent to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws eks create-cluster &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; demo-eks-cluster &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--role-arn&lt;/span&gt; arn:aws:iam::&amp;lt;account-id&amp;gt;:role/EKSClusterRole &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--resources-vpc-config&lt;/span&gt; &lt;span class="nv"&gt;subnetIds&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;subnet-public1&amp;gt;,&amp;lt;subnet-public2&amp;gt;,&amp;lt;subnet-private1&amp;gt;,&amp;lt;subnet-private2&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which do you prefer AWS Console or AWS CLI? 😉&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6 – Connecting and Verifying the Cluster
&lt;/h2&gt;

&lt;p&gt;Once the cluster is &lt;strong&gt;ACTIVE&lt;/strong&gt;, connect to it from your local machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.1 Fetching the kubeconfig
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws eks update-kubeconfig &lt;span class="nt"&gt;--name&lt;/span&gt; demo-eks-cluster &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retrieves the API endpoint&lt;/li&gt;
&lt;li&gt;Updates &lt;code&gt;~/.kube/config&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Configures authentication using your current IAM identity&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  6.2 Verifying the Cluster
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl cluster-info
kubectl get namespaces
kubectl get nodes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Expected Results
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cluster-info&lt;/code&gt;: API server is reachable&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get namespaces&lt;/code&gt;: default namespaces are listed&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;get nodes&lt;/code&gt;: &lt;strong&gt;no nodes returned&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is expected.&lt;/p&gt;

&lt;p&gt;The Control Plane is ready, but &lt;strong&gt;no worker nodes exist yet&lt;/strong&gt;, so Kubernetes has no compute capacity to schedule Pods. Core system Pods such as CoreDNS remain in the &lt;code&gt;Pending&lt;/code&gt; state.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9cd3qvkbxgcrgirl1769.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9cd3qvkbxgcrgirl1769.png" alt="image.png" width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this first part of the series, we built the foundation of an Amazon EKS cluster from the ground up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Designed a production-ready VPC with properly tagged subnets&lt;/li&gt;
&lt;li&gt;Created an IAM role for the EKS Control Plane&lt;/li&gt;
&lt;li&gt;Provisioned the EKS Control Plane with secure endpoint access&lt;/li&gt;
&lt;li&gt;Verified connectivity while intentionally stopping before worker nodes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point, we have built the &lt;strong&gt;brain&lt;/strong&gt; of Kubernetes.&lt;/p&gt;

&lt;p&gt;It is powered on, networked, and authorized—but it is still waiting for its “hands”.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>aws</category>
      <category>eks</category>
    </item>
  </channel>
</rss>
