eugenestarchenko / k3s-on-raspbian

Setting up a K3S Kubernetes cluster using RPI4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kubernetes on Raspbian

Build a Kubernetes (k3s) cluster with RPis and utilize GitOps for managing cluster state.

Thanks to the following pages

Pre-reqs:

  • 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.

Directory layout description

.# Flux will scan and deploy from this directory
├── ./deployments
│   # Initial setup of the cluster
├── ./setup
│   │   # Scripts for setting things up
│   ├── ./bin
│   │   # Config for RPI
│   └─ ./nodes
│   # Docker builds for ARM devices
└── ./docker

Network topology

IP Function MAC Address
192.168.1.1 Router
192.168.1.18 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

Hardware list

About

Setting up a K3S Kubernetes cluster using RPI4


Languages

Language:Shell 67.5%Language:Dockerfile 31.6%Language:HCL 0.8%