Rancher + ARM

Rancher + ARM

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

  1. Download Armbian -- I used the Bionic server
  2. Use an ISO burner to burn the system to an SD Card -- I used balenaEtcher
  3. SSH - the password is 1234 -- in your Nanopi with:
    ssh -l root your.boar.ip.here
    
  4. Create a user and log in again this time with the password you created in the previous step
  5. Check and install updates:
    sudo apt-get update
    sudo apt-get upgrade -y
    
  6. Install Docker:
    curl https://get.docker.com | sh
    
  7. Follow the steps to add your user to run Docker in superuser mode without having to invoke it
  8. 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
    
  9. Open your browser and enter your Nanopi ip and follow the Rancher settings steps
  10. [Extra Step] Always remember when uploading a service, to use Network Provider asFlannel:

84968426-d75a2100-b0ec-11ea-9bdc-2285ee2fa74b.png

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

Appendix

I recommend configuring the following services now since Rancher is already running:

  1. Heimdall
  2. 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

References