A collection of Kubernetes manifests to demonstrate and test common features on Minikube:
- Minikube installed and running
kubectlconfigured to talk to your Minikube cluster
-
Helm chart examples for different environments:
- Chart Structure:
Chart.yaml- Main chart metadatavalues.yaml- Base configurationdev-values.yaml/prod-values.yaml- Environment-specific overrides
- Templates:
- Deployment, Service, Ingress, and ConfigMap templates in
templates/directory
- Deployment, Service, Ingress, and ConfigMap templates in
- Chart Structure:
-
Kustomize overlays for environment-specific configurations:
- Base Configuration:
base/deployment.yaml- Common deploymentbase/service.yaml- Common servicebase/kustomization.yaml- Base resources
- Overlays:
dev/- Development configuration (3 replicas)prod/- Production configuration (5 replicas)
- Base Configuration:
-
Prometheus monitoring stack:
prometheus/config.yaml- Prometheus configurationprometheus/deployment.yaml- Prometheus serverprometheus/service.yaml- Service exposing Prometheus UI
-
Examples of StatefulSets with persistent storage:
- MySQL:
mysql-statefulset/mysql-statefulset.yaml(StatefulSet)mysql-statefulset/mysql-headless.yaml(Headless Service)mysql-statefulset/php-app-deployment.yaml(PHP-Nginx app to connect to MySQL)mysql-statefulset/php-app-svc.yaml(Service to expose PHP app)
- Redis:
redis-statefulset/redis-statefulset.yaml(StatefulSet)redis-statefulset/redis-headless.yaml(Headless Service)
- NGINX:
nginx-statefulset/nginx-statefulset.yaml(StatefulSet)nginx-statefulset/nginx-headless.yaml(Headless Service)
- MySQL:
-
Show how to create a hostPath PersistentVolume and consume it via a PVC in an NGINX Pod.
Files:nginx-pv.yaml(PV)nginx-pvc.yaml(PVC)nginx-pod.yaml
-
Deploy a standalone NGINX Pod and expose it with a NodePort Service for quick inspection.
Files:nginx-deploy.yamlnginx-svc.yaml
-
Test writing data into a PVC from a BusyBox Pod.
Files:pvc.yaml(PVC)pvc-deploy.yaml(Pod that writes to the PVC)
-
Deploy a complete monitoring stack on Minikube:
- A Flask app exposing Prometheus metrics
- Prometheus server (with ConfigMap)
- Grafana dashboard
- Node Exporter as a DaemonSet
Files:metric-app.yaml(Flask metrics app Deployment & Service)prometheus-config.yaml(ConfigMap)prometheus-deploy.yaml(Prometheus Deployment)prometheus-svc.yaml(Prometheus Service)grafana.yaml(Grafana Deployment & Service)node-exporter-daemonset.yaml(Node Exporter DaemonSet)node-exporter-service.yaml(Node Exporter Service)- Custom Flask app with Prometheus metrics in
app/directory
- Navigate into a test directory, e.g.:
cd statefulset-test - Apply all manifests:
kubectl apply -f . - Verify resources:
kubectl get pods,svc,pv,pvc
- Clean up:
kubectl delete -f .
- Helm Charts: Packaging and environment-specific configuration management
- Kustomize Overlays: Managing different environments with patching
- Prometheus Monitoring: Setting up metrics collection and monitoring
- StatefulSets: Deploying stateful applications with stable network identities and persistent storage
- PersistentVolumes: Managing storage in Kubernetes with different provisioners
- Services: Exposing applications using ClusterIP and NodePort service types
- DaemonSets: Running pods on every node in the cluster
- ConfigMaps: Providing configuration to applications
- Multi-container Pods: Running multiple containers in a single pod (e.g., PHP-NGINX)
Feel free to explore each directory and experiment with the manifests to learn how Kubernetes storage, services, and monitoring work on Minikube.