Setup Minikube on RPi4 4GB — Ubuntu Server 20.04 LTS

Akash Kumar
2 min readOct 4, 2021

--

Even learning a new tech from scratch could be pretty hard if you are unable to setup the basic environment on your machine.

Photo by JESHOOTS.COM on Unsplash

Was going through the same hurdle while learning Kubernetes and hence I came here to help any newbie to setup the basic environment on the Raspberry Pi 4–4 GB to play around with the Minikube with the step-by-step process. I have tried to document it as crisp as possible and making it clutter free. Keeping in mind that anyone reading this article has a basic understanding of RPi/SSH/Linux.

  1. Burn OS Ubuntu Server 20.04 LTS — using Raspberry Pi Imager. —
Snap from a Pi Imager
  • Start the Imager and open the “CHOOSE OS” menu
  • Scroll down the menu click “Other general-purpose OS”
  • Select OS as above in the image.
  • Open the “SD Card” menu and select your SD card.
  • Click “WRITE” and wait for the OS to burn on the SD card.

2. Verify and follow below steps

  • Make sure you able to access your RPi via SSH or by connecting keyboard and HDMI display.
  • Verify sys. architecture — Run
sudo dpkg --print-architecture
should give output as —> arm64
  • Edit below file
sudo nano /boot/firmware/cmdline.txt
Append ->
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
sudo reboot
To verify the changes ->
cat /proc/cmdline

3. Install Docker (Minikube — DRIVER) (Ref. )

sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-commoncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -sudo apt-key fingerprint 0EBFCD88sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"sudo apt-get updatesudo apt-get -y install docker-cesudo usermod -aG docker $USER && newgrp docker

4. Install Kubectl (Ref.)

sudo apt updatesudo apt install snapdsudo rebootsudo snap install coresudo snap install kubectl --classic

5. Install Minikube (Ref.)

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-arm64sudo install minikube-linux-arm64 /usr/local/bin/minikube

6. Start the Cluster

minikube start or minikube start –driver=docker

7. Accessing your cluster

kubectl get po –A
Should look like this.

THE ABOVE STEPS ARE TRIED AND TESTED ON A PERSONAL RPi 4, Please feel free to ask any questions in the comment section.

Cheers!

--

--