Kubernetes Raspberry Pi Cluster: Possible with Weave Net
Sometimes life takes a strange turn. Me writing this blog post for example. Two years ago I was looking for a new platform for building e-services for a former employer. The current solution was nothing more than a couple of web servers....

Sometimes life takes a strange turn. Me writing this blog post for example.
Two years ago I was looking for a new platform for building e-services for a former employer. The current solution was nothing more than a couple of web servers. The solution had to be on-premise and I already had pretty good insight into the Paas market and had been looking at CloudFoundry as well as the first generation of OpenShift. At the same time the great buzz about containers and Docker was building up.
I stumbled onto Kubernetes and found out that the next version of OpenShift would be a total rewrite based on Kubernetes. OpenShift was fairly new and the decision to do a total rewrite must have been a tough one. We were running RHEL7 at work and there was an early version of Kubernetes available. This was in the summer of 2015, when I did some experiments and wrote a report recommending that we should investigate further any solutions based on Docker and Kubernetes.
2015 was a tough year for me personally and at the end of the year I had to take some time off. I was recommended long walks and spending time doing something that I enjoyed. The thing is, I really enjoy building systems and I was really excited about Kubernetes and Docker. I had also started writing short blog posts, to get some experience and for fun.
At the same time Ray Tsang and Arjen Wassink presented Kubernetes on Raspberry Pi at Devoxx Belgium and that fall, Lucas Käldström had been working on the same thing at kubernetes-on-arm. The Hypriot team had done a great job of making Docker run on ARM and Raspberry Pi.
Sometimes things just fall into place, when stars align… Here I was, with lots of spare time, a chance to do something I really enjoy, so I went down to our local Kjell & Company store (electronics store in Sweden) and bought more Pi’s, as well as a switch and some cables. I had this idea that if you could build and run something on a Raspberry Pi-based Kubernetes cluster, then it could run and scale on any Kubernetes plattform. Thinking about running the same software on a couple of $34 SoC boards that sit on your desktop, and that is running in data centers serving millions of users around the world is exciting.
There is also something very satisfying about building your own bare-metal cluster, with power supplies, network cables and so on (plus it looks really awesome in the dark with all the flashing leds).
Shortly after building my first cluster I wrote my first post about running Kubernetes on ARM.
“Kubernetes on ARM” hasn’t always been easy and it would probably have been a lot easier if I just bought a couple of x86 Intel NUC:s. But you want at least three nodes or more in your cluster and that makes it rather expensive and not so available for everyone. I guess that the majority of us have a tight budget and funding is always a problem.
Since I started a little more than a year ago, things have evolved enormously. We now have multi-architecture support in Kubernetes and also tools like kubeadm
that can help you get up and running in no time.
When I was trying to setup a Kubernetes cluster on Scaleway (bare-metal ARM servers cloud provider) I needed to encrypt the traffic between nodes in the cluster. On Scaleway you don’t have your own network so your traffic is running unencrypted within their data center. I didn’t know how to do that using flannel
so I had a look at Weave Net from Weaveworks. Weave Net has the option of encrypting traffic between nodes. But the problem was there wasn’t any ARM version (a common problem in Kubernetes on ARM land) of weave-kube. So I made a small script that rebuilt the components and images for ARM and it worked. Since then and with the latest 1.9.0 release of Weave Net there is now multi-architecture support.
So this is my story of how I got started writing blogs, mostly about Kubernetes on ARM. I have lots of ideas in the backlog and there are many fun things to do and so little time. Thanks for reading my ramblings, hope you picked up something new.
Lars Mogren – The Nature of Software, Norrköping, Sweden