n8n Deployment on Cloud
Introduction
Section titled “Introduction”This guide serves as a comprehensive resource for deploying n8n on an AWS EKS cluster.
n8n Deployment on EKS Cluster
Section titled “n8n Deployment on 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.
-
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" -
Create IAM Roles for the EKS Cluster
Section titled “Create IAM Roles for the EKS Cluster”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.
-
Add the EBS CSI Driver Add-On
Section titled “Add the EBS CSI Driver Add-On”Add the EBS CSI driver add-on using the AWS Management Console.
-
Attach the IAM OIDC Provider
Section titled “Attach the IAM OIDC Provider”Attach the IAM OIDC provider using the following command:
eksctl utils associate-iam-oidc-provider --region=cluster_region --cluster=cluster_name --approve -
Clone the Terraform Infra Config Repository
Section titled “Clone the Terraform Infra Config Repository”Go to the terraform-infra-config repository and clone it.
-
Deploy n8n
Section titled “Deploy n8n”Navigate to the
n8ndirectory and run:kubectl apply -f .For additional guidance, refer to the n8n AWS Hosting Guide.