Building low power HA cluster for self hosted services/blog Building low power HA cluster for self hosted services/blog kubernetes kubernetes

Building low power HA cluster for self hosted services/blog


Raspberry Pi, ODroid, CHIP, BeagleBoard are all suitable hardware.Note that flash card has a limited lifetime if you constantly read/write to them.

Kubernetes is a great option to learn clustering containers. Docker Swarm is also good.None of these solutions provide distributed storage, so if you're talking about a PHP type web server and SQL database which are not distributed, then you can't really be redundant even with Kubernetes or Swarm.To be effectively redundant, you need master/slave setup for the DB, or better a clustered database like elasticsearch or maybe the cluster version of MariaDB for SQL, so you have redundancy provided by the database cluster itself (which is not a replacement for backups, but it better than a single container)

For real distributed storage, you need to look at technologies like Ceph or GlusterFS. These do not work well with Kubernetes or Swarm because they need to be tied to the hardware. There is a docker/kubernetes Ceph project on Github, but I'd say it is still a bit hacky.Better provision this separately, or directly on the host.

As far as load balancing is concerned, you ay want to have a couple nodes with external load balancers for redundancy, if you build a Kubernetes cluster you don't really chose what else may run on the same node, except by specifying CPU/RAM quota and limits, or affinity.


If you want to have a try to Raspberry Pi 3 in Kubernetes here is a step by step tutorial to setup your Kubernetes cluster with Raspberry Pi 3:

To prevent de read/write issue, you might consider purchasing and additional NAS device and mount it as volume to yours pods

Totally agree with MrE with the distributed storage for PHP-like. Volume lifespan is per pod, and is tied to the pod. So you cannot share one Volume between pods.