Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.
/ cluster Public archive

A small self-hosted k3s kubernetes cluster of Raspberry Pis on the shelf in my office

Notifications You must be signed in to change notification settings

brettinternet/cluster

Repository files navigation

Kubernetes Pi Cluster

This repo is retired. See my homeops.

Lint

pi 4 cluster

Features

Hardware

I'm using Raspberry Pi 4 (x 5) but the 4 GB RAM models are hungry for more memory. Micro SD cards are insufficient for etcd's demanding read/writes, so I recommend SATA over USB 3.0. Check out this guide for compatible interfaces. I use a PicoCluster case.

Software

Setup and usage is inspired heavily by this homelab gitops template and the k8s-at-home community. You can find similar setups with the k8s at home search. See my other homelab setups.

Setup

Dependencies

Install go-task

Install dependencies and setup environment:

task init

Provision

Then, provision your infrastructure:

task ansible:{init,list,ping,setup,install,status}

DNS and Tunnel

Setup a Cloudflare Tunnel.

cloudflared tunnel login
cloudflared tunnel create cluster

Add the tunnel's credentials.json to the value in cloudflared-secret and tunnel ID to cluster-secrets.sops.yaml.

Add a Cloudflare API token with these permissions to the value in external-dns-secret.

  • Zone - DNS - Edit
  • Account - Cloudflare Tunnel - Read

Deploy

Kubernetes

Verify flux can be installed. Then, push changes to remote repo and install.

task flux:{verify,install}

Push latest to repo - you can use the wip.sh script for that with task wip.

task flux:reconcile
task kubernetes:resources

Most deployments in this repo use an app-template chart with these configuration options.

About

A small self-hosted k3s kubernetes cluster of Raspberry Pis on the shelf in my office

Topics

Resources

Stars

Watchers

Forks

Languages