Introduction
Thanks to the Techno Tim YouTube channel I was exposed to Rancher, which for me was sensational. Coming from a background of a person who likes Docker but with ZERO knowledge of Kubernetes -- besides from the fact that I knows that it exists and is a container orchestrator -- discovering a solution that reduces the complexity of using Kubernetes and at the same time being a guide to learn it, Rancher appeared at a good time for me to start learning Kubernetes.
Given this background, I wanted to get my hands on tinkering with the system but run it on my Nanopi M4 -- which is, IMO, the card with the best cost/benefit in the offers that use an ARM chip --; however the process documentation was not easy to find, I tried to follow this tutorial for configuring it on an x86; problems arose, the errors were not clear and I was having my first contact with the platform. After a few hours of frustrating paths, a solution was found and the steps were outlined in this Gist.
Step by step
- Download Armbian -- I used the Bionic server
- Use an ISO burner to burn the system to an SD Card -- I used balenaEtcher
- SSH - the password is
1234
-- in your Nanopi with:ssh -l root your.boar.ip.here
- Create a user and log in again this time with the password you created in the previous step
- Check and install updates:
sudo apt-get update sudo apt-get upgrade -y
- Install Docker:
curl https://get.docker.com | sh
- Follow the steps to add your user to run Docker in superuser mode without having to invoke it
- Start the Rancher:
docker run -d --restart=unless-stopped \ --publish 80:80 \ --publish 443: 443 \ --volume /opt/rancher:/var/lib/rancher \ --volume /lib64:/lib64 \ --volume /etc /cni/:/etc/cni/ \ rancher/rancher: v2.4.5-rc7
- Open your browser and enter your Nanopi ip and follow the Rancher settings steps
- [Extra Step] Always remember when uploading a service, to use
Network Provider
asFlannel
:
Possible Fixes for Some Errors
If you experience problems during or after setup, you can follow these steps:
- Restart your card
sudo rm -r /etc/kubernetes
sudo rm -r /var/lib/rancher
To Do
- Write another post on how to set up a Raspberry Pi Zero W with a MagicMirror client running on it and the server on the Rancher configured in this tutorial
- Test on a Raspberry PI 4 and see if the process remains similar
- Test on a Tinker Board
- Build Jenkigs and/or Chef for ARM and see if they run with Rancher
Appendix
I recommend configuring the following services now since Rancher is already running:
- Heimdall
- Pi-Hole - particularly I don't know if it works well in this scenario, as I use pfBlocker I didn't see the need to configure it, but if you don't have either, this one it would be a start