Skip to content

n8n Deployment on Cloud

This guide serves as a comprehensive resource for deploying n8n on an AWS EKS cluster.

Deploying n8n requires multiple IAM roles, EBS CSI drivers, and volume mounts for persistent storage for the PostgreSQL database. Follow these steps to set up everything in the smoothest possible way.

  1. Apply GitHub Configuration for IAM Roles and Persistent Volumes
    Section titled “Apply GitHub Configuration for IAM Roles and Persistent Volumes”

    First, apply the GitHub configuration to create the required IAM roles and services for persistent volumes using the following command:

    kubectl apply -k "github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernetes/overlays/stable/ecr/?ref=release-1.45"
  2. Create IAM roles for the EKS cluster using this command:

    aws iam create-role \
    --role-name AmazonEKS_EBS_CSI_DriverRole \
    --assume-role-policy-document file://"aws-ebs-csi-driver-trust-policy.json"

    For more details, refer to the AWS EBS CSI Driver Guide.

  3. Add the EBS CSI driver add-on using the AWS Management Console.

  4. Attach the IAM OIDC provider using the following command:

    eksctl utils associate-iam-oidc-provider --region=cluster_region --cluster=cluster_name --approve
  5. Clone the Terraform Infra Config Repository
    Section titled “Clone the Terraform Infra Config Repository”

    Go to the terraform-infra-config repository and clone it.

  6. Navigate to the n8n directory and run:

    kubectl apply -f .

    For additional guidance, refer to the n8n AWS Hosting Guide.