n8n
n8n
Purpose
n8n is the workflow automation tool used across the homelab. Runs as a single Deployment in the default namespace of the k3s cluster, fronted by Traefik, and is managed by ArgoCD.
Deployment
| Item | Value |
|---|---|
| Namespace | default |
| Image | n8nio/n8n (2.38.4 running; manifest currently pins 2.38.3 — Renovate auto-merges bumps) |
| Replicas | 1 (strategy: Recreate) |
| Node | pinned to cm4-right via nodeSelector |
| Container port | 5678 |
| Resources | requests 100m/384Mi, limits 500m/768Mi |
| Storage | PVC n8n-data, 5Gi, storageClassName: longhorn → /home/node/.n8n |
| Reloader | reloader.stakater.com/auto: "true" |
strategy: Recreate is used instead of the default rolling update: the pod is pinned to one node and holds a ReadWriteOnce PVC, so a rolling update would just get stuck waiting on the old pod to release the volume.
Database: Postgres, not SQLite
n8n is configured with DB_TYPE=postgresdb, pointed at postgres.default.svc.cluster.local:5432, database n8n, credentials from the shared postgres-secret. Workflow, credential, and execution data live in Postgres — the PVC only holds n8n’s own local state (encryption-scoped credentials, binary data). Credentials are encrypted with N8N_ENCRYPTION_KEY, stored in the n8n-secret Secret.
Ingress
Traefik IngressRoute, TLS via the shared local-example-com-tls wildcard cert, routes to the n8n ClusterIP Service on port 5678:
n8n.prod-k3s.iot-proxmox.net(middleware:default-headers)www.n8n.prod-k3s.iot-proxmox.net
GitOps
Managed by ArgoCD (Application in argocd/apps/n8n.yaml), watching the k3s branch of gitea.prod.iot-proxmox.net/bjones/n8n with prune: true and selfHeal: true — changes are made by committing to that branch, not by running kubectl apply by hand. This deployment replaced an earlier Docker Compose + SQLite setup; workflow data was not automatically migrated between the two.