MCP ExplorerExplorer

N8n Operator

@jakub-k-slyson 25 days ago
1 MIT
FreeCommunity
AI Systems
#ai#automation#data-flow#integration#kubernetes#low-code#mcp#mcp-client#mcp-server#n8n#no-code#operator#sdk#workflow
Kubernetes Operator for fair-code workflow automation platform with native AI capabilities.

Overview

What is N8n Operator

n8n-operator is a Kubernetes operator designed to manage n8n workflow automation instances, featuring native AI capabilities and supporting both Ingress and Gateway API routing for traffic management.

Use cases

Use cases for n8n-operator include automating repetitive tasks, integrating APIs, managing workflows across different services, and deploying scalable automation solutions in cloud-native applications.

How to use

To use n8n-operator, ensure you have the required prerequisites such as Go, Docker, and kubectl installed. Build and push your Docker image to your specified registry, then deploy the operator on your Kubernetes cluster following the provided instructions.

Key features

Key features of n8n-operator include automated deployment of n8n instances with PostgreSQL database configuration, support for Kubernetes Ingress and Gateway API for traffic routing, secure defaults with non-root container execution, and automated TLS configuration for secure access.

Where to use

n8n-operator can be used in various fields such as DevOps for workflow automation, business process automation, and integration of different services and applications within a Kubernetes environment.

Content

n8n Logo

Operator SDK Logo Kubernetes Logo

N8n Kubernetes Operator

A Kubernetes operator to manage N8N workflow automation instances.

Documentation Status

Overview

The n8n-operator automates the deployment and management of n8n workflow automation instances on Kubernetes. It provides:

  • Automated deployment of n8n instances with PostgreSQL database configuration
  • Support for both Kubernetes Ingress and Gateway API HTTPRoute for traffic routing
  • Secure defaults with non-root container execution
  • Automated TLS configuration for secure access

Quick Start

Create an n8n instance with Ingress:

apiVersion: n8n.slys.dev/v1alpha1
kind: N8n
metadata:
  name: n8n-sample
spec:
  database:
    postgres:
      host: "postgres-host"
      port: 5432
      database: "n8n"
      user: "n8n-user"
      password: "password"
      ssl: false
  ingress:
    enable: true
    ingressClassName: "nginx"

Alternatively, using Gateway API HTTPRoute:

apiVersion: n8n.slys.dev/v1alpha1
kind: N8n
metadata:
  name: n8n-sample
spec:
  database:
    postgres:
      host: "postgres-host"
      port: 5432
      database: "n8n"
      user: "n8n-user"
      password: "password"
      ssl: false
  httpRoute:
    enable: true
    gatewayRef:
      name: "gateway"
      namespace: "default"

Configuration Reference

Complete Configuration Example

apiVersion: n8n.slys.dev/v1alpha1
kind: N8n
metadata:
  name: n8n-complete
spec:
  # Database configuration (required)
  database:
    postgres:
      host: "postgres-host"
      port: 5432
      database: "n8n"
      user: "n8n-user"
      password: "password"
      ssl: true  # Optional: enable SSL connection
  
  # Ingress configuration (optional)
  # Note: Cannot be used together with httpRoute
  ingress:
    enable: true
    ingressClassName: "nginx"
    tls:
      - hosts:
          - "n8n.example.com"
        secretName: "n8n-tls"
  
  # HTTPRoute configuration (optional)
  # Note: Cannot be used together with ingress
  httpRoute:
    enable: false
    gatewayRef:
      name: "gateway"
      namespace: "default"
  
  # Persistent storage configuration (optional)
  persistentStorage:
    enable: true
    storageClassName: "standard"
    size: "10Gi"  # Defaults to "10Gi" if not specified
  
  # Metrics configuration (optional)
  metrics:
    enable: true
  
  # Hostname configuration (optional)
  hostname:
    enable: true
    url: "n8n.example.com"

Database Configuration

The database field is required and currently supports PostgreSQL:

database:
  postgres:
    host: "postgres-host"        # Required: PostgreSQL host
    port: 5432                   # Required: PostgreSQL port (1-65535)
    database: "n8n"             # Required: Database name
    user: "n8n-user"            # Required: Database user
    password: "password"         # Required: Database password
    ssl: false                   # Optional: Enable SSL connection

Traffic Routing Configuration

Important: Ingress and HTTPRoute cannot both be enabled simultaneously.

Kubernetes Ingress

ingress:
  enable: true                   # Required when using ingress
  ingressClassName: "nginx"      # Optional: IngressClass to use
  tls:                          # Optional: TLS configuration
    - hosts:
        - "n8n.example.com"
      secretName: "n8n-tls"

Gateway API HTTPRoute

httpRoute:
  enable: true                   # Required when using HTTPRoute
  gatewayRef:                   # Required when HTTPRoute is enabled
    name: "gateway"             # Required: Gateway name
    namespace: "default"        # Optional: Gateway namespace

Storage Configuration

persistentStorage:
  enable: true                   # Required when using persistent storage
  storageClassName: "standard"   # Optional: StorageClass to use
  size: "10Gi"                  # Optional: Volume size (defaults to "10Gi")

Metrics Configuration

metrics:
  enable: true                   # Required when enabling metrics

Hostname Configuration

hostname:
  enable: true                   # Required when using hostname
  url: "n8n.example.com"        # Required when hostname is enabled

Documentation

For detailed information about installation, configuration, and usage, please visit our documentation.

Key documentation sections:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the terms of the LICENSE file included in the repository.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers