Automated Installation and Configuration of Kubernetes (K8s) on Raspberry Pi
- Raspberry Pi boards with a minimum of 2 GiB RAM, preconfigured with Ubuntu (20.04) and connected to your network
- Here's a handy walkthrough, from Canonical: How to install Ubuntu Server on your Raspberry Pi
- Ansible 2.5.x >= 2.9.x
- Tested using MacOS Big Sur as the Ansible control machine, with Python 3.9
- This may work with other versions of Ubuntu, but I have only tested on Ubuntu 20.04.2 LTS
- I defaulted to Flannel as the CNI plugin, but you can override this with the
pod_network_yaml
variable when running thekube_cluster_config.yml
playbook
- Clone this repository to your computer
- Update
inventory/hosts
with any changes you'd like to make to node names and IPs for your Raspberry Pis - Run the installation playbook, overriding any variables specified in
vars
, if you need toansible-playbook -i inventory kube_cluster_install.yml -v
- Run the configuration playbook, which will initialize the control plane and join nodes to the cluster
ansible-playbook -i inventory kube_cluster_config.yml -v
- Verify that the cluster is healthy
ansible-playbook -i inventory kube_cluster_verify.yml -v
The Ansible playbooks were based on these posts: