Skip to content

Repository files navigation

rpi-k8s

Kubernetes State for my home RPI cluster

Cluster Structure and Contents

There's a cluster bootstrap layer that builds a cluster, a cluster kernel with the core bits and pieces (networking, observability, etc), and then the apps layer with the actual workloads for doing actual things.

Cluster Bootstrap

K3S

The bootstrap.sh script installs K3S on one master node, and N worker nodes - a minimum of two workers is strongly suggested.

Once this runs, you will technically have a live cluster, though it won't work yet.

This installer script can fetch whatever version of Kubernetes specified, but will default to v1.21.0+k3s1.

Calico v3.15.1

Calico is the Container Network Interface used in this setup. It's used to handle traffic routing and serves as the transport fabric within the cluster.

Kernel

Metal LB v0.9.3

Load balancing layer. Allows pods to expose arbitrary ports outside of the cluster.

From here.

NGINX Ingress Controller v0.46.0

HTTP proxy for simply exposing web services outside of the cluster. Runs on top of the load balancer layer.

From here.

NFS Provisioning

This allows pods to mount the same persistent storage volumes from any node in the cluster.

There is some prerequisite setup, however - you must have a running NFS server, configured so that the nodes all have access to it, and the nodes all need to have the NFS client installed and configured too.

Then, just sub in the NFS server's IP/hostname and mount path in deployment.yaml and you're good to go.

This came from here.

External DNS v0.8.0

When a service exposes a port outside the cluster via either an ingress or a loadbalancer, this service will create an externally-visible DNS entry for it.

From here.

Cert Manager v1.3.1

This service will register Lets Encrypt TLS certs for services.

From cert-manager.io

Monitoring suite

This is a bunch of stuff for collecting, viewing, and using metrics and data, both from the cluster and elsewhere.

Built from this repo.

Prometheus Operator v0.40.0

The setup bits install the Prometheus Operator, which makes it a lot simpler to set up all of the monitoring infrastructure, rules, and components.

Lives here.

Prometheus v2.19.1

Metrics collection and scraping from other services.

From here.

Prometheus Adapter v0.7.0

Exports metrics from the core K8S metrics service for Prometheus to consume.

From here.

MetalLB Exporter

Monitoring definition for metrics from the load balancer layer.

Kube State Metrics v1.9.6

Basically an external exporter for the Kubernetes API server.

Node Exporter v0.18.1

Export node-level metrics about the machines that are running stuff.

From here.

ARM Exporter

Exports temperature readings from the raspberry pi nodes.

Grafana v7.0.3

Dashboards and graphs for Prometheus data.

Frrm here.

Alertmanager v0.21.0

Send alerts and notifications based on metrics data.

From here.

Apps layer

MediaDownloader

Downloads media. D'doy.

Built from doomgerbil/mediadownloader.

VPN Server

A wireguard-based VPN server.

Uses docker-wireguard.

TPLink Power Exporter

Metrics exporter for TPLink smart-home power data.

Cluster Power Exporter

Exports power usage data from the smart plug this cluster is plugged into.

Hue Exporter v0.2.2-arm7

Prometheus metrics exporter for the Philips Hue smartlighting system.

About

Kubernetes State for my home RPI cluster

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages