allenporter / k8s-gitops

Flux/Gitops managed k8s cluster
33 stars 1 forks source link
flux gitops helm k8s k8s-at-home kubernetes

k8s-gitops

Introduction

This is a Flux/Gitops managed k8s cluster following the model used by k8s@home. This repository defines the cluster, and flux watches for updates and pushes them.

Bare Metal

The cluster is provisioned as Kairos high availability k3s using kube-vip and Calico for simple to deploy cluster networking.

The nodes have a mix of accelerators.

See bootstrap for more background on provisioning of bare metal nodes.

Development Toolchain

This repository contains a .devcontainer which is the environment used to manage the k8s cluster from the CLI. The .devcontainer has some default mounts including the private terraform inventory and .env which is a local directory for local secret storage. More detail on bootstrapping can be found in bootstrap/env and k8s-gitops-env.yaml performs the secret setup.

Network Operations

The cluster follows best practices for a server naming scheme including specifying a geography, environment (dev and prod) and a purpose and serial number per machine (e.g. sto01, cfg01, etc). DNS for machines are managed outside of the cluster.

Services & Naming

Reliable, secure, and discoverable services are provided by the following:

Storage

The key storage components running within the cluster are:

Updates

Updates to the cluster are managed by Renovate and and a handful of github actions. Renovate will either apply updates silently or send PRs to update packages to the latest versions, which are then automatically pushed to the cluster by flux. Renovate has a bit of a learning curve, so here are the pieces i've put together following the patterns of the k8s-at-home folks:

Resources