CHAPTER 19
Intermediate
Real-World Kubernetes Projects
Updated: May 15, 2026
30 min read
# CHAPTER 19
Real-World Kubernetes Projects
1. Introduction
Employers do not hire Cloud Engineers because they can answer trivia questions; they hire engineers who can demonstrate practical, hands-on ability to architect secure, highly available infrastructure. A GitHub portfolio containing well-documented Kubernetes manifests is the absolute best way to break into the DevOps industry. In this chapter, we transition from theoretical concepts to physical architecture, outlining five progressive projects that will prove your mastery of Container Orchestration to any hiring manager.2. Learning Objectives
By the end of this chapter, you will be able to:- Synthesize Deployments, Services, and Ingress into cohesive architectures.
- Demonstrate the ability to secure applications via RBAC and Secrets.
- Build a progressive DevOps portfolio.
- Understand how to structure a GitHub repository for Kubernetes projects.
3. Project 1: The Resilient Web Deployment (Beginner)
The Goal: Prove you understand the absolute fundamentals of Declarative Infrastructure, Deployments, and internal Service networking. The Architecture:- 1. The Application: Write a simple Node.js or Python API. Containerize it and push the image to Docker Hub.
-
2.
The Deployment: Author a
deployment.yamlfile that requests 3 replicas of your application.
-
3.
The Service: Author a
service.yamlfile creating aClusterIPservice to load balance traffic internally across your 3 Pods.
-
4.
The Proof: Include a
README.mdthat shows the terminal output ofkubectl get pods, proving 3 replicas are running, and provide a command showing a successful internalcurlrequest to the Service IP.
4. Project 2: The Decoupled Database Architecture (Intermediate)
The Goal: Demonstrate you can safely manage stateful workloads and sensitive configurations without hardcoding passwords. The Architecture:-
1.
The Infrastructure: Create a
statefulset.yamlfor a MySQL or PostgreSQL database.
-
2.
Data Persistence: Ensure the StatefulSet includes a
volumeClaimTemplatesblock requesting 5Gi of storage, proving you know how to persist data across Pod restarts.
-
3.
The Security: Create a
secret.yaml(Base64 encoded) containing the database root password. Inject this Secret into the database Pod as an Environment Variable.
- 4. The Frontend: Deploy a PHP or Node.js frontend (via a standard Deployment) that connects to the database via a Headless Service.
- 5. The Proof: Document the process of deleting the Database Pod and proving that the data survived when Kubernetes recreated it.
5. Project 3: The Path-Based Ingress Controller (Intermediate)
The Goal: Prove you understand enterprise traffic routing and can consolidate multiple microservices behind a single public IP address. The Architecture:-
1.
The Microservices: Deploy two distinct web applications (e.g., an "Authentication API" and a "Storefront UI"). Ensure neither of them uses
NodePortorLoadBalancerservices (keep them hidden viaClusterIP).
- 2. The Controller: Install the NGINX Ingress Controller into your cluster.
-
3.
The Rules: Write an
ingress.yamlfile. Route traffic matchingyourdomain.com/authto the Auth API, and traffic matchingyourdomain.com/storeto the Storefront UI.
- 4. The Proof: Provide a network diagram (drawn in Draw.io) in your README illustrating the traffic flow from the User -> Ingress Controller -> ClusterIP Services -> Pods.
6. Project 4: The Auto-Scaling E-Commerce Event (Advanced)
The Goal: Demonstrate mastery of Elasticity, Resource Requests, and the Horizontal Pod Autoscaler (HPA). The Architecture:-
1.
Resource Limits: Update an application's Deployment YAML to explicitly define CPU
requestsandlimits.
-
2.
The HPA: Author an
hpa.yamlfile configured to maintain 50% average CPU utilization, scaling between 2 and 20 replicas.
-
3.
The Simulation: Use a load-testing tool like
Apache Bench (ab)orLocustto aggressively bombard your application with 10,000 requests.
-
4.
The Proof: Record a GIF or take screenshots of your terminal running
kubectl get hpa -w. Show the hiring manager the exact moment the CPU spikes, followed by Kubernetes automatically provisioning 20 Pods to absorb the simulated Black Friday traffic spike.
7. Project 5: The GitOps Deployment Pipeline (Advanced)
The Goal: Prove you understand modern DevOps automation and that you never deploy YAML manually in production. The Architecture:- 1. The Setup: Install ArgoCD (The GitOps controller) into your Kubernetes cluster.
-
2.
The Repo: Create a dedicated GitHub repository named
k8s-manifests. Put all your YAML files from Projects 1-4 into this repo.
- 3. The Connection: Configure ArgoCD to monitor your GitHub repository.
-
4.
The Test: Go into GitHub and manually edit your
deployment.yaml, changing the replica count from 3 to 10.
-
5.
The Proof: Document that ArgoCD autonomously detected the GitHub commit, reached out to the API Server, and scaled the cluster to 10 replicas without you ever touching the
kubectlCLI. This is the pinnacle of Cloud Engineering.
8. How to Structure Your Portfolio
Employers spend less than 3 minutes looking at a GitHub portfolio. Make it count.-
Root Directory: Create a master repository called
kubernetes-portfolio.
-
Folders: Create folders for each project (
01-resilient-web,02-stateful-db).
- The README: Your README is your interview. Do not just post YAML. Explain *why* you chose a StatefulSet over a Deployment. Explain *why* you decoupled the Secrets. Explain the architecture as if you were presenting it to a Chief Technology Officer.