Sebastian's Blog

FluxCD and K3s

In this post i will explain how i configured the k3s cluster and the FluxCD deployment, and why i chose this architecture.

K3s Installation

I used https://github.com/k3s-io/k3s-ansible for the installation of K3s on my Mini-Rack, which now have two Radxa's. This method is beneficial for me as it's more automated and when i need to add new nodes i can just run the ansible command to run the playbook again, as k3s-ansible is idempotent.

I currently only have one of the nodes setup as a controlplane, because the cluster should have an unequal number of controlplane nodes for quorum.

FluxCD

Ive never used FluxCD before and only have limited experience using ArgoCD, but i thought it would be nice to automate deployments and minimize configuration drift from the servers. This means i don't touch the cluster directly but instead use the git repository configured for the flux deployment.

I really like how i could deploy the kube-prometheus-stack by writing 35 lines of yaml, which created a namespace, added the Helm repository and then installed the HelmRelease into the custom namespace.

Frontend for Flux

I use the Headlamp desktop application with the FluxCD plugin to view my cluster state, as seen below:

fluxcd-overview

Currently i haven installed too many applications into the cluster, but i have a plan to move all my misc and non critical applications over first, then after some time when i trust my k8s abilities some more, the rest would probably be moved too.