All Projects → lukaszraczylo → rpi-home-cluster-setup

lukaszraczylo / rpi-home-cluster-setup

Licence: other
Automated way to set up your own kubernetes cluster on Raspberry Pi. Includes memory card preparation, nodes bootstrap and kubernetes services configuration

Programming Languages

shell
77523 projects
HCL
1544 projects
Makefile
30231 projects

Projects that are alternatives of or similar to rpi-home-cluster-setup

Picluster
A Simplified Docker Swarm or Kubernetes Alternative to Container Scheduling and Orchestration
Stars: ✭ 390 (+251.35%)
Mutual labels:  raspberrypi, cluster
django-docker
Toy project. Trying to use Django inside a Docker container for both local development and production deployment.
Stars: ✭ 18 (-83.78%)
Mutual labels:  alpine
52-Weeks-of-Pi
Inspired by Shekhar Gulati's "52 technologies in 2016", I've decided to set a goal of 52 Pi ideas over the next year.
Stars: ✭ 54 (-51.35%)
Mutual labels:  raspberrypi
Raspberry-Pi-Dashboard
Web-based dashboard interface to inspect Raspberry Pi hardware and software with no extra software required.
Stars: ✭ 131 (+18.02%)
Mutual labels:  raspberrypi
xen-orchestra-ce
🐳 Docker & docker-compose files to deploy Xen Orchestra Community Edition (ie: from sources)
Stars: ✭ 70 (-36.94%)
Mutual labels:  alpine
clusterplex
ClusterPlex is basically an extended version of Plex, which supports distributed Workers across a cluster to handle transcoding requests.
Stars: ✭ 123 (+10.81%)
Mutual labels:  cluster
bymattlee-11ty-starter
A starter boilerplate powered by 11ty, Sanity, Gulp, Tailwind CSS, rollup.js, Alpine.js and Highway.
Stars: ✭ 27 (-75.68%)
Mutual labels:  alpine
aioredis-cluster
Redis Cluster support extension for aioredis
Stars: ✭ 21 (-81.08%)
Mutual labels:  cluster
rsync2ipfs-cluster
No description or website provided.
Stars: ✭ 16 (-85.59%)
Mutual labels:  cluster
T System
the moving objects tracking system via two axis camera motion (and as optionally n joint robotic arm) for raspberry pi distributions
Stars: ✭ 17 (-84.68%)
Mutual labels:  raspberrypi
Linux-System-Info-Webpage
Material Design Dashboard for Linux System Info. Great for RPi and other linux Distros
Stars: ✭ 19 (-82.88%)
Mutual labels:  raspberrypi
MyIoT
[MyIoT] A start with personal server for home automation
Stars: ✭ 14 (-87.39%)
Mutual labels:  raspberrypi
alpine
🌍 `alpine` Docker image for multiple architectures
Stars: ✭ 81 (-27.03%)
Mutual labels:  alpine
EEGwithRaspberryPI
Open-Source board for converting RaspberryPI to Brain-computer interface
Stars: ✭ 402 (+262.16%)
Mutual labels:  raspberrypi
lazycluster
🎛 Distributed machine learning made simple.
Stars: ✭ 43 (-61.26%)
Mutual labels:  cluster
xx
Dockerfile cross-compilation helpers
Stars: ✭ 124 (+11.71%)
Mutual labels:  alpine
hapi
Hydro­ponic Automa­tion Plat­form Ini­tia­tive (HAPI)
Stars: ✭ 65 (-41.44%)
Mutual labels:  raspberrypi
scheduled-scaler
No description or website provided.
Stars: ✭ 68 (-38.74%)
Mutual labels:  cluster
docker-alpine-radius
Lightweight and fast Freeradius3 server, the image is based on the minimalistic Alpine Linux.
Stars: ✭ 25 (-77.48%)
Mutual labels:  alpine
mmqtt
An Open-Source, Distributed MQTT Broker for IoT.
Stars: ✭ 58 (-47.75%)
Mutual labels:  cluster

Raspberry Pi kubernetes cluster on Alpine linux setup

This repository is supposed to help if I'd EVER AGAIN destroy the whole cluster by accident. Code is a result of 6 hours coding marathon, but will be improved and patched in future.

Enhanced documentation

More explainatory documentation can be found in Medium article "I broke my Raspberry Pi kubernetes cluster" published 14/03 ( Pi day ).

Usage

Memory card preparations [step1]

To prepare memory cards check the step1 directory. If your Pi memory card is present under /dev/disk5 - you don't need to change anything, otherwise change it to the device of your choice.

PI_CARD="/dev/disk5"

Run the following script which will:

  • Format memory card
  • Split it into two partitions (1G + remaining)
  • Copy basic Alpine system onto 1G partition
  • Add an overlay allowing ethernet interface get up and SSH root access without the password
001-prepare-card.sh

Cluster preparations [step2]

Before

  • Modify pi-hosts.txt file and adjust it to your setup.
  • Modify address class in step2/static/k8s-metallb-dashboard-config.yaml to suit your network

Add following to your ~/.ssh/config file

Host pi?
  User root
  Hostname %h.local

Prepare your nodes for Ansible

001-prepare-ansible.sh

Run the playbook

ansible-playbook rpi.yaml -f 10

K8S definitions [step3]

Use makefile from step3 to apply / destroy resources

Required environment variables:

TRAEFIK_API_KEY // Traefik API key
GH_USER // GitHub user
GH_PAT // GitHub Personal Access Token

Outcome

  • Raspberry Pi cluster running Alpine linux as a base
  • MetalLB for load balancing in your LAN
  • Kubernetes dashboard installed and exposed via MetalLB
  • Traefik managing the.. traffic
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].