A hands-on Kubernetes learning repository covering core workloads, Helm packaging, service mesh, autoscaling, RBAC, CRDs, and a real FastAPI application — all tested on Kind and Minikube local clusters.
A structured reference repository covering the Kubernetes ecosystem end-to-end. Each directory is a self-contained module with manifests, configurations, and commands — spanning core workloads, stateful applications, Helm packaging, RBAC, autoscaling, CRDs, and service mesh.
All workloads run locally using Kind (Kubernetes in Docker) or Minikube — no cloud account required.
| Tool | Purpose |
|---|---|
| Kubernetes | Container orchestration |
| Kind / Minikube | Local cluster environments |
| Helm | Kubernetes package manager |
| Istio 1.29.2 | Service mesh (traffic, security, observability) |
| FastAPI | Sample Python web application |
| MySQL | Stateful database workload |
| Apache HTTPD | Stateless web server workload |
| NGINX Ingress | Cluster ingress controller |
| SQLAlchemy | ORM for the notes app |
| Docker | Container runtime |
kubernetes/
├── kubernetes/ # Core K8s primitives (pod, deployment, job, namespace)
├── apache/ # Apache workload with HPA, VPA, and full RBAC
│ └── RBAC/ # ServiceAccount, Role, RoleBinding
├── mysql/ # MySQL StatefulSet with headless service and PVC
├── notes-app/ # FastAPI CRUD app + K8s manifests + ingress
│ └── k8s/
├── helm/ # Helm chart for Apache with full template set
│ └── apache-helm/
│ └── templates/
├── crd/ # Custom Resource Definition + CR instance
├── dashboard/ # K8s Dashboard RBAC setup
├── install_kind.sh # Automated Kind + kubectl installer
└── monitoring/ # (planned)
- Docker
- Kind or Minikube
- kubectl
- Helm 3
Kind (Kubernetes in Docker):
# Automated setup (installs Docker, Kind, kubectl)
chmod +x install_kind.sh
./install_kind.sh
# Create a cluster
kind create cluster --name devops-labMinikube:
minikube start --cpus=2 --memory=4gchmod +x helm/get_helm.sh
./helm/get_helm.shAll workloads were tested on:
- Kind v0.29.0 — multi-node local clusters
- Minikube — single-node local clusters
The install_kind.sh script handles Docker installation, Kind binary download (aarch64/x86_64 auto-detection), and kubectl setup automatically on Linux.
Directory: kubernetes/
Starting point — the fundamentals of Kubernetes objects.
| File | What it covers |
|---|---|
pod.yaml |
Standalone pod definition |
deployment.yml |
NGINX deployment with 2 replicas |
namespace.yml |
Namespace isolation |
job.yaml |
One-shot Job resource |
kubectl apply -f kubernetes/
kubectl get pods -n nginx-namespaceDirectory: apache/
A complete Apache HTTPD workload demonstrating production-style resource management and access control.
Highlights:
- Deployment with CPU/memory requests and limits
- HPA — scales between 1–5 replicas, triggers at 5% CPU
- VPA — automatically right-sizes container resources (Auto mode)
- Full RBAC setup: ServiceAccount → Role → RoleBinding
kubectl apply -f apache/namespace.yml
kubectl apply -f apache/RBAC/
kubectl apply -f apache/deployment.yaml
kubectl apply -f apache/hpa.yml
kubectl apply -f apache/vpa.ymlRBAC layout:
ServiceAccount: apache-user
└── RoleBinding
└── Role (get/list/watch on pods, deployments, services)
Directory: mysql/
Stateful workload using a StatefulSet with persistent storage — a common real-world pattern for databases.
Highlights:
- 3-replica StatefulSet with 1Gi PersistentVolumeClaim per pod
- Headless Service for stable pod DNS (
mysql-0.mysql,mysql-1.mysql, ...) - ConfigMap for database configuration
- Secret for root password (base64 encoded)
kubectl apply -f mysql/namespace.yml
kubectl apply -f mysql/configmap.yml
kubectl apply -f mysql/secret.yml
kubectl apply -f mysql/service.yml
kubectl apply -f mysql/statefulset.ymlDirectory: notes-app/
A real CRUD application to practice deploying custom workloads on Kubernetes.
App features:
- FastAPI backend with SQLite (SQLAlchemy ORM)
- Jinja2 templates for server-side rendered frontend
- REST API:
GET / POST / PUT / DELETE /api/notes/ - Dockerized and pushed to
krishna5534/notes-app:latest
K8s manifests:
| File | Resource |
|---|---|
k8s/namespace.yml |
Dedicated namespace |
k8s/deployment.yml |
1-replica deployment on port 8000 |
k8s/service.yml |
ClusterIP service |
k8s/ingress.yml |
NGINX ingress with path routing |
kubectl apply -f notes-app/k8s/
kubectl get ingress -n notes-appDirectory: helm/apache-helm/
A fully templated Helm chart for the Apache HTTPD workload — demonstrating real chart authoring practices.
Chart: apache-helm v0.1.0 | App: httpd 2.4
Templates included:
| Template | Purpose |
|---|---|
deployment.yaml |
Parameterized Apache deployment |
service.yaml |
Service with configurable type/port |
ingress.yaml |
Ingress with TLS support |
httproute.yaml |
Gateway API HTTPRoute |
hpa.yaml |
HPA with CPU/memory targets |
serviceaccount.yaml |
Optional service account |
_helpers.tpl |
Shared label/name helpers |
tests/ |
helm test connection test |
Key defaults (values.yaml):
replicaCount: 3
image:
repository: httpd
tag: "2.4"
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80Usage:
# Install from local chart
helm install my-apache ./helm/apache-helm
# Install from packaged chart
helm install my-apache ./helm/apache-helm-0.1.0.tgz
# Override replicas
helm install my-apache ./helm/apache-helm --set replicaCount=5
# Run tests
helm test my-apacheIstio 1.29.2 installed for hands-on service mesh practice.
Covers:
- Sidecar proxy injection (Envoy)
- Traffic management (VirtualService, DestinationRule)
- mTLS and security policies
- Observability (Kiali, Jaeger, Prometheus integration)
- Ztunnel (ambient mesh mode)
# Install Istio
cd istio/istio-1.29.2
./bin/istioctl install --set profile=demo
# Enable sidecar injection on a namespace
kubectl label namespace default istio-injection=enabledDirectory: crd/
Demonstrates extending the Kubernetes API with a custom resource.
CRD: MlBatch (group: mlmodels.io)
# Shortnames: ai, ml, models
kind: MlBatch
spec:
name: string
model: string # e.g. resnet50
environment: string # e.g. cloud
platform: string # e.g. Colabkubectl apply -f crd/devops-crd.yaml
kubectl apply -f crd/devops-cr.yaml
kubectl get mlbatch # or: kubectl get ai / kubectl get ml
kubectl describe mlbatch mlbatch-3Directory: dashboard/
Admin-level access setup for the Kubernetes Dashboard UI.
kubectl apply -f dashboard/dashboard-admin-user.yaml
# Get the login token
kubectl -n kubernetes-dashboard create token admin-user
# Start the proxy
kubectl proxy
# Open: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/Built for learning.