The one in the picture was my old laptop, then my daughter’s for a few years. Now she got a nice new 2-in-1 ultra book the school asked us parents to buy, this clunky one was gathering dust on shelves. I tried to sell it but got no one’s attention despite it has got i7 CPU and 16GB of memory.
So I was thinking, this has same amount of memory as 4 x Raspberry PI 4, but I probably won’t be able to sell it to pay for the PIs. Why not just use it as a glorified Raspberry PI? I measured its power consumption and to my surprise, this one with gen 4 i7 only asks for 10W when idle and screen off, not bad at all. In comparison 4 x PI 4 probably need 20W to stay up.
Let’s do it then!
I re-installed the OS with Ubuntu Server 20.04 LTS and prepared it for
kubeadm to run with my ansible playbooks here. Since I’ve updated my playbook to let it handle both Raspbian on ARM and Ubuntu on X86_64 it was fairly easy to get the laptop(calling it knode3 afterwards) ready.
I haven’t locked down versions in my playbook so the installed
kubeadm are vastly newer than the ones in my existing Raspberry PI cluster so there will be some compatibility issues if I don’t match them. I used the following commands to downgrade
apt remove docker-ce --purge apt install docker-ce=5:19.03.9~3-0~ubuntu-focal apt install kubeadm=1.18.13-00
kubeadm join command I ran earlier on nodes didn’t work anymore and it complained about the token. Of course the token has expired after a year or so. Here’s command to issue a new token from the master node
kubeadm token create xxxxxx.xxx...
Grab the new token and replace the one in the join command
kubeadm join <master IP>:6443 --token <new token xxx> --discovery-token-ca-cert-hash sha256:<hash didn't change>
For debugging purpose I ran
journalctl -f in the other tab of the terminal to see the output. When the join command finished, I ran
kubectl get nodes in my local terminal session to verify the result
kubectl get node NAME STATUS ROLES AGE VERSION kmaster Ready master 89d v1.18.8 knode1 Ready <none> 89d v1.18.8 knode2 Ready <none> 89d v1.18.8 knode3 Ready <none> 3m v1.20.1
The kubernetes version is a bit newer, maybe I will upgrade the old nodes quickly. Now I have a node which has 16GB of memory 🙂
PS. to keep the laptop running when the lid is closed I used this tweak.
UPDATE: Now I’ve put another 3 old laptops into the cluster!
2 responses to “Hybrid Kubernetes Cluster (X86 + ARM)”
[…] could be the next big thing in cloud automation so I’d give it a try with my in house hybrid Kubernetes cluster. I was recommended to try Flux CD and there’s a good reference project initiated by my […]
[…] is a great feature in Kubernetes to assign pods to nodes based on labels. In my case, I have a hybrid Kubernetes cluster with half nodes are of X86 architecture and other half of ARM architecture, and I need to deploy […]