home-infra
home-infra copied to clipboard
A monorepo for managing my home infrastructure using GitOps.
home-infra
One Repo to Rule Them All.
A monorepo for managing my home infrastructure using GitOps.
π Folder Structure
βββ docs # Documentation as markdown files.
βββ hack # Scripts and other bits
βββ kubernetes # Kubernets manifests
βΒ Β βββ bootstrap # Manifests required when bootstrapping the cluster for the first time
βΒ Β βββ manifests # Application deployment manifests
βΒ Β βββ templates # Local Helm templates
βΈοΈ Kubernetes
I run a bare metal cluster provisioned using Talos Linux and managed using Flux. The cluster is comprised of 3 worker nodes and 1 control plane node.
Hostname | Node | Resources |
---|---|---|
vilya-c01 | Lenovo M720q Tiny | 16GB RAM, i5-9500t |
vilya-w01 | Lenovo M720q Tiny | 16GB RAM, i5-9500t |
vilya-w02 | Lenovo M720q Tiny | 16GB RAM, i5-9500t |
vilya-w03 | Lenovo M720q Tiny | 16GB RAM, i5-9500t |
βοΈ GitOps
I use Flux to manage deployments to the cluster, everything that is deployed to my cluster is defined as YAML files in the kubernetes/manifests/
directory.
βββ manifests # Manifests deployed to the cluster
βΒ Β βββ cert-manager # The namespace for all the files in the directory to be deployed to
βΒ Β βββ home
βΒ Β βββ storage
βββ gitops # Anything and everything Flux/GitOps related
βββ flux-system
To save on duplicate code and reduce the management overhead of adding new Flux Kustomization's, Namespaces and other boilerplate config. I template all of my manifests and deploy them up to GHCR as an OCI image. This is done through a (pretty hacky) bash script which reads the provided YAML file and actions it based on the contents.
The script is triggered by Github Actions, a webhook is then fired after the package is uploaded which tells Flux to reconcile the cluster with the state from the OCI image.
π Thanks
Thanks to everyone in the Kubernetes@Home Discord community Inspiration for how to deploy and my manage my cluster has been influenced heavily by everyone who's shared their clusters using the k8s-at-home GitHub tag.