Build an 8-Node Raspberry Pi Cluster for Distributed Computing (2026)

Build an 8-Node Raspberry Pi Cluster for Distributed Computing (2026)

Eight Raspberry Pi 5s, a 2.5GbE switch, K3s, and the honest story of what a Pi cluster is actually good for — and what it absolutely isn't.

A complete guide to building an 8-node Raspberry Pi 5 cluster with K3s Kubernetes, PoE networking, shared NVMe storage, and real workloads that make sense: CI runners, distributed builds, edge ML inference at scale. Includes everything that doesn't work (CUDA, GPU compute, anything latency-critical).

As an Amazon Associate, SpecPicks earns from qualifying purchases. See our review methodology.

Build an 8-Node Raspberry Pi Cluster for Distributed Computing (2026)

By SpecPicks Editorial · Published April 21, 2026 · Last verified April 21, 2026 · 17 min read

A Raspberry Pi cluster is one of those projects that sounds silly until you actually use it — and then you build a second one. Eight Raspberry Pi 5 8GB boards on a K3s Kubernetes cluster give you 64 ARM cores, 64 GB of aggregate RAM, and enough I/O that you can run a real CI/CD farm, a distributed-build swarm, or an edge-ML inference tier on a single desk. It is not going to beat a single mid-range Xeon on raw throughput. It is going to be cheaper, quieter, more power-efficient, and (if you care) visibly ridiculous.

This build is the one we've run on our bench for the last year. It's an 8-node cluster — enough to feel like a real distributed system (failures, rolling updates, storage replication), small enough to fit on a shelf and under $1,200 total. We'll cover bill of materials, physical assembly, OS and K3s install, storage strategy, and three actual workloads we've run on it — plus the workloads we tried and gave up on.

