Skip to content


I have decided to use Ubuntu 20.10, since this one will now boot from USB out of the box, and is not in Beta, like Raspberry Pi OS 64bit.

Raspberry Pi 4 Kubernetes node

Tools / Downloads

Hardware to have

  • Some kind of PC to set up the USB and SD card (windows ideally, but can be done with Linux or Mac just as well. We will focus on Windows).
  • SD card reader
  • USB keyboard / Micro HDMI cable / Monitor
  • Rpi4 of course (just don’t go overboard with so many 😀)
  • USB-C cable and way to power the Rpi4

Update Raspberry Pi 4 firmware

Most likely, you will have to update the firmware on Raspberry Pi 4 to enable USB boot. This firmware is out of beta and marked stable, so we should be ok. Sadly, there is an additional step you need to take: get the Raspberry Pi Imager and have it write Raspberry Pi 4 EEPROM boot recovery to the SD card. This is a super small and fast way to update firmware and enable boot from USB.

Raspberry Pi 4 update firmware 1 Raspberry Pi 4 update firmware 2 Raspberry Pi 4 update firmware 3 Raspberry Pi 4 update firmware 4

When done, put the SD card to Rpi4 and turn the power on. You don’t need to connect anything else; just wait a minute or two until the green light next to power starts blinking periodically. That will mean it’s done. The new firmware should be flashed. We can use the same SD card to update every node.


You have to do this on every Raspberry Pi node you have.

Depending on the number of Raspberry Pis, this will take some time, so just keep on it. There is no hurry, and between flashing you can prepare the Ubuntu 20.10 usbs. It goes without saying that you need to flash as many USB as you have nodes; in my case, it’s 9x 32GB USB flash drives. Use etcher.

Raspberry Pi 4 ubutnu 1

When done, switch to the next USB disk and use “Flash Another”.

Raspberry Pi 4 ubutnu 2

Headless Boot

There are a couple of things we can do before booting the Raspberry Pi 4 for which we don’t have to use keyboard and monitor.

When you insert a USB disk with flashed Ubuntu 20.10 from steps above, you will get one partition that you can look up files in.

Raspberry Pi 4 boot disk

  • Add an empty file called ssh - This will enable ssh when the Raspberry Pi 4 boots up.
  • Edit network-config – Look into the links in the file for additional options. I will be adding my wifi “Kubernetes” into this, so the Rpi connects right away.

Raspberry Pi 4 network config

I’m using wifi for connection and all IPs are assigned by DHCP, but already pre-defined to specific IP based on MAC address. This step can be done when all the Rpis are up and running. Log into your router and assign permanent IPs in DHCP:

version: 2
    # Rename the built-in ethernet device to "eth0"
      driver: bcmgenet smsc95xx lan78xx
    set-name: eth0
    dhcp4: true
    optional: true
    dhcp4: true
    optional: true
        password: "some_password"


You could set up static IPs instead; that’s up to you.

For a fixed IP it might looks like this:

    version: 2
    renderer: networkd
            dhcp4: no
                use-dns: no
                driver: bcmgenet smsc95xx lan78xx
            optional: true
            set-name: eth0

Boot up

Plug the USB disk into the Raspberry Pi 4 and plug in the power. Now wait a little, watch on the router for a new IP to appear 🙂 (If it doesn’t, attach your monitor and keyboard, and look for what is wrong). Do not stress about the green light staying on all the time; this is because rPi is trying to read the SD card, which is not there. I will show you how to turn it off later.

Hopefully, you were able to ssh to the new IP and log in with username: ubuntu / password: ubuntu (you will be forced to change password, so make it same on all nodes for now)

For now, only connect the Rpis, make sure they all have unique IPs and are up and running. For reference this is my IP layout.

K3s rpi cluster

We are going to do some manual tasks on each node. and later we use Ansible a little to help us execute commands on all nodes at once (and yes, you can make one Ansible playbook that would do 99% of deployment, but that’s for another tutorial 🙂).

Cluster box

I went a bit overboard with Cluster Box...

This is my custom box to house the Raspberry Pi nodes. It’s combination of laser cut plywood, plexiglass and 3D printed caddies which hold the nodes themselves. But hey, just get some standoffs and mount them in one column, it will work the same (or tape it to cardboard 😀).

Raspberry Pi 4 caddy Raspberry Pi 4 caddy 2 Raspberry Pi 4 caddy 3 Raspberry Pi 4 box empty Raspberry Pi 4 box full Raspberry Pi 4 box cooling

Last update: August 29, 2021