DIY Kubernetes cluster with x86 stick-pcs

17,264 reads

Raspberry Pi kubernetes clusters have been done many times before. These mini clusters are really fun to put together. The problem with using raspis is they are ARM devices. This means they can only run ARM compatable containers which is a huge drawback. The vast majority of containers in Dockerhub are x86.

I set out to find a building block for my cluster that was cheap in price and fit my requirements:

x86 compatible platform Cheap At least 2GB memory Powered by usb Ethernet port

Browsing Aliexpress I stumbled across this gem that hit all the marks: https://www.aliexpress.com/item/Fanless-Ubuntu-14-04-Intel-PC-Stick-Star-Cloud-PCG02U-Mini-PC-Bay-Trail-Z3735F-2GB/32653580885.html?spm=2114.13010608.0.0.5uVT7o

This really is a slick little “stick pc”. For under $70 each one packs:

x86 quad-core 1.33 ghz intel atom processor

2GB memory

32GB flash storage

Compact, fanless design that is powered by micro-usb

I immediately snatched up 5 of them. For $340 I now had a cluster

20 x86 cores

10GB memory

160GB storage

I then paired these with a usb hub for power and a switch for connectivity

Once the sticks arrived I started playing with one of them. They come with 14.04 trusty installed. Desktop performance was ok but I wanted to free up memory and space for containers instead of wasting it on a desktop. The great thing about these sticks is that they are literally just tiny pcs, you can install any linux distro easily. I rebooted one and mashed a bunch of f-keys until I was able to get to the BIOS. There I was able to change the boot order and install Ubuntu Xenial from a thumb drive. Success!

After repeating this 5 times, I was then able to easily installed Docker with apt-get install docker.io

Once docker was on all the sticks, I decided to use kube-deploy to turn-up my cluster.

My next steps for the cluster include getting Spinnaker running on the cluster. This could then be used as the ultimate continuous delivery appliance.

Tags