Github Duration: 4hrs, 32 mins A complete Kubernetes infrastructure solution featuring a multi-node KinD cluster, HTTP echo services, monitoring stack, and automated load testing with CI integration.
┌─────────────────────────────────────────────────────────────────┐
│ KinD Cluster │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Control Plane │ │ Worker 1 │ │ Worker 2 │ │
│ │ (ingress-ready)│ │ │ │ │ │
│ └────────┬────────┘ └─────────────────┘ └─────────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ NGINX Ingress │ │
│ │ Controller │ │
│ └────────┬────────┘ │
│ │ │
│ ┌─────┴─────┬─────────────┬─────────────┐ │
│ ▼ ▼ ▼ ▼ │
│ ┌───────┐ ┌───────┐ ┌──────────┐ ┌────────────┐ │
│ │ foo │ │ bar │ │ Grafana │ │ Prometheus │ │
│ │ ns:foo│ │ ns:bar│ │ │ │ │ │
│ └───────┘ └───────┘ └──────────┘ └────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────┐
│ Load Tester │
│ (Locust) │
└─────────────────┘
| Component | Description | Directory |
|---|---|---|
| KinD Cluster | Multi-node Kubernetes cluster (1 control-plane + 2 workers) | kind/ |
| http-echo | Helm chart deploying foo and bar echo services | echo/ |
| Monitoring | Prometheus, Grafana, Alertmanager stack | monitoring/ |
| Load Testing | Python-based load testing with Locust | loadtest/ |
| CI/CD | GitHub Actions for automated load testing on PRs | .github/workflows/ |
kind create cluster --config kind/main.yamlkubectl apply -f kind/ingress-nginx.yaml
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=120shelm install http-echo ./echo./monitoring/install.shAdd to /etc/hosts:
echo "127.0.0.1 foo.localhost bar.localhost grafana.localhost prometheus.localhost alertmanager.localhost" | sudo tee -a /etc/hosts
curl http://foo.localhost # Returns: foo
curl http://bar.localhost # Returns: barRun load tests against the deployed services:
cd loadtest
pip install -r requirements.txt
python loadtest.py --urls urls.json --duration 60See loadtest/README.md for detailed configuration options.
| Service | URL | Credentials |
|---|---|---|
| foo | http://foo.localhost | - |
| bar | http://bar.localhost | - |
| Grafana | http://grafana.localhost | admin / admin |
| Prometheus | http://prometheus.localhost | - |
| Alertmanager | http://alertmanager.localhost | - |
The repository includes a GitHub Actions workflow that:
- Provisions a KinD cluster on PR
- Deploys all services
- Runs load tests
- Posts results as PR comment
See .github/workflows/load-test.yaml.
.
├── README.md # This file
├── kind/ # KinD cluster configuration
│ ├── README.md
│ ├── main.yaml # Cluster config (3 nodes)
│ └── ingress-nginx.yaml # Ingress controller manifest
├── echo/ # http-echo Helm chart
│ ├── README.md
│ ├── Chart.yaml
│ ├── values.yaml
│ └── templates/
├── monitoring/ # Prometheus/Grafana stack
│ ├── README.md
│ ├── install.sh
│ └── values.yaml
├── loadtest/ # Load testing suite
│ ├── README.md
│ ├── loadtest.py
│ ├── urls.json
│ ├── requirements.txt
│ └── run.sh
└── .github/
└── workflows/
└── load-test.yaml # CI workflow
# Delete the cluster (removes everything)
kind delete cluster --name goodnotes-cluster