While setting up the N8N in Kubernetes, I am getting below error.
Error: ENOENT: no such file or directory, mkdir ‘/home/node/.cache’
Using the image n8n:1.97.1
Below is my volumemount configuration.
spec:
containers:
- name: n8n
env:- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
value: “false” - name: N8N_RUNNERS_ENABLED
value: “true” - name: N8N_PORT
value: “5678” - name: DB_POSTGRESDB_SSL_ENABLED
value: “true” - name: DB_TYPE
value: postgresdb - name: DB_POSTGRESDB_DATABASE
value: n8n - name: DB_POSTGRESDB_PORT
value: “5432” - name: DB_POSTGRESDB_USER
value: - name: DB_POSTGRESDB_HOST
value: <postgres_host> - name: DB_POSTGRESDB_SCHEMA
value: <db_schema> - name: DB_POSTGRESDB_PASSWORD
valueFrom:
secretKeyRef:
key: secret
name: <secret_name>
image: <image_name>
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /
port: 5678
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 20
ports: - containerPort: 5678
protocol: TCP
readinessProbe:
failureThreshold: 60
httpGet:
path: /
port: 5678
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 20
successThreshold: 1
timeoutSeconds: 20
resources:
limits:
cpu: “2”
memory: 2Gi
requests:
cpu: “1”
memory: 1Gi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts: - mountPath: /home/node/.n8n
name: csi-n8n-pvc
volumes:
- name: N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS
- name: csi-n8n-pvc
persistentVolumeClaim:
claimName: csi-n8n-pvc - emptyDir: {}
name: n8n-plugins