Skip to content

A Raspberry Pi OS arm64 image that's ready to run Kubernetes!

Notifications You must be signed in to change notification settings

wwwil/raspios-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RasPiOS K8s

A Raspberry Pi OS arm64 image that's ready to run Kubernetes!

🚧 ⚠️ This project is currently under construction. ⚠️ 🚧

This project customises the new Raspberry Pi OS arm64 image so its correctly configured, and installs containerd, kubeadm, kubelet and everything else required to run Kubernetes on a Raspberry Pi.

Usage

1. Write

Download the latest image from the GitHub releases page or build it yourself. Then write the image to an SD card using a tool like Etcher or dd.

2. Configure

SSH

SSH password login is disabled in the RasPi OS K8s images. To connect, copy your SSH public key onto the FAT formatted boot partition of the SD card:

cp ~/.ssh/id_rsa.pub /Volumes/boot/

It will be moved to /home/pi/.ssh on boot.

Hostname

The hostname can be set by writing it to a hostname file in the boot partition.

echo "raspios-k8s-worker-01" > /Volumes/boot/hostname

This will be read and set on boot. The default hostname is raspios-k8s.

3. Connect

Put the SD card into a Raspberry Pi, boot it up and connect to it using SSH. The hostname set in the previous step can be used, for example:

4. Run

You can then use kubeadm to create a cluster. Edit the example configuration file on the Raspberry Pi at /home/pi/kubeadm.yaml, then run:

sudo kubeadm init --config /home/pi/kubeadm.yaml

To join an existing cluster get a join token from one of the current nodes:

kubeadm token create --print-join-command

Then run the displayed command on the new Raspberry Pi.

See the kubeadm documentation for more details.

Build

The image is built in Docker using Skydock to run a setup script to configure the OS and install the required packages. This can be run by the build script which will download and extract the base Raspberry Pi OS image.

./build

Roadmap

Items to do:

  • Set up HA control plane
  • Add more boot automation
    • Run kubeadm init or join if /boot/kubeadm.yaml present

About

A Raspberry Pi OS arm64 image that's ready to run Kubernetes!

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages