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.
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.
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.
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.
Reliable, secure, and discoverable services are provided by the following:
dns01
on a DNS server managed outside of the cluster.The key storage components running within the cluster are:
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:
dev
and prod
clusters. The dev
cluster is updated silently, while the prod
cluster has minor updates applied on
weekends. This config is heavily documented given there are numerous Configuration Options that may be hard to piece together.HelmRelease
so that renovate knows how to manage it. In other words, renovate-helm-releases
doesn't actually do any updating itself, just prep work to make Renovate work. You have to update your renovate
configuration with a regexp, which is a simple solution to avoid adding special code in Renovate itself to support
this. This runs as a nightly action to opt in any newly added HelmRelease
.