This is a collection of resources I created in order to build kubernetes clusters out of RPI5s.
To configure the pi's initially, see my other repo and branch. Build out the SD card with the initial configuration provided in Step 18 of the README.md. You can then migrate over to NVME after the initial build after you complete upto step 28. Pay attention to modify my partition table settings as described to match the hardware-configuration.nix
from my configs
- Copy down your UUIDs from
blkid
and import them into thehardware-configuration.nix
after mimicking my configuration or just ignore my settings entirely and runsudo nixos-generate-config
- Build out each
/etc/nixos
directory with the contents of goblin-1, goblin-2, goblin-3 and runsudo nixos-rebuild switch
on each machine. - Follow the guide from Distributed Builds to allow your Pi's to share compute resources during updates or to use as a pool for other aarch64 build projects!
- SSH into goblin-1
sudo cat /etc/rancher/k3s/k3s.yaml
Copy this into your main computer's~/.kube/config
Make sure to edit 127.0.0.1 in the config to the actual IP of goblin-1
cd dashboard
./runmefirst.sh
# configures your dashboard./access.sh
# enables the tunnel to your dashboardkubectl get secret dashboard-admin -n kubernetes-dashboard -o jsonpath={".data.token"} | base64 -d
# gets credentials- Navigate to: https://127.0.0.1:8443/ and input the credentials you exported
cd longhorn
./runmefirst.sh
# automagically configures longhorn for NIXOS paths./access.sh
# enables the tunnel to longhorn- Watch from the dashboard and give the cluster 3 or 4 minutes to sort things out.
- If it fails after that time, give it a kick with
./cleanup-and-retry.sh
- Please give this a few more minutes, it usually works for me on the second try!
- Edit the
mariadb-secret.yaml
file with the passwords you prefer cd mariadb
./runmefirst.sh
# Installs mariadb-operator and a DB for you- Edit the phpmyadmin-ingress.yaml file to reflect the hostname you prefer
cd ../phpmyadmin
./runmefirst.sh
# Installs PhpMyAdmin
- Edit the
runmefirst.sh
to reflect the default username and password you prefer cd wordpress
./runmefirst.sh
# Installs WordPress