Ansible playbooks to setup a Raspberry Pi Zero 2 W Kubernetes cluster using k3s
- Install Ansible
- Install the Ansible Docker Community collection:
ansible-galaxy collection install community.docker
- Install Python
- Install the Python Docker library:
pip3 install docker
- Install the Python PyYaml library:
pip3 install pyyaml
- Install the Python docker-compose library:
pip3 install docker-compose
- Customize the hosts.yaml file to point to your Raspberries. The "vm" host is assumed to be a single control plane node. More can be added to setup an HA control plane.
make pre-requisites
make install
make uninstall
The full project description is available in my personal blog
The provided code was tested on a 2020 M1 Macbook Air, where the Kubernetes single control plane node was running on a VM (Ubuntu), and three Raspberry Pi Zero 2 W's acting as Kubernetes worker nodes.