Files
homelab/n8n/k8s/n8n.yaml
T
forust a6af69dca0
ci / lint-compose (push) Successful in 3s
ci / lint-actionlint (push) Successful in 1s
ci / lint-shellcheck (push) Successful in 2s
ci / lint-prettier (push) Successful in 3s
ci / lint-ruff (push) Successful in 1s
ci / lint-yaml (push) Successful in 2s
ci / lint-dockerfiles (push) Successful in 2s
ci / scan-deps (push) Successful in 18s
ci / test-backend (push) Successful in 8s
ci / test-frontend (push) Successful in 11s
ci / validate (push) Successful in 3s
renovate-ci / validate-renovate (push) Successful in 13s
ci / build (push) Successful in 1m30s
fix(k8s): Recreate singletons and trim requests for scheduler headroom
RollingUpdate with default maxSurge needs a spare pod the single node does not have (99% CPU requested), so multi-workload restarts end Pending and verify times out. Recreate on all replicas:1 Deployments (immich-server and bentopdf keep RollingUpdate at replicas 2). Also trims CPU/memory requests toward measured use (adguard, authentik, gitea, netbox, uptime-kuma, netbird-server) and gives traefik requests/limits so it is no longer BestEffort.
2026-09-28 22:36:46 +02:00

81 lines
1.5 KiB
YAML

apiVersion: v1
kind: Service
metadata:
name: n8n-service
namespace: n8n
spec:
selector:
app: n8n
ports:
- port: 5678
targetPort: 5678
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: n8n-deployment
namespace: n8n
spec:
replicas: 1
selector:
matchLabels:
app: n8n
strategy:
type: Recreate
template:
metadata:
labels:
app: n8n
spec:
containers:
- name: n8n
image: docker.n8n.io/n8nio/n8n:2.41.3
envFrom:
- configMapRef:
name: n8n-config
ports:
- containerPort: 5678
volumeMounts:
- name: n8n-node-data
mountPath: /home/node/.n8n
- name: n8n-files
mountPath: /files
resources:
requests:
memory: "512Mi"
cpu: "150m"
limits:
memory: "5Gi"
cpu: "1500m"
volumes:
- name: n8n-node-data
persistentVolumeClaim:
claimName: n8n-node-pvc
- name: n8n-files
persistentVolumeClaim:
claimName: n8n-files-pvc
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: n8n-node-pvc
namespace: n8n
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: n8n-files-pvc
namespace: n8n
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi