This repository contains ready-to-use setup scripts and detailed instructions for creating powerful multi-node Kubernetes development clusters locally using two popular tools:
- ๐ท Minikube Lab - A feature-rich multi-node Kubernetes cluster using Minikube
- ๐ถ Kind Lab - A lightweight multi-node Kubernetes cluster using Kind (Kubernetes IN Docker)
- ๐ฎ All-in-one Management Script - New
k8s-lab.shprovides unified management for both types of clusters - ๐ง Smart Cluster Management - Clusters are preserved and restarted rather than recreated when possible
- ๐งฉ Advanced Demo Applications - New demonstrations of StatefulSets, HPA, ConfigMaps and Secrets
- ๐ Enhanced Status Checking - Quick overview of all clusters and their state
- ๐งน Cluster Cleanup - Easy deletion and cleanup of clusters
The Minikube lab creates a robust 3-node cluster with all nodes having the same role. It includes:
- ๐ Kubernetes Dashboard for visual management
- ๐ Metrics Server for performance monitoring
- ๐ Ingress Controller for external access
Minikube provides a more VM-like experience and is optimized for local development with a focus on ease of use and comprehensive tooling.
The Kind lab creates an efficient 3-node cluster with 1 control-plane node and 2 worker nodes. It includes:
- ๐ Metrics Server for resource monitoring
- ๐ NGINX Ingress Controller with pre-configured ports
Kind is ultra-lightweight, extraordinarily fast to start up, and precisely designed for testing Kubernetes itself. It's particularly excellent for CI environments and testing multi-node configurations with minimal resource usage.
-
Use Minikube if:
- ๐๏ธ You want an experience closer to a "real" Kubernetes cluster
- ๐ You need the built-in dashboard for visual management
- ๐งฉ You prefer a more guided approach with built-in addons
- ๐ You want consistent behavior across different environments
-
Use Kind if:
- โก You want lightning-fast startup and teardown times
- ๐งช You need to test specialized multi-role configurations
- ๐ You're implementing CI/CD testing pipelines
- ๐ชถ You want the most lightweight solution possible
Our new unified management script makes it easier than ever to work with both types of clusters:
# Show available commands
./k8s-lab.sh help
# Start a Minikube cluster (with optional profile name)
./k8s-lab.sh start minikube [profile_name]
# Start a Kind cluster (with optional cluster name)
./k8s-lab.sh start kind [cluster_name]
# Check status of all clusters
./k8s-lab.sh status
# Deploy the basic demo app
./k8s-lab.sh deploy-demo minikube [profile_name]
# Open the dashboard (Minikube) or K9s (Kind)
./k8s-lab.sh dashboard minikube [profile_name]
# Clean up a cluster
./k8s-lab.sh cleanup kind [cluster_name]๐ก Smart Cluster Management: When starting a cluster, the script automatically checks if it already exists. If a cluster with the same name is already running, no action is taken. If it exists but is stopped, the script will start it instead of recreating it. This saves time and preserves your workloads.
We now have advanced demos that showcase various Kubernetes features:
# Navigate to the advanced demos directory
cd demo-app/advanced-demos
# Deploy all advanced demos to Minikube
./deploy-advanced-demos.sh minikube [profile_name] all
# Deploy only the StatefulSet demo to Kind
./deploy-advanced-demos.sh kind [cluster_name] stateful
# Deploy only the HPA demo
./deploy-advanced-demos.sh minikube [profile_name] hpaSee the README in the demo-app/advanced-demos directory for more details.
This repository includes comprehensive GitHub Actions workflows that automatically verify the functionality of both lab setups:
- ๐ถ Kind Lab Verification - Tests Kind cluster setup, demo deployments, and advanced features
- ๐ท Minikube Lab Verification - Tests Minikube cluster setup, addons, and all demo applications
- ๐ Daily Verification - Runs both tests daily to ensure labs remain functional
The badges at the top of this README show real-time status:
- Green โ - Lab setup is working correctly
- Red โ - Issues detected, check the workflow logs
- Yellow ๐ก - Tests are currently running
Each workflow verifies:
- โ Cluster creation and node health
- โ System component readiness (metrics-server, dashboard, etc.)
- โ Demo application deployment and functionality
- โ Advanced demos (StatefulSets, HPA, ConfigMaps)
- โ Service accessibility and networking
- โ Resource cleanup and teardown
You can manually trigger these tests anytime by going to the Actions tab in the GitHub repository.
For development and testing purposes, you can manually trigger the verification workflows:
# Test both setups on current branch
./test-workflows.sh
# Test only Kind setup on current branch
./test-workflows.sh kind
# Test only Minikube setup on current branch
./test-workflows.sh minikube
# Test both setups on a specific branch
./test-workflows.sh both feature/my-branch
# Test Kind setup on main branch
./test-workflows.sh kind mainNote: This requires GitHub CLI (
gh) to be installed and authenticated.Important: Workflows must exist on the specified branch to be triggered. If you're testing on a feature branch, make sure the workflow files are committed to that branch.
You can also navigate to either the minikube-lab or kind-lab directory and follow the instructions in their respective README files. Both labs feature simple setup scripts that handle all the complexity for you.
- ๐ป macOS or Linux operating system
- ๐ณ Docker installed and running
- ๐งฐ Terminal access
- ๐ง Basic command-line familiarity
- โ Multi-node clusters for realistic testing
- โ Cross-platform support (macOS & Linux)
- โ Profile/naming support for running multiple clusters
- โ Smart cluster management that preserves and restarts existing clusters
- โ Pre-configured with essential add-ons
- โ Detailed documentation with examples
- โ Advanced demos of key Kubernetes features (StatefulSets, HPA, ConfigMaps, etc.)
- โ Unified cluster management script
- โ Automated daily verification - GitHub Actions workflows test both setups daily
- โ Continuous integration - Status badges show real-time lab health
- โ Quality assurance - Comprehensive testing of cluster setup and demo deployments
Kubernetes-Lab/
โโโ README.md # This file
โโโ k8s-lab.sh # Unified management script for all clusters
โโโ test-workflows.sh # Manual workflow testing script
โโโ .github/ # GitHub Actions workflows
โ โโโ workflows/
โ โโโ verify-kind-cluster.yml # Kind lab verification
โ โโโ verify-minikube-cluster.yml # Minikube lab verification
โ โโโ daily-verification.yml # Daily automated testing
โโโ minikube-lab/ # Minikube-specific files
โ โโโ README.md # Minikube setup instructions
โ โโโ setup-minikube.sh # Minikube cluster setup script
โโโ kind-lab/ # Kind-specific files
โ โโโ README.md # Kind setup instructions
โ โโโ kind-config.yaml # Kind cluster configuration
โ โโโ setup-kind.sh # Kind cluster setup script
โโโ demo-app/ # Demo applications
โโโ README.md # Demo app instructions
โโโ demo-app.yaml # Basic demo application manifest
โโโ k8s-dashboard.yaml # Dashboard configuration
โโโ deploy-demo.sh # Demo deployment script
โโโ advanced-demos/ # Advanced demonstrations
โโโ README.md # Advanced demos documentation
โโโ stateful-mongodb.yaml # StatefulSet demo
โโโ hpa-demo.yaml # HPA demo
โโโ configmap-secret-demo.yaml # ConfigMap and Secret demo
โโโ deploy-advanced-demos.sh # Advanced demos deployment script
Feedback and contributions are welcome! Feel free to open issues or submit pull requests to improve these labs.