lucasteligioridis / raspbernetes

Raspberry Pi Kubernetes Cluster
GNU General Public License v3.0
52 stars 24 forks source link
immutable kubernetes kubernetes-cluster kubernetes-setup raspberry-pi

Raspbernetes

Automated and repeatable method of deploying a headless Kubernetes stack onto a cluster of Raspberry Pis. Completely hands off experience from power on.

Detailed blog and guide posted onto my medium account:

Prerequisites

The following tools and pre-requisites must be available on the machine being used to build the SD cards:

Applications

This stack is an opinionated way to deploy a home cluster with a HA design using haproxy and keepalived for cluster management.

See below for a list of the versions and applications used:

Configuration

A short explanation of each environment variable that can be overridden.

Environment Settings

Mount device configuration:

Raspberry Pi network and hostname configuration:

Kubernetes specific configuration:

Network configuration if using Wifi. Accompanied with RPI_NETWORK_TYPE of wlan0:

Run

Be mindful of an SSH key that gets generated with this build that is stored in the output/ssh/ directory. This is not committed to git and should be treated safe like a normal private key. If you lose this key you will no longer be able to manage your stack. This is crucial for inter-cluster communication and remoting for management.

Build

Once appropriate above environment variables have been exported to suit your specific local environment, the below command will build an SD card with all automation scripts:

make build

Help

The help target is set as the default target, so display the above brief descriptions. Use the below command as is to print to the terminal:

make