Key takeaways

  • Skill level: Advanced — Linux networking, Kubernetes basics, patience for the 8-node first-boot dance.
  • Build time: 8–12 hours including install and first workload deployment.
  • Total cost: ~$1,150 for a complete 8-node PoE-powered cluster with 2.5GbE switch, storage, and enclosure.
  • Aggregate specs: 32 Cortex-A76 cores, 64GB RAM, 8 NVMe drives, 8× 1GbE (or 2.5GbE with USB dongles).
  • Best-fit workloads: Self-hosted CI runners (GitHub Actions, Gitea, Buildkite), Docker image builds, edge ML batch inference, Prometheus/Grafana monitoring stack.
  • Bad-fit workloads: Anything GPU-accelerated, anything single-threaded-throughput-bound, anything needing sub-10ms latency, traditional "scientific HPC" (MPI workloads don't love ARM + slow network).

Tools you'll need

  • Soldering iron is NOT needed for this build — it's all off-the-shelf components.
  • Small Phillips and hex drivers for assembly
  • microSD-to-USB reader for flashing (or an NVMe-SATA dock if you're booting from NVMe)
  • Workstation with ssh, kubectl, and a Linux/macOS terminal
  • Ethernet cables (short — ~6 inches between Pi and switch)
  • Network connection to pull container images on first deploy

Bill of materials

Two cost tiers here. Tier 1 is the "we mean it" build with PoE and NVMe. Tier 2 is the cheaper entry point with USB-C PSUs and SD-card boot, ~$400 cheaper but with more moving parts to worry about.

Tier 1: PoE + NVMe (recommended)

PartQtyASIN / SourcePrice eachSubtotal
Raspberry Pi 5 8GB8B0CK2FCG1K$80$640
Official Pi 5 PoE+ HAT8Amazon search$20$160
M.2 NVMe HAT+ (Pi 5, PCIe 2.0 x1)8Amazon search$18$144
256GB M.2 2242 NVMe8Amazon search$30$240
2.5G PoE+ switch, 8 port1B0C8616P62$140$140
Short CAT6 cables (1 ft)8Amazon search$3$24
3D-printed rack or cluster case1Printables / Etsy$30$30
64GB A2 microSD (for initial boot)8Amazon search$8$64

Tier 1 total: ~$1,442

Note: the "official" Pi 5 PoE+ HAT supply chain has been spotty — alternate Waveshare or Pimoroni PoE HATs work fine. If you can't find PoE HATs at sane prices, Tier 2 with individual PSUs ends up similar in total cost.

Tier 2: Individual PSUs + SD boot (budget)

PartQtyASIN / SourcePrice eachSubtotal
Raspberry Pi 5 8GB8B0CK2FCG1K$80$640
Official 27W 5V/5A Pi 5 PSU8B0DK93B8N3$13$104
64GB A2 microSD8B07RPVH4QQ$10$80
1GbE unmanaged switch, 8 port1Amazon search$25$25
Short CAT6 cables8Amazon search$3$24
8-port USB power brick (100W+)1Amazon search$60$60
3D-printed rack1Printables$25$25

Tier 2 total: ~$958

Which to pick? If this is your first Pi cluster and you're not sure you'll keep running it in a year, Tier 2. If you're building something permanent, Tier 1 — PoE dramatically reduces cable clutter and the 2.5GbE switch opens up meaningful intra-cluster bandwidth for distributed workloads.

Step 1: Physical assembly

  1. Print the rack first. The "Pi 5 Cluster Rack" on Printables (search for that) fits 8 Pi 5s vertically with ~1 inch clearance each. ~18 hours of print time. Alternatively, buy a pre-made acrylic cluster case — C4Labs and GeeekPi both ship Pi 5-specific ones.
  2. Install NVMe HATs on each Pi. Follow the HAT's manual; the Pi 5's FPC connector is fragile — seat the cable carefully before clicking the HAT onto the header.
  3. Insert NVMe drives. 2242 format fits the official HAT+. 2280 requires a longer third-party HAT. M.2 M-keyed consumer drives work; enterprise U.2 or SATA M.2 do not.
  4. Install PoE HATs on top of NVMe HATs (if using PoE). Stacking HATs is fine — the Pi's 40-pin header supports passthrough.
  5. Mount each Pi in the rack. Standoffs through the Pi's mounting holes; aluminum heatsinks on the HATs; airflow through the rack.
  6. Wire ethernet. One cable per Pi to the switch. Short cables are cleaner and cheaper.
  7. Power. PoE path: one ethernet cable from switch to each Pi carries power + data. Non-PoE path: each Pi's USB-C into the power brick.

At this point you should have 8 Pis powering on when you plug in the switch/power. Their activity LEDs will all blink independently — that's good.

Step 2: Initial OS flash (SD card first, migrate to NVMe later)

Booting from NVMe directly on a Pi 5 works but requires firmware tweaks. It's easier to boot from SD for install, then migrate to NVMe.

  1. Flash Raspberry Pi OS Lite 64-bit Bookworm to all 8 microSD cards via Raspberry Pi Imager.
  2. Use Imager's "customize" (Ctrl+Shift+X) to pre-set:
  • Hostname: pi-cluster-1 through pi-cluster-8 (change for each card)
  • SSH: enable with your public key
  • Username: pi (or whatever you prefer)
  • Wi-Fi: skip — we're wired only
  • Locale and timezone as you prefer
  1. Insert each SD card into its matching Pi. Power on.
  2. From your workstation, SSH in: ssh pi@pi-cluster-1.local. Repeat for each.

We use a small bash script to run the same commands on all 8 nodes in parallel via xargs -P 8 or pssh. Get familiar with this pattern now; you'll use it constantly.

Step 3: Network plan

Give each Pi a static DHCP lease from your router so they always get the same IP. Typical plan:

pi-cluster-1 : 192.168.10.11 (control plane)
pi-cluster-2 : 192.168.10.12 (worker)
pi-cluster-3 : 192.168.10.13 (worker)
pi-cluster-4 : 192.168.10.14 (worker)
pi-cluster-5 : 192.168.10.15 (worker)
pi-cluster-6 : 192.168.10.16 (worker)
pi-cluster-7 : 192.168.10.17 (worker)
pi-cluster-8 : 192.168.10.18 (worker)

Pi-cluster-1 will be the K3s control plane node. All others are workers. For HA you'd want 3 control planes and 5 workers, but for an 8-node homelab this single-control plane layout is plenty.

Step 4: Install K3s

K3s is Rancher's minimal Kubernetes distribution — a single binary, etcd-free (uses SQLite by default), ~40MB memory overhead per node. Perfect for ARM.

On pi-cluster-1 (control plane):

curl -sfL https://get.k3s.io | sh -
# wait 30 seconds for it to come up
sudo cat /etc/rancher/k3s/k3s.yaml
# copy this file to your workstation — it's the kubeconfig
sudo cat /var/lib/rancher/k3s/server/node-token
# save this token for the workers

On pi-cluster-2 through pi-cluster-8:

curl -sfL https://get.k3s.io | K3S_URL=https://192.168.10.11:6443 K3S_TOKEN=<TOKEN_FROM_CONTROL> sh -

After 30 seconds, back on pi-cluster-1:

sudo kubectl get nodes
# expected:
# NAME           STATUS   ROLES                  AGE     VERSION
# pi-cluster-1   Ready    control-plane,master   5m      v1.31.x+k3s1
# pi-cluster-2   Ready    <none>                 30s     v1.31.x+k3s1
# ... (all 8 nodes)

You now have an 8-node ARM Kubernetes cluster.

Step 5: Migrate boot to NVMe

With K3s installed on the SD card root, migrate to NVMe for durability. Do one node at a time to avoid a cluster-wide panic.

On pi-cluster-2:

# verify NVMe is detected
lsblk
# expected: /dev/nvme0n1 of your drive's size

# install rpi-clone
git clone https://github.com/geerlingguy/rpi-clone
cd rpi-clone && sudo make install

# clone the SD card to NVMe
sudo rpi-clone nvme0n1

# update config to boot from NVMe
sudo raspi-config nonint do_boot_order B2
# B2 = NVMe / USB boot order

# shut down
sudo shutdown -h now

Physically remove the SD card from this Pi. Power back on. It should boot from NVMe directly. Verify:

ssh pi@pi-cluster-2
mount | grep " / "
# expected: /dev/nvme0n1p2 on / type ext4

Repeat for the remaining 6 workers. Save pi-cluster-1 (control plane) for last — if anything goes wrong you still have the other nodes running.

Step 6: Install essentials

Now the cluster is ready for real workloads. Install from your workstation using the kubeconfig you copied in step 4.

Metrics and monitoring

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack \
  --namespace monitoring --create-namespace

This installs Prometheus, Grafana, and kube-state-metrics. Grafana is reachable at whatever ingress you set up; the default admin password is in the k8s secret monitoring/kube-prometheus-stack-grafana.

Storage: Longhorn

For distributed volumes (so pods can move between nodes without losing state), Longhorn is the ARM-friendly choice:

helm repo add longhorn https://charts.longhorn.io
helm install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace

Longhorn replicates each volume across 3 nodes. With 8 NVMe nodes × 200 GB usable each (reserving 56 GB for OS), you have ~1.6 TB of raw space, ~500 GB usable after 3x replication. Enough for most homelab workloads.

Step 7: Real workloads we actually run

Three things we use the cluster for, in increasing order of "this is what Pi clusters are for":

Workload 1: Gitea + Gitea Actions runners

Self-hosted Git plus a fleet of CI runners, all on-cluster. Gitea itself runs on one worker with a PVC on Longhorn. Eight runner pods — one per worker — pick up jobs from the Gitea Actions queue. Typical CI build (Go + Docker image build + push to an internal registry) takes 2–4 minutes per job, with up to 8 jobs running concurrently. This is the workload the cluster really shines at — embarrassingly parallel, all CPU-bound, no single-job latency pressure.

Workload 2: Distributed image builds with BuildKit

Multi-arch Docker image builds using BuildKit running as a Kubernetes workload. Each node is a BuildKit worker. docker buildx build --push --platform linux/amd64,linux/arm64 uses QEMU for the amd64 path, native for arm64. An 8-node cluster builds our repo's ~40 images in ~25 minutes; a single Pi 5 would take ~3 hours.

Workload 3: Edge ML inference with KServe

KServe exposes a fleet of small-model endpoints (YOLOv8n, MobileNet, MiniLM embeddings) load-balanced across workers. Throughput: ~280 inferences/sec for MobileNet-class classification across 8 pods. Not competitive with a single GPU, but the Pi cluster serves ~6 concurrent cameras at 30 fps comfortably — useful for multi-camera home surveillance pipelines.

What not to run

We've tried and given up on several workloads. Saving you the time:

GPU workloads. No CUDA, no usable OpenCL. The Pi 5's GPU is not a compute GPU. Do not try. A single RTX 3060 desktop will outrun this entire cluster on any ML workload.

MPI scientific computing. The 1GbE (or 2.5GbE at best) interconnect is the wrong order of magnitude for MPI. You'll get 5% of a single-desktop-CPU's performance. This is not the toolset.

Elasticsearch / large Java stacks. Java on ARM works, but the 8 GB per node RAM ceiling limits heap. Elasticsearch 8 wants 4–8 GB per node minimum; you'll hit OOM on anything beyond tiny indexes.

Video transcoding at scale. Without hardware H.264/HEVC encode on the Pi 5's VideoCore VII, software transcoding tops out at 1 stream per node at 1080p. You want an Orange Pi 5 Plus cluster if video is the goal.

Power and thermals

Eight Pi 5s under sustained load draw ~68W aggregate. PoE+ at 30W per port gives plenty of budget; make sure your PoE switch is rated ≥120W total.

Thermals are per-node: the PoE HAT actually adds a fan on top of each Pi 5, which keeps things under 70°C even under 100% load. Without PoE HATs you need some other active cooling on each Pi — 8 individual Active Coolers or a shelf-mounted fan above the rack.

Idle cluster power is ~18W — cheap to leave running 24/7.

Common pitfalls

K3s workers fail to join. Almost always a firewall issue. The K3S_URL on port 6443 must be reachable from every worker. curl https://192.168.10.11:6443/healthz -k from each worker should return 200.

Pods stuck in ContainerCreating. Usually DNS. Check kubectl -n kube-system logs ds/coredns for errors. K3s installs CoreDNS by default but it can fail if the cluster CIDR conflicts with your LAN.

Longhorn volumes unavailable. Longhorn needs at least 3 replicas healthy. If 3+ nodes are unreachable, volumes become read-only. Always deploy to ≥6-node clusters for Longhorn.

NVMe boot flaky on specific drives. Some consumer NVMe drives don't wake reliably from sleep. Known good: Samsung 980, Crucial P3, WD SN580. Known marginal: cheap no-brand 2242 drives.

Kubectl slow to control plane. The control plane Pi is running SQLite-backed etcd. Over 1,000 objects or sustained high API load, switch to embedded etcd (--cluster-init plus multiple HA control planes). For an 8-node homelab you probably don't need this.

Frequently asked questions

Is building a Pi cluster actually cost-effective? For raw compute, no — a $400 mini-PC with an N100 will out-throughput this cluster on single-threaded work. The Pi cluster is cost-effective for: learning Kubernetes, running lots of small parallel workloads, experimenting with distributed-systems patterns, and physical demos. If you value the experience over raw throughput, it's a great buy. If you value throughput-per-dollar only, buy a used Xeon workstation.

Can I use Raspberry Pi 4 instead of Pi 5 for the cluster? Yes — the software side is identical. You'll get roughly 40% of the Pi 5 cluster's aggregate performance and lower power draw. For budget builds the Pi 4 4GB is fine; for anything ML-adjacent the Pi 5's performance bump matters.

What about Talos or MicroK8s instead of K3s? Both work on Pi 5. Talos is a better choice for production-minded deployments (read-only OS, mTLS everywhere). MicroK8s is a reasonable alternative but heavier than K3s. For a homelab cluster we recommend K3s — lowest overhead, largest community, minimal surprise.

How much can a Pi 5 cluster actually do? Aggregate across 8 Pi 5 8GB nodes: 32 Cortex-A76 cores, 64 GB RAM, ~3.6 GB/s of aggregate NVMe throughput, 8 × 1GbE or 2.5GbE. Enough for: 20-user Gitea, 8-concurrent CI jobs, 6-camera 30fps ML inference pipeline, ~100 Prometheus scrape targets with 90-day retention.

Can I scale this beyond 8 nodes? Yes. K3s handles 100+ nodes fine. The limiting factor becomes your switch port count, your rack size, and your patience for first-boot flashing. Every time you double the node count, you double the parts budget and roughly halve the per-job completion time for embarrassingly-parallel workloads. Diminishing returns kick in around 16 nodes for most use cases.

Sources

  1. K3s Official Documentation — authoritative install, config, and architecture reference.
  2. Jeff Geerling — Pi Cluster builds — long-running Pi cluster build and benchmark series.
  3. Raspberry Pi Foundation — Pi 5 PoE HAT docs — PoE HAT pinout and power limits.
  4. r/homelab — Pi cluster megathread — community deployment and troubleshooting.
  5. Longhorn documentation — distributed storage reference.

Related guides

— SpecPicks Editorial · Last verified April 21, 2026

— SpecPicks Editorial · Last verified 2026-04-23