A Flux GitOps repository for my personal homelab Kubernetes cluster.
This repository manages the desired state of my personal homelab production cluster.
It runs Flux on K3s and uses the manifests under apps and infrastructure to declaratively manage applications, networking, certificates, storage, and observability.
clusters/productionis the Flux bootstrap path.infrastructure/overlays/productioncontains the cluster foundation.apps/overlays/productioncontains homelab application configuration.apps/base/*andinfrastructure/base/*hold the workload manifests.- Secrets are encrypted with Sealed Secrets before they are committed.
The recovery goal is to install K3s on a new node, restore the Sealed Secrets key, and let Flux recreate the cluster state from this repository.
- Install K3s without Traefik.
- Restore the Sealed Secrets private key first.
- Bootstrap Flux from
clusters/production. - Wait for
infrastructureto become ready, then verifyappsreconciliation. - Restore required data from Longhorn backups or application-specific backups.
DR guidelines:
- Git is the source of truth for declarative infrastructure.
- Keep the Sealed Secrets key backed up separately and securely.
- Data volumes are not restored from Git; verify backup policy per service.
- Exclude DB/Redis volumes from Longhorn volume backups when they have their own backup flow.
- After recovery, verify Flux, certificates, ingress, storage, and core apps in that order.
curl -fL https://get.k3s.io | \
sh -s - server \
--cluster-init \
--cluster-cidr=10.61.0.0/16 \
--service-cidr=10.62.0.0/16 \
--disable traefikexport PRIVATEKEY="tinyrack-homelab-secret-key.key"
export PUBLICKEY="tinyrack-homelab-secret-key.crt"
export NAMESPACE="sealed-secrets"
export SECRETNAME="tinyrack-homelab-s3-secret"
kubectl create namespace "$NAMESPACE"
kubectl -n "$NAMESPACE" create secret tls "$SECRETNAME" --cert="$PUBLICKEY" --key="$PRIVATEKEY"
kubectl -n "$NAMESPACE" label secret "$SECRETNAME" sealedsecrets.bitnami.com/sealed-secrets-key=activeflux bootstrap github \
--repository=homelab \
--branch=main \
--path=./clusters/production \
--owner=tinyrack-netkubectl create secret generic some-secret \
--namespace some-namespace \
--dry-run=client \
--from-literal=SOME_SECRET_KEY=SOME_SECRET_VALUE \
-o yaml | \
kubeseal --cert ./tinyrack-homelab-secret-key.crt \
> ./some.secret.yaml