How to Build a 28‑Core Raspberry Pi Cluster (Kraken) with Docker Swarm & Kubernetes
This guide walks you through constructing a 28‑core Raspberry Pi 3B cluster named Kraken, upgrading it with USB gigabit adapters, configuring Docker Swarm and Kubernetes, and measuring performance improvements for self‑hosting a WordPress site.
Kraken Overview
Machine‑learning enthusiast WILL HO built a self‑hosted WordPress blog on a Raspberry Pi cluster called Kraken, which consists of seven Raspberry Pi 3B nodes powered by a single USB charger. The original Octopi cluster (one Pi 1B + four Pi 1B) suffered severe performance bottlenecks, with a single WordPress page taking about 10 seconds to load.
Kraken’s hardware layout (seven Pi 3B units) was limited by an eight‑port consumer‑grade switch, leaving one port for the router. The author chose a 32 GB MicroSD card for the first node to serve as the Docker Swarm manager and anticipated additional storage for Docker images.
Gigabit Upgrade
The built‑in Ethernet on Pi 3B caps at 100 Mbps (≈8 MB/s). Inspired by Jeff Geerling’s blog, the author added inexpensive USB‑gigabit Ethernet adapters and a gigabit switch, raising the theoretical bandwidth to over 200 Mbps.
Performance Benchmark
Before the upgrade, an iperf test showed a maximum bandwidth of 93.1 Mbps:
~ ❯ iperf -c 192.168.3.11
------------------------------------------------------------
Client connecting to 192.168.3.11, TCP port 5001
TCP window size: 129 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.71 port 57041 connected with 192.168.3.11 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 111 MBytes 93.1 Mbits/secAfter installing the gigabit adapters, the same test reported 224 Mbps:
~ ❯ iperf -c 192.168.3.11
------------------------------------------------------------
Client connecting to 192.168.3.11, TCP port 5001
TCP window size: 145 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.71 port 57298 connected with 192.168.3.11 port 5001
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 268 MBytes 224 Mbits/secAlthough each node now enjoys roughly 131 Mbps, real‑world throughput is limited by the shared USB 2.0 bus, which also serves the Ethernet port, SD‑card slot, and all USB ports.
Considerations
Web services rarely sustain full bandwidth continuously; the upgrade mainly speeds up initial loading of large assets, after which browsers cache them. The notorious shared USB 2.0 bus on Pi 1‑3 further caps effective bandwidth, as the 480 Mbps theoretical limit is split among Ethernet, SD‑card, and USB devices.
Why Choose This Cluster?
The setup is compatible with the latest Docker images and runs on the armv7 architecture of Pi 3B, which remains backward‑compatible with code compiled for armv7. It is ideal for bandwidth‑intensive but not write‑heavy workloads such as personal blogs, file‑sync services, media libraries, and note‑taking apps. Heavy continuous writes (e.g., video encoding) may still be limited by the USB 2.0 bottleneck.
Overall, building a Raspberry Pi 3 cluster offers a cost‑effective way to learn Docker Swarm and Kubernetes, and it will likely remain a valuable learning platform for the foreseeable future.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
