Once you have built your first docker application on Raspberry-Pi and tried your hands on some cool projects, you start noticing something. Your dopamine effect starts waning, and you experience that itchy feeling.You know that it is time for the next hit! At least, that's what happened to me. I did not have to scout for long to keep my dopamine affect going. Anybody that's started on docker on Raspberry-Pi knows that the next step is put together a kubernetes (k8) cluster.So, I went ahead and put together one.
It was indeed fun, and I learned a lot along the way.There are tons of posts online that guides you on setting up K8s on Raspberry-Pi but I have not seen ( maybe I did not search enough) any posts that provide adequate information to consider before you begin your project.So, thought would write a post on things to consider before you start building your K8 cluster on Raspberry-Pi
Your button does not have to be big & powerful!
A quick look online would show tons of guides and pictures that show big and powerful K8s built on Raspberry-Pi. Many posts recommend a minimum 3-4 stack configuration with one master and 2-3 worker nodes.Please remember that serious techies write most of these posts.If you are a beginner, hobbyist or just a curious cat like moi, a simple two-node configuration will suffice. One for master and one for the worker node.Guess what, you still retain the gloat factor.
You do not need a big hardware list and complicated wiring
If you look at the pictures of the setup, you will notice all the intricate wiring between the Pis, switch and the router.You can do away with some of the parts. Again, remember, this is for beginners that want to a simple set up to learn K8.
Bill of Materials - Super Bare Bone
1. Raspberry-Pi : 2 nos
2. 32GB MicrSDHC card -2 nos
3. 2 port USB charging hub- 1
Estimated Total Price - Approx EUR 90.00
Bill Of Materials - Optional
4.Cluster case: If you have a creative bent of mind or few pieces of Lego blocks lying around, suggest you look at this link
5.Five port switch : I made this optional since you can connect your Pi to wifi and it will still work.
7.Router : Again, this is optional since most home routers are good enough for beginners. I tried both the wired and wireless options and both worked great!
Limited availability of applications for arm architectureIt is essential to understand that the apps available for the arm are limited. The list keeps growing but limited compared to amd64.
Helm - limited charts for arm architectureFor a beginner, installation of application package manager like Helm on Raspi can be quite tricky.Even if you manage to get it installed, there aren't many charts available for arm architecture.
A multi-architecture node set up could be challengingI tried setting up a multi-architecture node with my Intel NUC(x86) and Raspi.It was not easy. At least, as a beginner, I struggled and had not managed to set up a stable cluster.Check out the daemon set issues referenced below.
Final thoughtsSetting up a K8 cluster on Raspi is a lot of fun, and you get to learn a LOT in the process. That said, given the limited applications available for arm architecture, you may not be able to do much after the setup.If you want to gain a high-level understanding of K8s, a minikube setup on your laptop will suffice.If you are keen to set up your K8 cluster on Raspberry-Pi,do watch out for my next post. I will be posting not only the installation steps but also key "gotchas" to watch out for. Happy learning!
References1. Helm Charts
2. Helm binaries for arm
3. Kubernetes: Well known Labels,Annotations and Taints
4. Daemon set issues for different architectures
Disclaimer: This post does not represent the thoughts,intentions, plans or strategies of my employer. It is solely my opinion.Feel free to challenge me, disagree with me and share your thoughts in the comments section