Deployment in K8S

Hey hi, Nico here :slight_smile:

I was wondering if there is any doc regarding running in Queue Mode with K8S.

Currently, we are running N8N in ECS with EC2. Each component in a different Task Definition, and Webhook Task Definitioin with 2 containers, one for Webhook, and one for Traefik. Also, we are using RDS Postgres.

We’ve tried migrating to EKS, without Traefik and we have CORS issues.

We are thinking of spliting N8N just into Main and Workers. Or as a second option deploy Traefik into K8S.

Any ideas?



Hey @Nicolas_Andres_Calvo,

We have recently updated our deployment guides, Have you taken a look through our deployment guide for AWS here: Amazon Web Services - n8n Documentation

Hey Hi @Jon, yes I’ve seen it! But it is running N8N in Regular Mode.

Also, I didnt see all the Traefik Config that we have it here

We’ve started using N8N heavily in PROD like a year ago. We have at the beginning a Docker Compose, as the doc explained. Then we migrated to ECS with EC2, and RDS Postgres. And finally we implemented Queue Mode as it is explained here.

Now we are in the way of moving to EKS. But we need to understand how to migrate Webhook with Traefik in Kubernetes. Maybe someone already set up everything in K8S in Queue Mode. Currently we have a Task Definition with both containers and some headers. When we tried to create the deployment for Webhook without Traefik, we had CORS issues.



Hey @Nicolas_Andres_Calvo,

Good point, I don’t think we have a guide for scaling mode with k8s as it would be an advanced deployment option.

In a standalone deployment Traefik is used as a reverse proxy, From what I understand when using EKS you wouldn’t need this and would instead use the EKS load balancer and configure your access rules in there.

You could probably use Traefik as well but if you are hitting the EKS LB first then directing that could cause some issues so it may be worth dropping it if EKS has support for what you need.

Good point too!

I didnt mention it @Jon haha

We tried using ALB Ingress Controller to route all traffic according Main or Webhook Pods as we have it in ECS and it is recommended here. But it doesnt add all the headers and custom config that Traefik provides.

So we are in the middle of picking a Reverse Proxy as you mean, between ALB and Webhook Pod.

It is possible to only run Queue Mode with Main/Webhook and Workers. I mean, only spliting into 2 containers.



Hey @Nicolas_Andres_Calvo,

That is a good question, The docs say it is optional for webhook workers so you could just have a main instance and the normal workers if you wanted to but if you are having a lot of traffic coming in scaling the webhook workers is going to be a good idea.

Have you tried setting up one Traefik server that balances to the webhook workers?

1 Like

Nope yet!

Our following steps are deploying Traefik in K8S to route traffic to Webhook Pods. Or divide it between Main/Webhook Pod and Worker Pods (Kinda rollback).

As we said, N8N is one of our CORE tools in our company, and we heavily use it in PROD since last year, and these last months, workload heavily increased by far (we have in mind growing even more, and wanna be prepare) :slight_smile:

Thanks @Jon for your help!



Hi @Nicolas_Andres_Calvo
please have a look on Scaling N8N on kubernetes with Helm Chart

if u already familiar with k8s & helm, it’s just about couple minutes and u have N8N up and running in queue mode, ready to scale.