Skip to content

nea0d/home-ops

Repository files navigation

home-ops

Image used with permission from k8s-at-home

k3s  GitHub Stars  GitHub Last Commit  GitHub tag checks state  K8s-at-home Discord

Using GitOps principals and workflow to manage a lightweight k3s cluster.


📖 Overview

This is a mono repository for my home infrastructure and Kubernetes cluster. I try to adhere to Infrastructure as Code (IaC) and GitOps practices using tools like Ansible, Terraform, Kubernetes, Flux, Renovate, and GitHub Actions.


⛵ Kubernetes

There is a template over at onedr0p/flux-cluster-template if you want to try and follow along with some of the practices I use here.

⚙️ Installation

My cluster is k3s overtop Ubuntu 22.04LTS VMs provisioned in a 2-nodes PromoxVE 8 cluster using the Ansible galaxy role ansible-role-k3s. This is a semi-hyper-converged cluster, workloads and block storage are sharing the same available resources on my nodes while I have a separate server for (NFS) file storage.

🔸 Click here to see my Ansible playbooks and roles.

🔧 Core Components

🤖 GitOps

Flux watches the clusters in my kubernetes folder (see Directories below) and makes the changes to my cluster based on the state of my Git repository.

The way Flux works for me here is it will recursively search the kubernetes/${cluster}/apps folder until it finds the most top level kustomization.yaml per directory and then apply all the resources listed in it. That aforementioned kustomization.yaml will generally only have a namespace resource and one or many Flux kustomizations. Those Flux kustomizations will generally have a HelmRelease or other resources related to the application underneath it which will be applied.

Renovate watches my entire repository looking for dependency updates, when they are found a PR is automatically created. When some PRs are merged Flux applies the changes to my cluster.


🤝 Gratitude and Thanks

Thanks to all the people who donate their time to the Home Operations Discord community. A lot of inspiration for my cluster comes from the people who have shared their clusters using the kubesearch GitHub topic. Be sure to check out kubesearch.dev for ideas on how to deploy applications or get ideas on what you can deploy.


📜 Changelog

See commit history