Kubernetes cluster
A bare-metal cluster built with kubeadm, with three nodes: two Lenovo ThinkCentre M720q
and a Raspberry Pi 5 (hardware). Everything in it is managed
by Flux from kubernetes/ in the repository. What is installed, and
how that directory is laid out: kubernetes/README.md.
GitOps flow
- A change is made on a branch and opened as a pull request.
- After review, the pull request is merged to
main. - Flux’s
GitRepositorypollsmainevery minute and fetches the new revision. - The
flux-systemKustomization applieskubernetes/clusters/homelab, which defines the other Kustomizations. infrastructureapplieskubernetes/infrastructure(gateway, certificates, load balancing, secrets operator).appsapplieskubernetes/appsonceinfrastructureis applied and healthy. Both wait until what they applied is running (wait: true), and report a failure after 10 minutes.- Flux uses server-side apply and prunes resources that were removed from Git.
Rolling back is a
git revert.
The goal is that nothing is applied to the cluster by hand. Every workload is in Git. What is still done by hand: the two bootstrap AWS keys (cert-manager’s Route53 key and the key external-secrets uses to read SSM, see secrets) and the kubelet settings on the nodes (nodes), until Terraform and Ansible take over.