8gears / n8n-helm-chart

A Kubernetes Helm chart for n8n a Workflow Automation Tool. Easily automate tasks across different services.
https://artifacthub.io/packages/helm/open-8gears/n8n
Apache License 2.0
187 stars 97 forks source link

Unable to initialize DB #67

Closed telekosmos closed 8 months ago

telekosmos commented 8 months ago

Hi This is quite simple. Trying to deploy the chart by running the just the command in Readme: helm install my-n8n oci://8gears.container-registry.com/library/n8n --version 0.20.1 -f n8n-values.yaml. The overridden values are just:

# n8n-values.yaml

config:
  database:
    type: postgresdb
    postgresdb:
      database: n8n
      host: 10.109.205.83
      user: postgres
      password: '<apassword>'

secret:
  database:
    postgresdb:
      password: '<apassword>'

The host address is because in the cluster I have deployed the postgres backend and I've checked it has connectivity from other services in the cluster.

I'm clarifying about the connectivity as the issue I'm running in is just as it follows (pod logs 👇 ):

Loading config overwrites [ '/n8n-config/config.json', '/n8n-secret/secret.json' ]
Last session crashed
Initializing n8n process
Error: There was an error initializing DB
DatabaseError: database "n8n" does not exist

I'm sure I'm missing something but I can't figure out what, so appreciate any hint/suggestion.

Cheers

Vad1mo commented 8 months ago

yeahh you should first log in and create a DB.

CREATE DATABASE n8n;
CREATE USER n8n-user WITH PASSWORD 'random-password';
GRANT ALL PRIVILEGES ON DATABASE n8nTO n8n-user;

see https://docs.n8n.io/hosting/supported-databases-settings/#postgresdb

telekosmos commented 8 months ago

Ok, that worked @Vad1mo , thanks for quickly pointing me right 👍