The Hotel Hero

Notes by a Sysadmin


Cluster | Philosophy | Stack

Docker Swarm vs K8s - Pi cluster

April 5, 2021 | Cluster

In my experience Swarm is the ideal orchestration tool for ARM based clusters. Wait! Isn't Kubernetes the future for orchestration, and will Docker not drop support for Swarm in 2022 (you might say). And yes, very sadly! Most datacenters and companies working with container orchestration is moving towards the more complex Kubernetes solutions. And there might be resons for datacenters to have more complex orchestration tools. BUT, when that is said I'll tell you why you would go for Docker Swarm in you Pi cluster, in the following. (And were you planing to pay for support plan anyway?)

About one year ago i wrote my first project (about DevOps) and setup a pi cluster on K3s and yes, I succeded in getting something up and running for show-off to the examination after a lot of troubleshooting. I continued to work on the K3s setup for a while, in the conviction that I just needed to know more stuff about K8s. But, I never really came to a point where my setup felt stable and 98 % of the time I spend was on debugging, errorhandling, log-reading, troubleshooting and reading Stackexchange discussions. So, at some point I decided to try out Microk8. But, the same headaches began here as soon as I started to work with stateful applications. 

In my experience the people behind the above mentioned orchetration tools have done a great job. All hell tends to break loose as soon as you start to deploy anything else than the standard stateless deployment. So, after more than a year of hard work trying to make something useful of my Pi cluster (that honestly was doomed from the start), I setup a Swarm cluster as a last resort. And what a blessing!

Docker Swarm feels more like an extension of the existing docker universe, easy to understand and easy to use. Complex enough to run a datacenter, but simple and lightweight enough to run on a Raspberry Pi. You will actually pretty soon find yourself working with the applications in the cluster and not the cluster it self.

One of my big mistakes, was that I did'nt listen to the people who actually gave me the above advice. My excuse was that I needed to learn more about Kubernetes. But, ARM based K8s orchestration is just not mature enough to learn much at this point. There will be an overwhelming amount of failures and only very few successes. So, please don't forget that Swarm exists, if you are going to ignoring my advice to you.

If you have a blank Pi, start by setting up an OS and make the Pi ready before installing Docker Swarm.


About

I'm a Sysadmin, network manager and cyber security entusiast. The main purpose of this public "notebook" is for referencing repetitive tasks, but it might as well come in handy to others. Windows can not be supported! But all other OS compliant with the POSIX-standard can (with minor adjustments) apply the configs on the site. It is Mac OSX, RHEL and all the Fedora based distros and Debian based (several 100's of OS's), all the BSD distros, Solaris, AIX and HP-UX.

Links