/pi-cluster

Raspberry Pi Kubernetes Cluster

Primary LanguageJinjaMIT LicenseMIT

Raspberry Pi Kubernetes Cluster

pi-cluster-1.0

K3S Kubernetes Cluster using bare metal ARM-based nodes (Raspberry-PIs) automated with Ansible

This is an educational project to explore kubernetes cluster configurations using an ARM architecture and its automation using Ansible.

The entire process for creating this cluster at home, from cluster design and architecture to step-by-step manual configuration guides, has been documented and it is published in the project website: https://picluster.ricsanfre.com.

This repository contains the Ansible's source code (playbooks/roles) and Cloud-init's configuration files used for automated all manual tasks described in the documentation. The cluster can be re-deployed in minutes as many times as needed for testing new cluster configurations, new software versions or just take you out of any mesh you could cause playing with the cluster.

Scope

Automatically deploy and configure a lightweight Kubernetes flavor based on K3S and set of cluster basic services such as: 1) distributed block storage for POD's persistent volumes like LongHorn, 2) centralized monitoring tool like Prometheus 3) centralized log managemeent like EFK stack (Elasticsearch-Fluentbit-Kibana and 3) backup/restore solution for the cluster like Velero and Restic.

The following picture shows the set of opensource solutions used so far in the cluster, which installation process has been documented and its deployment has been automated with Ansible:

Cluster architecture and hardware

Home lab architecture, showed in the picture bellow, consist of a Kubernetes cluster of 4 nodes (1 master and 3 workers) and a firewall, built with another Raspberry PI, to isolate cluster network from your home network.

See further details about the architecture and hardware in the documentation

Official Site

You can browse more information about Pi Cluster Project on https://picluster.ricsanfre.com/.

The content of this website and the source code to build it (Jekyll static based website) are also stored in this repo: /docs folder.

Usage

Check out the documentation Quick Start guide to know how to use and tweak cloud-init files (/cloud-init folder) and Ansible playbooks contained in this repository.

About the Project

This project has been started in June 2021 by Ricardo Sanchez