Where are the environment variables for a K8 deployment supposed to go?


I deployed n8n to a K8 cluster using this doc: Azure | n8n Docs

I’m wanting to set-up the URL on the server so that it doesn’t use localhost by default.

I found the documentation on environment variables and see the server URL and K8 URL.

Where would these settings get set? I see lots of examples of how to set them when executing the command for the docker instance, but don’t see any examples of where to put them for K8.

Do they go in the deployment file under spec: containers: env: ?

Is there an example?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Using latest n8n build.

Database: postgres

not sure on execution processes setting

Running via K8 on Azure cloud.

Hey @eruithildur,

Welcome to the community :raised_hands:

When it comes to setting environment variables they will be set depending on how your install method of choice needs them. For k8s it looks like they use env as the option so in your n8n-deployment.yaml file there should be an env section under the containers, Looking at the example we provide look for N8N_PROTOCOL and that should get to the right place.

Thanks, Jon!

Will give that a shot.

1 Like