Build a Kubernetes (k3s) cluster with RPis and utilize GitOps for managing cluster state.
Thanks to the following pages
- https://gist.github.com/elafargue/a822458ab1fe7849eff0a47bb512546f
- https://github.com/onedr0p/homelab-gitops
- https://github.com/billimek/k8s-gitops
- This was done using a cluster of 4 x RPi 4 4GB
- All Pi's are connected via a local ethernet switch on a 10.0.0.0/24 LAN
- The master node connects to the outside world on WiFi, and provides NAT for the the rest of the cluster.
.
│ # Flux will scan and deploy from this directory
├── ./manifests
│ # Initial setup of the cluster
├── ./setup
│ │ # Scripts for setting things up
│ ├── ./bin
│ │ # Config for RPI
│ └─ ./nodes
│ # Docker builds for ARM devices
└── ./docker
IP | Function | MAC Address |
---|---|---|
192.168.115.1 | Router | |
192.168.115.193 | Master wifi interface | |
10.0.0.0/24 | k3s cluster CIDR | |
10.0.0.1 | k3s master (master) | dc:a6:32:67:76:f1 |
10.0.0.2 | k3s worker (node-1) | dc:a6:32:67:77:06 |
10.0.0.3 | k3s worker (node-2) | dc:a6:32:67:76:b8 |
10.0.0.4 | k3s worker (node-3) | dc:a6:32:67:77:3e |
- 4 x Raspberry Pi 4 Model B 4GB
- 4 x Raspberry Pi PoE Hat
- 4 x SanDisk Ultra microSDHC Memory Card
- 4 x 15cm Flat Cat 6 cables
- 4 x Low profile heatsinks
- 4 x WD Green 240GB 2.5" SSD
- 4 x SSD to USB 3.0 Cable
- Uctronics Cluster Enclosure V3.0
- MicroSD Extender Set for Uctronics Cluster Cases
- NETGEAR 5-Port Gigabit Ethernet PoE Switch