A definitely over-engineered, but good enough homelab that handles my home infrastructure and Kubernetes cluster.
I had two goals in mind for this homelab:
- Learn and implement enterprise-grade systems and patterns
- Repurpose old hardware
A Kubernetes cluster deployed with Talos Linux and ArgoCD using GitHub as the Git provider, 1Password to manage secrets and Tailscale as the primary way for application access.
This repository is managed by mise and pre-commit to ensure a standardized environment, alongside Renovate to automate dependency management.
Task and gomplate are used to generate Kubernetes manifests and Terragrunt HCL files for values to be centrally managed and easily modifiable.
Core Components:
- argocd
- cilium
- coredns
- external secrets
- grafana
- kubelet-serving-cert-approver
- local-path-provisioner
- metrics server
- prometheus
- reloader
- tailscale kubernetes operator
- tsidp
ArgoCD is the GitOps platform for my homelab and is deployed using Kustomize and Helm.
The ApplicationSet in kubernetes/overlays/homelab/prod/argo/argocd/homelab-applicationset.yaml generates all ArgoCD Applications and must be defined there.
Talos Linux is managed with Terragrunt using the official Talos Linux Terraform provider.
The talos Terraform module contains config patches that are taken from either the official Talos Linux documentation, onedr0p/cluster-template, ajaykumar4/cluster-template or specifically added for my homelab.
The talos stack bootstraps the Talos Linux instance, saves the kubeconfig and talosconfig files using hooks, then creates resources to prepare the kubernetes cluster for deployments.
Tailscale is used as the VPN to connect my devices and applications together. The tailscale kubernetes operator allows my devices to access services within the kubernetes cluster, so that nothing is exposed to the public.
As Tailscale can be used to authenticate users, tsidp acts as the identity provider for any application that allows for SSO.
| Name | Description |
|---|---|
AWS_ACCESS_KEY_ID |
AWS Access Key ID |
AWS_SECRET_ACCESS_KEY |
AWS Secret Access Key |
GRAFANA_AUTH |
Grafana Service Account Token |
GRAFANA_URL |
Grafana URL |
KUBECONFIG |
Kubernetes Config File Path |
OP_SERVICE_ACCOUNT_TOKEN |
1Password Service Account Token |
TALOSCONFIG |
Talos Linux Config File Path |
TG_BUCKET |
AWS S3 Bucket Name for Terraform Backend |
| Name | Description |
|---|---|
argocd-ssh |
ArgoCD SSH Credentials for GitHub Access |
op-sa-kubernetes-token |
1Password Kubernetes Service Account Token |
tailscale-kubernetes-operator |
Tailscale Kubernetes Operator Credentials |
tsidp-* |
Tailscale IDP Client Credentials |
- Fill out
clusters.yamland runtask template:generateto generate all templated files. - Run
terragrunt stack generateinterraform/homelab/prod/talosto generate the stack files. - Run
terragrunt applyinterraform/homelab/prod/talos/generated/.terragrunt-stack/talos/.terragrunt-stack/talosonce the Talos Linux instance is waiting to be bootstrapped.- This will create a
homelab-prod.kubeconfigandhomelab-prod.talosconfigin the repository's root level.
- This will create a
- Once the Talos Linux instance reboots, run
task kubernetes:build-applyinkubernetes/bases/namespacesto create the required namespaces. - Run
terragrunt stack run applyinterraform/homelab/prod/talosto finish the rest of the Talos Linux deployment. - Run
task kubernetes:build-applyinkubernetes/overlays/homelab/prod/kube-system/corednsto install CoreDNS. - Run
task kubernetes:build-applyinkubernetes/overlays/homelab/prod/kube-system/ciliumto install Cilium. - Run
task kubernetes:build-applyinkubernetes/overlays/homelab/prod/cluster-services/kubelet-serving-cert-approverto install kubelet-serving-cert-approver. - Run
task kubernetes:build-applyinkubernetes/overlays/homelab/prod/cluster-services/local-path-provisionerto install local-path-provisioner. - Run
task kubernetes:build-applyinkubernetes/overlays/homelab/prod/cluster-services/external-secretsto install External Secrets. - Run
task kubernetes:build-applyinkubernetes/overlays/homelab/prod/tailscale/tailscale-operatorto install Tailscale Kubernetes Operator. - Run
task kubernetes:build-applyinkubernetes/overlays/homelab/prod/tailscale/tsidpto install tsidp. - Update
clusters.yamlwith the newts-dnsnameserver IP address. - Run
task kubernetes:build-applyinkubernetes/overlays/homelab/prod/argo/argocdto install ArgoCD and all other applications.
This repository uses the following directory structure that are strictly followed:
configs/ # reusable config files
docs/ # documentation
kubernetes/
├─ bases/ # kustomize bases
│ ├─ applications/
├─ overlays/ # kustomize overlays
│ ├─ cluster/
│ │ ├─ environment/
│ │ │ ├─ namespace/
│ │ │ │ ├─ applications/
│ │ │ │ │ ├─ generated/ # generated files
terraform/
├─ _modules/ # terraform modules
├─ _stacks/ # terragrunt stacks
├─ _units/ # terragrunt units
├─ platform/
│ ├─ region/
│ │ ├─ applications/
│ │ │ ├─ generated/ # generated files
| Device | Specs | OS | Function |
|---|---|---|---|
Desktop - proxmox |
AMD Ryzen 5 5600X, 64GB RAM | Proxmox VE | Hypervisor |
| Linksys Velop | - | - | Access Points |
| UniFi Cloud Gateway Ultra | - | - | Router and Firewall |
| Node | Specs | OS | Host | Function |
|---|---|---|---|---|
VM - homelab |
6 CPU, 40GB RAM | Talos Linux | proxmox |
Control Plane Node |
- Use Terragrunt Stacks
- Argo Events to handle Webhooks
- Argo Workflows for CI/CD
- Setup Monitoring and Alerts for all Services
- Setup Homelab Development Cluster
- Setup Kargo
- Setup a NAS
This repo is heavily based on the work of onedr0p/cluster-template and ajaykumar4/cluster-template. I highly recommend taking a look at those repos if you're interested in setting up a homelab of your own.