██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗███████╗███████╗██████╗ ███████╗██████╗
██╔══██╗██╔═══██╗██╔══██╗██╔════╝██║ ██║██╔════╝██╔════╝██╔══██╗██╔════╝██╔══██╗
██████╔╝██║ ██║██║ ██║███████╗██║ █╗ ██║█████╗ █████╗ ██████╔╝█████╗ ██████╔╝
██╔═══╝ ██║ ██║██║ ██║╚════██║██║███╗██║██╔══╝ ██╔══╝ ██╔═══╝ ██╔══╝ ██╔══██╗
██║ ╚██████╔╝██████╔╝███████║╚███╔███╔╝███████╗███████╗██║ ███████╗██║ ██║
╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚══╝╚══╝ ╚══════╝╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝
+-+-+-+-+-+ __ __ _
|.|1|X|1|.| | \/ (_)_ __ ___ _____ _____ ___ _ __
+-+-+-+-+-+ | |\/| | | '_ \ / _ \/ __\ \ /\ / / _ \/ _ \ '__|
|.|1|2|2|1| | | | | | | | | __/\__ \\ V V / __/ __/ |
+-+-+-+-+-+ |_| |_|_|_| |_|\___||___/ \_/\_/ \___|\___|_|
|.|.|1|X|1|
+-+-+-+-+-+ ...but in Kubernetes. With kubectl delete.
|.|.|1|1|1|
+-+-+-+-+-+ 💥 BOOM! You hit a mine! 💥
The most impractical, over-engineered, and chaotic way to play Minesweeper.
Quick Start • Concept • CTF Mode • Build
PodSweeper is a cloud-native Minesweeper game where cells are live Kubernetes Pods. To "click" a cell, you don't use a mouse — you use kubectl delete.
$ kubectl get pods -n podsweeper-game
NAME READY STATUS AGE
pod-0-0 1/1 Running 5s
pod-0-1 1/1 Running 5s
pod-1-0 1/1 Running 5s
hint-1-1 1/1 Running 3s # <- You revealed this one!
pod-2-0 1/1 Running 5s
...
$ kubectl delete pod pod-0-0 -n podsweeper-game
pod "pod-0-0" deleted
$ kubectl get pods -n podsweeper-game
NAME READY STATUS AGE
explosion 1/1 Running 1s # <- 💥 BOOM!
| Component | Status |
|---|---|
| Core Game Engine | ✅ Complete |
| Grid Generation | ✅ Complete |
| Hint System (BFS) | ✅ Complete |
| Victory/Defeat Detection | ✅ Complete |
| Player Terminal | ✅ Complete |
| Level 0-4 (Cheat Paths) | ✅ Complete |
| Levels 5-9 (Webhook) | 📋 Planned |
| CI/CD Pipeline | ✅ Complete |
⚠️ PodSweeper is designed to be destructive within its own namespace.Do not run this in production unless you want to explain to your boss why you were playing Minesweeper with company infrastructure.
# Deploy directly from GitHub (no clone needed!)
kubectl apply -k https://github.com/zwindler/podsweeper//deploy/base?ref=v0.1.3
# Wait for the gamemaster to be ready
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=podsweeper \
-n podsweeper-game --timeout=60sOr if you prefer to clone:
git clone https://github.com/zwindler/podsweeper.git
cd podsweeper
kubectl apply -k deploy/base/# Start a new game
kubectl patch configmap podsweeper-config -n podsweeper-game \
--type merge -p '{"data":{"level":"0","action":"start"}}'
# Join the player terminal
kubectl exec -it player -n podsweeper-game -- bashInside the player terminal:
podsweeper> pods # See the grid
podsweeper> sweep 2 2 # Click cell at (2,2)
podsweeper> hint 2 2 # Get hint value
podsweeper> map # Cheat! (Level 0 only)Or play directly with kubectl:
kubectl get pods -n podsweeper-game # See the grid
kubectl delete pod pod-2-2 -n podsweeper-game # Click a cell
kubectl port-forward hint-2-2 8080:8080 -n podsweeper-game &
curl localhost:8080 # Read hint value
kubectl logs explosion -n podsweeper-game # See defeat message
kubectl logs victory -n podsweeper-game # See victory message| Level | Grid | Mines | Difficulty |
|---|---|---|---|
| 0-4 | 5×5 | 4 | Beginner |
| 5-7 | 10×10 | 15 | Intermediate |
| 8-9 | 20×20 | 60 | Expert |
PodSweeper transforms your Kubernetes namespace into a minefield:
0 1 2 3 4
+---+---+---+---+---+
0| . | . | X | X | . | X = Mine (hidden)
+---+---+---+---+---+ . = Safe cell
1| . | . | . | . | X |
+---+---+---+---+---+ Click a cell = kubectl delete pod
2| . | . | . | . | . |
+---+---+---+---+---+ Hit a mine = 💥 Game Over
3| . | . | . | . | . |
+---+---+---+---+---+ Clear all safe = 🎉 Victory!
4| . | X | . | . | . |
+---+---+---+---+---+
- The Grid: The Gamemaster spawns a matrix of pods named
pod-x-y - Safe Cell: Replaced by
hint-x-yshowing adjacent mine count - Empty Area: Chain reaction (BFS) auto-clears connected empty cells
- Mine: All pods explode, game over!
PodSweeper isn't just a game — it's a Kubernetes CTF. Each level hardens the cluster to prevent "cheating":
| Level | Name |
|---|---|
| 0 | The Intern |
| 1 | The Junior |
| 2 | The Infiltrator |
| 3 | The Heart |
| 4 | Amnesia |
| 5 | The Firewall |
| 6 | The Sand Grain |
| 7 | Port Hacking |
| 8 | Firing Window |
| 9 | RBAC Blackout |
| Component | Technology |
|---|---|
| Language | Go 1.26 |
| Framework | controller-runtime / client-go |
| Container Runtime | Podman / Docker |
| Deployment | Kustomize |
| Base Images | Alpine 3.23, distroless |
# Build binaries
make build
# Run tests
make test
# Build container images
make docker-build
# Load into kind cluster
make docker-push
# Deploy
make deploy
# Start playing
make start-game && make playBecause kubectl delete pod should be scary, and we wanted to make it fun.
Perfect for:
- K8s Beginners: Learn kubectl and pod lifecycle
- SREs/DevOps: Practice troubleshooting under pressure
- Security Teams: Understand RBAC and admission control
- Conference Demos: Impressive and interactive!
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Created with ❤️ and a few LLM driven coding sessions.