Hands-On Lab: Helm from Zero to Production
🎯 Lab Objectives
By the end of this lab, you will:
- Create a Helm chart from scratch
- Understand every Helm component
- Deploy an app using Helm
- Override values per environment
- Perform upgrade and rollback
- Troubleshoot Helm like a DevOps engineer
🧰 Prerequisites
You need:
- Kubernetes cluster (Minikube / KIND / EKS)
- kubectl
- Helm v3+
Verify:
kubectl get nodes
helm version
🧠 Lab Architecture (What We Build)
We will deploy a Python Flask app using Helm.
Components:
- Deployment
- Service
- Configurable replicas
- Configurable image
- Helm release management
1️⃣ Install Helm (if not installed)
brew install helm
Verify:
helm version
2️⃣ Create a New Helm Chart
helm create flask-app
This generates:
flask-app/
├── Chart.yaml
├── values.yaml
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ ├── hpa.yaml
│ ├── serviceaccount.yaml
│ └── _helpers.tpl
3️⃣ Clean the Chart (DevOps Best Practice)
Delete what we don’t need for this lab:
rm -rf flask-app/templates/ingress.yaml
rm -rf flask-app/templates/hpa.yaml
rm -rf flask-app/templates/serviceaccount.yaml
rm -rf flask-app/templates/tests
4️⃣ Understand Chart.yaml
Open:
flask-app/Chart.yaml
Example:
apiVersion: v2
name: flask-app
description: Helm chart for Flask application
type: application
version: 0.1.0
appVersion: "1.0"
🔑 DevOps knowledge
version→ chart version
appVersion→ app version
5️⃣ Configure values.yaml
Edit:
replicaCount: 2
image:
repository: aisalkyn85/python-todo
tag: v1
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 5000
This is where DevOps config lives, not YAML templates.
6️⃣ Understand Helm Templates (Critical)
Open:
templates/deployment.yaml
Key lines:
replicas: {{ .Values.replicaCount }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
📌 Helm renders this before applying to Kubernetes.
7️⃣ Dry Run (MOST IMPORTANT STEP)
helm install flask ./flask-app --dry-run --debug
You should see:
- Fully rendered Kubernetes YAML
- No resources created
🔥 This is how DevOps prevents outages
8️⃣ Install the Application
helm install flask ./flask-app
Verify:
helm list
kubectl get pods
kubectl get svc
9️⃣ Access the Application
Port-forward:
kubectl port-forward svc/flask-app 5000:5000
Open browser:
http://localhost:5000
🔟 Override Values (Production Pattern)
Create:
values-prod.yaml
replicaCount: 4
image:
tag: v2
Upgrade:
helm upgrade flask ./flask-app -f values-prod.yaml
Verify:
kubectl get pods
Pods increase → zero downtime
1️⃣1️⃣ Helm Release Management
View release status:
helm status flask
View history:
helm history flask
1️⃣2️⃣ Break It on Purpose (Rollback Lab)
Simulate bad image:
image:
tag: does-not-exist
Upgrade:
helm upgrade flask ./flask-app -f values-prod.yaml
Pods fail.
1️⃣3️⃣ Rollback (WHY HELM EXISTS)
helm rollback flask 1
Pods recover instantly.
💡 This is the #1 reason Helm is used in production
1️⃣4️⃣ Troubleshooting Like a DevOps Engineer
Helm-level debugging
helm get values flask
helm get manifest flask
helm lint ./flask-app
Kubernetes-level debugging
kubectl describe pod
kubectl logs pod
kubectl get events
📌 Helm installs — Kubernetes runs.
1️⃣5️⃣ Uninstall Cleanly
helm uninstall flask
Everything removed:
- Deployments
- Services
- Release metadata
🧠 What You Just Learned (Critical)
You learned:
- Helm chart structure
- values.yaml vs templates
- Install / upgrade / rollback
- Dry-run debugging
- Real DevOps workflow
🧑💻 WHO uses this in real life?
- DevOps Engineers
- Platform Teams
- SREs
Used for:
- Applications
- Monitoring stacks
- Databases
- GitOps pipelines
Production-Grade Microservice Platform with Helm
This project demonstrates that you understand:
- Helm beyond helm install
- Environment separation (dev / stage / prod)
- ConfigMaps & Secrets via Helm
- Ingress + Services
- Rolling upgrades & rollback
- Helm troubleshooting
- How DevOps actually deploy apps
This is exactly what companies expect.
🏗️ Architecture Overview
Application Stack
🌐 Ingress
|
┌─────────┴─────────┐
| |
frontend (React) backend (Flask API)
|
PostgreSQL
All components are deployed using Helm.
📁 Repository Structure (VERY IMPORTANT)
This structure alone is interview-level.
helm-microservice-platform/
├── charts/
│ ├── frontend/
│ │ ├── Chart.yaml
│ │ ├── values.yaml
│ │ └── templates/
│ │ ├── deployment.yaml
│ │ ├── service.yaml
│ │ └── ingress.yaml
│ ├── backend/
│ │ ├── Chart.yaml
│ │ ├── values.yaml
│ │ └── templates/
│ │ ├── deployment.yaml
│ │ ├── service.yaml
│ │ ├── configmap.yaml
│ │ └── secret.yaml
│ └── database/
│ ├── Chart.yaml
│ ├── values.yaml
│ └── templates/
│ ├── statefulset.yaml
│ ├── service.yaml
│ └── pvc.yaml
├── environments/
│ ├── dev/
│ │ ├── frontend-values.yaml
│ │ ├── backend-values.yaml
│ │ └── db-values.yaml
│ ├── prod/
│ │ ├── frontend-values.yaml
│ │ ├── backend-values.yaml
│ │ └── db-values.yaml
└── README.md
🔑 Core DevOps Concepts Demonstrated
1️⃣ Helm as an Application Manager
- Each service = separate chart
- Independent upgrades
- Independent rollbacks
2️⃣ Environment Separation (CRITICAL)
Example:
helm upgrade --install backend charts/backend \
-f environments/prod/backend-values.yaml
Same chart → different behavior → no duplication
3️⃣ ConfigMaps via Helm (Backend)
apiVersion: v1
kind: ConfigMap
metadata:
name: backend-config
data:
DB_HOST: {{ .Values.database.host }}
DB_PORT: "{{ .Values.database.port }}"
Injected into pods:
envFrom:
- configMapRef:
name: backend-config
4️⃣ Secrets via Helm (Safe Handling)
apiVersion: v1
kind: Secret
metadata:
name: backend-secret
type: Opaque
stringData:
DB_PASSWORD: {{ .Values.database.password }}
📌 Explain in interviews:
Helm renders secrets but Kubernetes encrypts them at rest.
5️⃣ Stateful Database via Helm
Database chart uses:
- StatefulSet
- PVC
- Headless Service
This proves you understand:
- Stateful workloads
- Storage
- Helm + databases
6️⃣ Ingress Controlled by Helm
hosts:
- host: app.prod.example.com
paths:
- /
Ingress is:
- Environment-specific
- Configurable
- Versioned
🔄 Deployment Workflow (REAL LIFE)
Initial install (dev)
helm install frontend charts/frontend -f environments/dev/frontend-values.yaml
helm install backend charts/backend -f environments/dev/backend-values.yaml
helm install db charts/database -f environments/dev/db-values.yaml
Upgrade backend only
helm upgrade backend charts/backend -f environments/prod/backend-values.yaml
Rollback broken release
helm rollback backend 2
🔥 This is production-grade behavior
🧪 Failure & Troubleshooting Scenarios (INTERVIEW GOLD)
Scenario 1: Bad image pushed
- Pods CrashLoopBackOff
- Helm upgrade fails
- Rollback restores service instantly
Explain:
Helm protects Kubernetes deployments from bad releases.
Scenario 2: Wrong env variable
helm get manifest backend
kubectl describe pod
Explain:
Always inspect rendered YAML, not templates.
Scenario 3: DB not reachable
- Check ConfigMap
- Check Service DNS
- Check StatefulSet ordering
🧠 What Interviewers LOVE About This Project
You can confidently say:
“I built a multi-service Helm platform with environment separation, database state management, Ingress routing, configuration via values files, and rollback-safe deployments.”
That sentence alone is senior-level.
🧩 Optional Advanced Add-Ons (Next Level)
You can extend this project with:
- Helm + Argo CD
- Helm hooks (pre-install DB migration)
- Helm tests
- External Secrets (AWS Secrets Manager)
- CI/CD pipeline deploying Helm
- Helm chart versioning strategy
📚 Why This Project Is “Better”
| Toy Helm Lab | This Project |
|---|---|
| Single chart | Multi-chart platform |
| No envs | Dev / Prod separation |
| No secrets | Secure config |
| No DB | Stateful workloads |
| No rollback | Real failure handling |
| Demo-only | Resume-ready |







SOCIAL SHARE CARD GENERATOR