Skip to content

Home Cluster

This repository is my home Kubernetes cluster in a declarative state. ArgoCD watches my repo and makes the changes to my cluster based on the YAML manifests.

Feel free to open a Github issue if you have any questions.

Cluster setup

My cluster is k3s provisioned overtop Ubuntu 20.04. 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.

Cluster components

  • metallb: For internal cluster networking using BGP.
  • longhorn: Provides persistent volumes, allowing any application to consume block storage.
  • cert-manager: Configured to create TLS certs for all ingress services automatically using LetsEncrypt.
  • ingress-nginx: My preferred ingress controller to expose traffic to pods over DNS.
  • vault: Hashicorp Vault to Manage Secrets & Protect Sensitive Data and internal self-signed TLS certs

Repository structure

The Git repository uses the ArgoCD with App of Apps Pattern. The apps folder is the root folder which starts the ArgoCD and the ArgoCD handles all other workloads.

  • apps directory is the root application for ArgoCD, it bootstraps argoCD, infrastructure, main and system-upgrade
  • argocd directory contains ArgoCD
  • infrastructure directory are important infrastructure applications that are needed by the main applications
  • main directory (depends on infrastructure) is where your common applications could be placed, ArgoCD will prune resources here if they are not tracked by Git anymore
./
├── ./apps
├── ./argocd
├── ./infrastructure
└── ./main
    ├── ./homelab
    ├── ./logs
    └── ./monitoring

Automate all the things!

Tools

Tool Purpose
k9s Kubernetes CLI To Manage Your Cluster
pre-commit Enforce code consistency and verifies no secrets are pushed
stern Tail logs in Kubernetes

Thanks

A lot of inspiration for this repo came from billimek/k8s-gitops and the people that have shared their clusters over at awesome-home-kubernetes