AWS Builder Center

Building a Practical Jenkins and Kubernetes Lab on AWS

A practical hands-on guide to building a cost-conscious AWS DevOps lab with Jenkins, Kubernetes, Terraform, and CI/CD, focusing on real-world cloud infrastructure and automation.

Passing an AWS certification is one thing. Building and operating real infrastructure is another.
As an AWS Certified Solutions Architect – Associate, I wanted to go beyond studying architecture diagrams and put the concepts into practice by building a small DevOps laboratory on AWS.
The goal is simple: create an environment where I can experiment with Jenkins, Kubernetes, containers, networking, IAM, and CI/CD while keeping the infrastructure small and cost-conscious.

Why build a lab on AWS?

There is a big difference between understanding how a service works and actually operating it.
A hands-on environment makes it possible to experiment with questions such as:
  • How should Jenkins communicate with a Kubernetes cluster?
  • How should workloads be exposed to the Internet?
  • How should IAM permissions be structured?
  • What happens when a Kubernetes node disappears?
  • How should secrets be handled?
  • How can CI/CD automatically build and deploy an application?
  • How much infrastructure is actually required for a small environment?
These are the kinds of questions that are difficult to answer completely from documentation alone.

The architecture

For the initial laboratory, I am aiming for a deliberately small architecture:
Internet
|
AWS Network
|
+--------------+
| Jenkins |
+--------------+
|
| CI/CD
v
+-------------------+
| Kubernetes |
| Cluster |
+-------------------+
| |
v v
App Pod App Pod
The objective isn't to build a production-scale platform.
Instead, the goal is to create something small enough to understand completely while still exposing the major components found in real DevOps environments.

Jenkins

Jenkins provides the CI/CD component of the laboratory.
A typical pipeline could eventually perform:
  1. Pull source code from Git.
  1. Run unit tests.
  1. Build the application.
  1. Build a container image.
  1. Push the image to a container registry.
  1. Deploy the new version to Kubernetes.
  1. Verify the deployment.
This creates a useful connection between application development and AWS infrastructure.
The important part is that Jenkins itself becomes part of the infrastructure that needs to be secured, monitored, upgraded, and maintained.

Kubernetes

Kubernetes provides the container orchestration layer.
For the initial experiments, I want to keep the cluster deliberately small.
The first exercises will include:
  • Deploying applications
  • Services
  • ConfigMaps
  • Secrets
  • Namespaces
  • Resource limits
  • Rolling deployments
  • Health checks
  • Scaling
  • Ingress
  • Persistent storage
Once those fundamentals work, the environment can be expanded to investigate more advanced topics.

AWS networking

The laboratory is also an opportunity to practice AWS networking rather than treating it as something that happens automatically.
The environment can be structured around a VPC containing:
  • Public subnets
  • Private subnets
  • Internet connectivity
  • Security groups
  • Route tables
  • NAT where required
This makes it possible to experiment with the same networking concepts that appear in larger AWS architectures.

Infrastructure as Code

Another important goal is to avoid manually creating everything through the AWS Console.
Terraform can be used to define the infrastructure.
That makes the laboratory reproducible.
For example, instead of manually creating a VPC, instances, security groups, and other resources, the infrastructure can be represented as code and recreated when necessary.
This also makes experimentation much easier.
If something goes wrong, the environment can be destroyed and rebuilt instead of manually repairing every component.

CI/CD and Infrastructure as Code together

Eventually, the laboratory can connect the two concepts:
Developer
|
v
Git Repository
|
v
Jenkins
|
+----> Tests
|
+----> Build
|
+----> Container Image
|
v
Container Registry
|
v
Kubernetes
|
v
Application
Terraform manages the infrastructure.
Jenkins manages the application delivery process.
Kubernetes manages the running workloads.
This separation makes the architecture much closer to what I would expect to encounter in a real DevOps environment.

Cost is part of the experiment

One of the interesting parts of building a personal AWS laboratory is cost management.
A development environment does not need to run continuously.
Resources can be created when they are needed and destroyed when the experiment is finished.
This makes the laboratory itself an opportunity to practice AWS cost optimization.
For example:
  • Use small instance types.
  • Stop resources when they aren't being used.
  • Delete unused volumes and load balancers.
  • Monitor public IPv4 usage.
  • Monitor data transfer.
  • Set up billing alerts.
  • Check AWS Cost Explorer regularly.
The objective isn't simply to make the infrastructure work.
It is to make it work without unnecessarily wasting resources.

What I want to learn

The most interesting part of this project isn't deploying Jenkins or Kubernetes individually.
It is understanding how the different layers interact.
I want to explore questions such as:
  • How should CI/CD credentials be managed?
  • What should Jenkins be allowed to access?
  • How should Kubernetes workloads authenticate with AWS?
  • How should secrets be stored?
  • How should logs and metrics be collected?
  • How should infrastructure changes be reviewed?
  • How can deployments be made repeatable?
  • How can the environment be secured without making it unnecessarily complicated?
These are the practical problems that turn a collection of AWS services into an actual platform.

Conclusion

My goal with this laboratory is not to reproduce a massive enterprise Kubernetes platform.
It is to build a small environment where I can experiment, break things, rebuild them, and understand why they work.
Certification provides a strong foundation, but hands-on work adds another dimension to that knowledge.
By combining AWS, Terraform, Jenkins, containers, Kubernetes, and CI/CD, I can create a practical environment for continuously developing my cloud and DevOps skills.
And perhaps the most important lesson is that the laboratory itself is a system to operate: it needs security, monitoring, automation, reliability, and cost control just like a real environment.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article