Featured guide12 min readProduction-ready planning

Deploying n8n on Azure Kubernetes Service

This step-by-step tutorial walks you through the complete installation and setup process of n8n Community Edition (the free, open-source automation platform) on Azure Kubernetes Service. Every step has been carefully tested and verified to ensure a smooth setup experience. Whether you're a beginner exploring automation for the first time or looking to deploy your own production-grade self-hosted workflow system, this guide is designed to help you install, configure, and run n8n with confidence.

Illustration of n8n deployment to Azure Kubernetes Service

Hosting Options

Azure offers several ways suitable for hosting n8n, including Azure Container Instances, Linux Virtual Machines, and Azure Kubernetes Service (AKS). This guide uses AKS as the hosting option. Using Kubernetes requires additional configuration but is the best method for scaling n8n as demand changes.

Prerequisites

Ensure you have an AKS cluster (or create one), kubectl access, persistent storage, Azure CLI, and an ingress controller before beginning.

Step 1: Deploy Azure Kubernetes Service and Connect to it

You can skip this step if you have an existing AKS cluster.

From the Azure portal select Kubernetes services. From the Kubernetes services page, select Create > Create a Kubernetes cluster. After creating an AKS cluster, connect to it using the Connect button on the cluster details page as it provides the kubectl commands to configure your local context.

Step 2: Clone Configuration GitHub repository

Clone the repository that contains the deployment manifests used in this guide. Check the repository notes below for more info about the repository. You can also reference the upstream n8n repo for examples.

git clone https://github.com/afraz-hassan/Deploying-n8n-on-Azure-Kubernetes-Service.git

cd Deploying-n8n-on-Azure-Kubernetes-Service\complete-deployment-tutorial\kube-menifest

Step 3: Configure Postgres

Deploy Postgres in Azure (via portal or CLI) according to your requirements and capture the connection credentials. Update the configmap.yaml in the cloned repo with the database connection values.

Step 4: Review configuration files

Review the YAML files in the cloned repository and update environment variables, naming conventions, and resource quotas to match your requirements. Be careful editing sensitive items such as container images.

Step 5: Apply the manifests

Send the manifests to the cluster:

kubectl apply -f .

Namespace error

If you see an error about a missing namespace, apply the namespace manifest first:

kubectl apply -f namespace.yaml

Step 6: Setup DNS (Optional)

Create a DNS record pointing to the n8n service IP (port 5678) or access it directly via the service IP exposed by the load balancer.

n8n Cookies Error

If you encounter secure cookie errors when using HTTP, consider below setting in your configmap for testing, then reapply the manifest.

N8N_SECURE_COOKIE=false

Repository notes

Persistent storage

Use a PersistentVolumeClaim for Postgres and any file-storage features (e.g., binary data or encryption keys).

Specialized storage classes

For advanced storage requirements, consult Azure's documentation on storage classes and Azure Files.

Postgres environment variables

Populate secrets and environment variables (username, password, host, database) in secret.yaml or a secure secret store.

Deployments

The manifests define deployments for n8n and Postgres, resource requests/limits, volumes, and scaling. Adjust as needed.

Services

Services expose Postgres and n8n (ports 5432 and 5678). Use a load balancer or ingress as appropriate.

Static IPs with AKS

Use a static IP for production by following Azure's AKS static IP documentation.

Delete resources

To remove the deployed resources:

kubectl delete -f .

Official Documentation: https://docs.n8n.io/hosting/installation/server-setups/azure/

Contact for personal services

Contact us for personalized assistance with your n8n deployment on AKS.

Related tutorials

Keep readers moving through the site with similar guides and series pages.