Raspberry Pi Cluster Guide
Raspberry Pi Cluster Guide
Section titled “Raspberry Pi Cluster Guide”A Raspberry Pi cluster is a cheap, hands-on way to learn Kubernetes, run a resilient homelab, or experiment with distributed workloads on real hardware. This guide covers hardware selection through deploying k3s (a lightweight Kubernetes) on top. It pairs with the Kubernetes Setup guide and the Local LLM Setup guide.
Hardware selection
Section titled “Hardware selection”- Pi 5 vs Pi 4 — the Pi 5 is substantially faster with a real PCIe lane (NVMe via a HAT); the Pi 4 is cheaper and plentiful. Either works for learning.
- Compute Module 4 (CM4) — compact, board-mounted builds (e.g. cluster carrier boards) if you want density.
- Node count — 3 nodes is the practical minimum for high-availability experiments (quorum); 4 gives you a spare/worker.
Networking
Section titled “Networking”A small managed switch lets you experiment with VLANs; PoE (with PoE HATs) keeps cabling clean by powering nodes over the network cable. A dedicated cluster subnet is nice for isolation but optional for a homelab.
OS and headless setup
Section titled “OS and headless setup”Use Raspberry Pi OS Lite or Ubuntu Server (LTS) — both run k3s well on ARM64. The Raspberry Pi Imager (or cloud-init) does headless first boot: preconfigure hostname, Wi-Fi/Ethernet, and inject your SSH key so nodes come up ready to manage without a monitor.
Storage
Section titled “Storage”SD-card endurance is the classic Pi weakness:
| Option | Trade-off |
|---|---|
| microSD (A2-rated) | Cheap, simplest; slower IOPS, wears out |
| USB SSD boot | Much better IOPS/reliability — recommended |
| NVMe (Pi 5 PCIe / CM4 IO board) | Fastest; best for I/O-heavy workloads |
Boot from SSD/NVMe where you can — it’s the biggest reliability upgrade.
Deploying k3s
Section titled “Deploying k3s”k3s is the standard lightweight Kubernetes for Pi:
# On the first node (server / control plane)curl -sfL https://get.k3s.io | sh -sudo cat /var/lib/rancher/k3s/server/node-token # token for agents
# On each additional node (agent)curl -sfL https://get.k3s.io | K3S_URL=https://<server-ip>:6443 K3S_TOKEN=<token> sh -Pull the kubeconfig from /etc/rancher/k3s/k3s.yaml. Watch for ARM64 image/Helm-chart
compatibility — most popular charts publish multi-arch images, but verify.
Cooling
Section titled “Cooling”Passive heatsinks suffice for light load; add active cooling (the official Pi fan/case or an Argon ONE) for sustained workloads to avoid thermal throttling. Monitor temps and throttle status.
Power budgeting
Section titled “Power budgeting”Per-node draw is roughly ~5 W idle and ~8–12 W under load (Pi 4 lower, Pi 5 higher) — treat as approximate and measure your build. Size a small UPS for a multi-node cluster so a brief outage doesn’t corrupt storage. Factor total cost of ownership against a cheap cloud VM — a Pi cluster wins on learning and tinkering, not always on raw price.
Use cases
Section titled “Use cases”- Kubernetes learning / CKA-CKAD prep on real nodes.
- A homelab monitoring stack (Prometheus
- Grafana), Pi-hole, and self-hosted services behind an ingress.
- Lightweight distributed workloads; small local-LLM experimentation (with realistic expectations — see also the Pi LLM guide).
Related
Section titled “Related”- Kubernetes Setup — the k8s side in depth
- Local LLM Setup — running models on your own hardware
- Raspberry Pi LLM Guide — LLMs specifically on a Pi
- Monitoring with Prometheus and Grafana — a great first cluster workload