Automated Kubernetes E2E Testing with KinD and Robot Framework - n8n Workflow

Use this powerful n8n workflow to automate the complete lifecycle of Kubernetes end-to-end testing, including KinD cluster setup, ArgoCD deployment, and Robot Framework test execution. Get this n8n template now.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • DevOps Engineers needing reliable, ephemeral testing environments for Kubernetes deployments.

  • QA Automation teams looking to integrate E2E tests (like Robot Framework) into CI/CD pipelines using n8n.

  • Users running large, multi-step orchestration flows on a self-hosted n8n instance.

  • Anyone seeking a comprehensive n8n workflow solution for infrastructure lifecycle management.

Overview

This comprehensive n8n workflow provides a robust, fully automated solution for end-to-end testing of Kubernetes applications. It manages the entire testing environment lifecycle on a remote target host—from initial setup to final teardown. The automation uses KinD (Kubernetes in Docker) to provision a clean cluster, deploys applications via ArgoCD, and executes browser-based E2E tests using a specialized Robot Framework n8n node.

This sophisticated n8n template solves the problem of maintaining persistent test environments by creating ephemeral, disposable clusters for every test run, ensuring consistency. It can be triggered manually, by schedule, or via a webhook, making it ideal for integration into a GitLab CI/CD pipeline. The execution is broken down into three distinct phases—INIT, TEST, and DESTROY—which can run consecutively or individually for focused debugging.

How it Works

The n8n workflow execution begins via an n8n trigger: either manual initiation, a scheduled daily run, or an external webhook call (e.g., from a GitLab commit).


  1. Parameter Setting: The flow starts by setting global variables in the 'Set Parameters' n8n node, including remote SSH credentials and file paths for Gitlab resources (KINDCONFIG, ROBOTSCRIPT, ARGOCDAPPSET).

  2. Phase Control (Switch): An n8n Switch node directs the flow based on the progress variable (defaulting to INIT).

  3. INIT Phase (Infrastructure Build): This phase uses chained Execute Command n8n nodes to perform SSH operations on the remote target. It checks and installs sshpass locally, installs Docker and KinD remotely, retrieves KinD configuration from GitLab, creates the KinD cluster, installs Helm and Nginx Ingress, configures HAProxy to route port 80 traffic to the cluster, installs ArgoCD, and applies the ApplicationSet to deploy the target application. If progressonly is false, it proceeds to the TEST phase.

  4. TEST Phase (Execution): The n8n workflow downloads the Robot Framework script from GitLab, installs necessary Python libraries (Robot Framework, Browser Library, Chromium driver) locally within the n8n execution environment, and modifies the local /etc/hosts file for internal DNS resolution. The specialized Robot Framework n8n node then executes the downloaded test script. Results, logs, and reports are packed and immediately transmitted via a Telegram n8n node.

  5. DESTROY Phase (Cleanup): This phase securely removes all installed components from the remote host. It uninstalls HAProxy, deletes the KinD cluster, uninstalls KinD and Docker, removes the local host entry, and sends a final completion notification via Telegram. This step ensures the target machine is returned to a clean state after the entire n8n workflow completes.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Install Custom Node: This n8n workflow requires the custom community node n8n-nodes-robotframework. Navigate to 'Settings' -> 'Community Nodes' and install this node.

  3. Configure Credentials:

GitLab: Create or update an OAuth2 credential for GitLab and assign it to the GitLab n8n node steps (Get a file - ROBOT Script, Get a file - KinD Config, etc.).
Telegram: Set up a Telegram API credential and assign it to the Send ROBOT Script Export Pack n8n node and ensure the chatId is correctly configured in both Telegram/SMS command nodes.

  1. Update Parameters: Modify the 'Set Parameters' n8n node. Update the targethost, targetport, targetuser, and targetpassword values to match your remote testing server. (For production use, consider replacing the password variable with a secure n8n credential reference in the shell commands).

  2. Activate the n8n workflow: Save and activate the automation. Use the Manual Trigger to test the full pipeline.

Node Details

Manual Trigger / Webhook / Schedule Trigger: These are the initial n8n trigger points. They define how the n8n workflow starts (on-demand, API call, or timed event).
Set Parameters (n8n node): Stores crucial configuration data like SSH details (targethost, targetpassword) and flow control variables (progress, progress_only).
GitLab (n8n node): Used to retrieve necessary testing resources (KinD configuration, ArgoCD deployment file, Robot Framework script) from a specified Git repository.
Execute Command (n8n node): The core node for executing shell scripts, especially those involving SSH (sshpass) to remotely manage the target server (installing Docker/KinD, configuring HAProxy, managing kubectl/Helm inside the KinD control plane).
Switch (n8n node): Manages the flow state, directing execution to the INIT, TEST, or DESTROY phases based on the progress variable value.
Read/Write File (n8n node): Manages temporary local file storage for configuration files and the Robot Framework script before execution, or handles packed binary output (test results).
Robot Framework (n8n node - Custom): Executes the actual E2E tests defined in the .robot script. Key configuration includes ensuring the environment has the necessary libraries installed and passing the script content for execution.
Telegram (n8n node): Used to send the final test results (archived log files) and completion notifications, providing crucial feedback on the n8n workflow outcome.

Related n8n Workflows

Free

Nodes: 13 Nodes
Updated: December 26 2025
View all
Created by
Vigh Sandor
Vigh Sandor

I'm a DevOps engineer and automation enthusiast who builds smart, practical workflows using n8n.io. I focus on creating reliable, open-source solutions that connect tools and simplify everyday operations — whether it’s infrastructure management, workflow automation, or integrating AI into existing systems.

Featured*