This role will install a master and multiple workers joined in a cluster to Raspberry Pi4s.
Before using the role:
- each pi must have a newly flashed sd card with raspbian buster lite from image >= 2019-09-26
- the file /boot/ssh must be created on the first partition of each sd card to allow ssh login
- the pi should ideally get its ip address from a static DHCP lease
- if not ip addresses will have to be manually configured using either
sudo raspi-config
or by following an online guide
- if not ip addresses will have to be manually configured using either
- boot the pi from the sd card and perform initial login using login pi:raspberry, adding key to known hosts
An example hosts file is provided in this directory, uncomment and edit for ip addresses and number of workers.
An example playbook pi-k8s_playbook.yml
is provided in this directory.
To use, run:
ansible-playbook pi-k8s_playbook.yml
To limit to certain hosts use e.g.
ansible-playbook pi-k8s_playbook.yml -l k8s-pi-master
Once all workers joined, to delete join token on master, use:
ansible-playbook pi-k8s_playbook.yml --tags=delete_token
To reset the cluster and remove kubernetes & docker see this role
GPL v3.0