Kubernetes Raspberry Pi Cluster — The Story

Ray Tsang
Google Cloud - Community
3 min readFeb 6, 2016

I travel and attend many conferences around the world. In November, 2015, I spoke about Java-based Microservices with Spring Boot, Containers, and Kubernetes at J-Fall. After my session, I walked around the exhibition hall and saw this on a booth table:

Quintor’s Raspberry Pi Cluster at JFall

I stood there and stared at it for almost an hour. I was mesmerized by the blinking lights, the cables, and how every component fit perfectly. It reminded me of a time when I used to put together computers, networking them together with ancient network software and hardware that looked like this:

A 10Base2 Network Interface Card, Photo by Helix84 / CC BY

I remembered physically pulling cable from one room to another, followed by the excitement of being able to send a text message from one computer to another.

When I saw the Raspberry Pi cluster, I realized that I no longer play with hardware and real, physical clusters of machines anymore. Nowadays, I only use a single laptop, and it’s connected to the world via Wi-Fi! I realized that a Raspberry Pi cluster could be the modern version of what I used to work with, but much cheaper and smaller.

Today’s data centers are extremely sophisticated. They need to provide highly available and fault tolerant services, and they need to answer this question: What happens when some piece of hardware fails and how do you handle those failures gracefully?

Google created Kubernetes — an open source container orchestration tool. It was created based on Google’s experience with its internal tool called Borg.

Borg is “a cluster manager that runs hundreds of thousands of jobs, from many thousands of different applications, across a number of clusters each with up to tens of thousands of machines.” — Large-scale cluster management at Google with Borg

With Kubernetes, users can easily schedule multiple instances of an application onto a cluster of machines. If one application instance dies, Kubernetes can automatically restart the instance. More importantly, if one physical machine in the cluster malfunctions, Kubernetes will automatically reschedule the work on that machine to another healthy machine.

Then I thought it would be great if we could use Kubernetes to manage this Raspberry Pi cluster — then we could play real chaos monkeys! We could run some services on this cluster, pull some cables, and then see how the cluster behaves and how the applications respond. Sure, you may be able to simulate this in the cloud — but I like to pull physical cables!

Arjen Wassink was the team lead at Quintor who built the Raspberry Pi cluster on display at J-Fall. I told Arjen about the idea and within days, Arjen and his team installed Kubernetes on their Raspberry Pi cluster. A couple days later, we presented it at Devoxx Belgium, and it was a lot of fun!

A short, cut, version of our talk

You can build one yourself too! Read Everything you need to know about the Kubernetes Raspberry Pi cluster to find the hardware, software, network configuration, and demo software setup instructions.

Last but not least, you can run Kubernetes in the cloud too! One of the easiest way to run a Kubernetes cluster is using Google Container Engine. Give it a try!

--

--

Ray Tsang
Google Cloud - Community

Loves #Java. Lives in NYC. Creator of @JDeferred. Ex @Google @JBoss, @RedHatSoftware, @Accenture. Opinions stated here are my own.