Notes on Building a Raspberry Pi Kubernetes Cluster (Part 1: the Hardware)

Late last year I started thinking about building a Raspberry Pi cluster. For years I’d read about people running Kubernetes on Raspberry Pis and thought that the experience of building a Pi cluster would be a great learning exercise, but didn’t want to build a cluster to just run toy projects. But when the Pi 4 appeared, I felt that the time had come to try to build something useful (and fun).

The Hardware

Early this year I started gathering parts; first a couple of Pi 4 boards from Adafruit, and then after looking at lots of cluster racks I found a hardware setup that I liked: the UCTRONICS Pi 4 rack mount, which lets me mount four Pi 4s in a 1U rack mount and includes adapters to bring the Pi’s HDMI ports to the front of the rack. Since I didn’t already have a rack (and didn’t want a big one), I got the StarTech 8U Desktop Rack which gives me a nice light assembly that I can easily carry back and forth between my garage workbench and my desk. It’s bigger than most Pi cluster racks but sturdy and has plenty of room for growth and change.

Parts and price list for an 8–way Raspberry Pi 4 cluster, Feb 2021
The shelf is on top for easy access to the switch, but this rack just takes minutes to rearrange!
The PoE hats aren’t here yet, but when they are, CAT-6 cables will be the only connections to most of the Pis.
Messy but working, here I have 2 8GB, one 4GB, and one 2GB Pi 4s, all USB-powered (no PoE hats yet), and a portable hard drive.
The bottom side of a PoE hat
One rail filled with Pis, with PoE hats installed on the top three. Note how the screws mounting the boards to the rail prevent use of two of the standoffs that came with the PoE hats.

Software developer in the SF Bay area. Electronic Design Automation, iOS apps, and now API tools for the world’s largest computer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store