Available
← all posts

Raspberry Pi Kubernetes Cluster: OS Installation (Issue #2)

Flash Ubuntu 22.04 onto SD cards and prepare each Raspberry Pi node: locate the disk, write the image with dd, and enable SSH.

Ubuntu on Raspberry Pi

Welcome to the Raspberry Pi Kubernetes home lab series. A bite sized informative guide to help you provision a cluster from scratch.

1. Install Ubuntu on a Raspberry Pi

The Raspberry Pi nodes are provisioned using Ubuntu 22.04 LTS for ARM. Download and unzip the image from the link.

2. Locate the SD card

Diskutil provides information about the formats of disks, which include disk images.

diskutil list

3. Unmount the disk

diskutil unmountDisk /dev/disk2

Unmount the disk so you can write onto it. Note that unmount is not the same as eject. Unmount means to remove the connection to the disk internally; eject means to physically remove it.

4. dd the image into the disk

sudo dd if=<path-to-image>/raspbian.img of=/dev/rdisk2 bs=1m

It is important that you set the block size read/write buffering to optimise the overall time of the task.

5. Enable SSH

touch /Volumes/system-boot/ssh

SSH needs to be enabled so we can talk to the nodes later.

6. Unmount and eject/remove the card

diskutil unmountDisk /dev/disk2

Leave a comment if you have any questions. We will be installing and preparing the nodes next, first manually and then in an automated fashion via Ansible. Happy coding.


First published in my LinkedIn newsletter, Built from Scratch.

ShareXLinkedIn

Built from Scratch

A newsletter on video, streaming and building reliable systems. No spam, unsubscribe anytime.