Overview
The cluster represents the heart of this project. Since I wanted to keep things lightweight and relatively simple, I chose K3s as the underlying Kubernetes distribution. The installation of the multi-node cluster is straightforward and is performed by Ansible during the provisioning state.
The cluster state is managed by Flux in a GitOps based manner. To provide a clean separation of concerns the cluster is divided into several sections reflected as folders in the repository.
The base
directory serves as an entrypoint from which all other sections are executed. It manages all Flux related components and afterwards reconciles the following Kustomization
files in exactly this order:
- Config — Cluster-wide configuration values
- CRDs — Custom Resource Definitions for specific applications
- Charts — Helm chart repositories for all applications
- Core — Crucial core applications which depend on Config, Charts & CRDs
- Services — Regular applications which depend on Config, Charts, CRDs & Core