KubeKanvas Logo
  • Features
  • Pricing
  • Templates
    • How KubeKanvas works
    • Docs
    • Downloads
    • Blog
    • E-Book
    • Tutorials
  • FAQs
  • Contact
  • Features
  • Pricing
  • Templates
    • How KubeKanvas works
    • Docs
    • Downloads
    • Blog
    • E-Book
    • Tutorials
  • FAQs
  • Contact
Back to Templates

Deploy n8n on Kubernetes: Production-Ready Automation Stack

Created by:
Siddiqui
Deploy n8n on Kubernetes: Production-Ready Automation Stack template preview
0 uses
KubeKanvas Logo
Visual Kubernetes cluster design tool that helps you create, manage, and deploy your applications with ease.
Product
  • Features
  • Pricing
  • Templates
Resources
  • Blog
  • Tutorials
Company
  • About Us
  • Contact
  • Terms of Service
  • Privacy Policy
  • Responsible AI Policy
  • Impressum
XGitHubLinkedIn
© 2026 KubeKanvas. All rights reserved.

Deploy n8n in a production-ready, non-queue setup with dedicated backend services to handle automated workflows on your cluster. This template configures the core application, a persistent PostgreSQL instance, and an ephemeral Redis instance, fulfilling search requirements for users looking to deploy n8n on Kubernetes, find an n8n Kubernetes template, or configure an n8n Kubernetes deployment.

What's Included

ComponentTypePortRole
NamespaceNamespaceNoneSets up isolated environment for the stack
n8n-pg-pvcPVCNoneReserves 10 GB of disk space for PostgreSQL
n8n-pg-configConfigMapNoneStores non-sensitive database environment variables
n8n-pg-secretSecretNoneSecures the administrator password for PostgreSQL
n8n-redis-configConfigMapNoneStores network connection strings for Redis
n8n-app-configConfigMapNoneStores app variables including database and webhook URLs
n8n-app-secretSecretNoneEnforces security for the N8N_ENCRYPTION_KEY string
postgresStatefulSet5432Deploys a stable postgres:16 instance for storage
postgres-serviceService5432Exposes the PostgreSQL database internally to n8n
redisDeployment6379Runs an ephemeral redis:7-alpine container for cache
redis-serviceService6379Provides internal network access to the Redis instance
n8nDeployment5678Runs the main n8n container with init checks
n8n-serviceService5678Routes cluster-internal traffic to the n8n workload
IngressClassIngressClassNoneDefines the global cluster-scoped NGINX controller
n8n-ingressIngress5678Exposes n8n externally over HTTP via n8n.local
n8n-hpaHPANoneMonitors resources and locks the process to 1 replica
n8n-quotaResourceQuotaNoneCaps computing resource consumption for the namespace
n8n-limitsLimitRangeNoneDeclares container-level request and limit boundaries
postgres-netpolNetworkPolicy5432Restricts PostgreSQL traffic to n8n pods only
redis-netpolNetworkPolicy6379Restricts Redis traffic to n8n pods only
n8n-netpolNetworkPolicy5678Isolates n8n to allow traffic only from ingress-nginx

Architecture Overview

The Ingress resource routes external traffic through the local hostname to the n8n Service. The n8n Deployment utilizes twin init containers to poll network readiness on the internal PostgreSQL and Redis services before booting the primary application process. The single-replica limitation prevents scheduling conflicts, while the PostgreSQL database utilizes stable stateful pod identities alongside persistent disk volumes to preserve operational workflow data across pod recycles. Network policies isolate the entire database and caching layers, permitting traffic strictly from verified application workloads.

Prerequisites

  • Local or cloud-managed Kubernetes cluster
  • NGINX Ingress Controller configured on your cluster
  • CoreDNS or internal DNS routing capabilities operational
  • Persistent volume provisioner for the database storage claim
  • KubeKanvas CLI installed and running on your computer (Optional, if you want to use one-click deployment)

How to Deploy

  1. Configure the N8N_ENCRYPTION_KEY inside the n8n-app-secret file to ensure database credential safety.
  2. Edit the WEBHOOK_URL entry within the n8n-app-config map to map precisely with your targeted external domain name.
  3. Apply the global configuration resources and namespace parameters to establish the administrative network boundaries.
  4. Deploy the template to your cluster via the Play button in the top right bar via kubekanvas or If you prefer to deploy manually, download the YAML and apply it with kubectl.
  5. Wait for all pods to reach Running status. You can monitor progress in the Release Monitor screen.

How to Test

  1. Click the release monitor button at kubekanvas or run kubectl get pods -n n8n to verify that the PostgreSQL init containers completed and the main n8n instance is running.
  2. Direct a local browser or HTTP client to http://n8n.local to load the initial setup and login dashboard.
  3. Create a temporary HTTP Webhook node inside the interface and confirm the generated endpoint resolves against the set environment variables.

Use Cases

  • Single Instance Automation Engines: Hosting self-contained, high-performance visual automation environments without the overhead of heavy scaling architecture.
  • Secured Self-Hosted Deployments: Restricting workflow tools and proprietary corporate automation secrets behind closed, policy-governed network paths.

Summary

This template provisions a non-queue, production-grade n8n automation stack backed by a persistent PostgreSQL StatefulSet and a volatile Redis caching layer.