After months of running my 3-node K3s cluster with manual kubectl apply deployments, I finally made the jump to ArgoCD. The App-of-Apps pattern was the key to making it manageable.
Why ArgoCD?
The main driver was reproducibility. If my cluster goes down, I wanted a single Git repo that represents the entire desired state. No more SSH-ing into nodes and hoping I remember which manifests I applied last week.
GitOps is not just about automation — it is about having a single source of truth that survives any infrastructure failure.
The App-of-Apps Pattern
Instead of creating individual ArgoCD Applications for each service, I have a root Application that points to a directory of Application manifests. When I add a new YAML file to that directory, ArgoCD automatically picks it up.
# apps/root-app.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: root
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/igorbnd/k3s-homelab
path: apps
targetRevision: main
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
Gotchas and Outcome
The biggest gotcha was namespace creation. ArgoCD does not create namespaces by default, so I had to add CreateNamespace=true to each Application's sync options. Small detail, but it blocked my first three deployment attempts.
Overall, the migration took about a weekend. The cluster now self-heals from drift, and deploying a new service is just a Git commit.