This is my custom script for setting up a Raspberry Pi cluster, and running Kubernetes on it. This will:
- Set up Pis, including configuring cgroup memory for kubernetes
- Install kubernetes and reccomended dependencies
- Set up one master node and N worker nodes, and automatically create a working cluster
- At least two Raspberry Pi 4s
- Pis should run Ubuntu Server
- SSH access with publickey authentication setup from the same computer running the playbook
Create your inventory file inventory/inventory.yml
. This should follow the format of inventory/inventory_template
. Only one master node is supported.
touch inventory/inventory.yml
Then, edit the inventory/group_vars/cluster.yml
file to the correct SSH host name of your Raspberry pi's (default ubuntu
)
The script can be run by executing the cluser.yml
playbook:
ansible-playbook cluster.yml -i inventory/inventory.yml