CI Load Test for http-echo using Kind and k6

Published: (January 9, 2026 at 10:48 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Cover image for CI Load Test for http‑echo using Kind and k6

Solution Overview

This project implements a comprehensive load‑testing solution using:

  • Kind – creates a multi‑node Kubernetes cluster for realistic testing environments.
  • NGINX Ingress Controller – routes HTTP requests to different services based on hostnames.
  • k6 – performs load testing with detailed metrics and performance analysis.

Architecture

┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│   k6 Load Test  │───▶│  NGINX Ingress   │───▶│  http‑echo apps │
│                 │    │   Controller     │    │                 │
│ - foo.localhost │    │                  │    │ - foo service   │
│ - bar.localhost │    │  (Port 80/443)   │    │ - bar service   │
└─────────────────┘    └──────────────────┘    └─────────────────┘


                       ┌──────────────────┐
                       │   Kind Cluster   │
                       │                  │
                       │ - Control plane  │
                       │ - Worker node    │
                       └──────────────────┘

Project Structure

kind-http-echo-test/
├── README.md               # This documentation
├── kind-config.yaml        # Kind cluster configuration
├── k8s/                    # Kubernetes manifests
│   ├── http-echo-foo.yaml  # Foo service deployment
│   └── http-echo-bar.yaml  # Bar service deployment
└── loadtest/               # Load‑testing scripts
    └── load-test.js        # k6 load‑test script

Prerequisites

Ensure the following tools are installed in the CI environment:

CI Workflow

The project is intended for automated CI/CD pipelines that trigger on each pull request to the default branch. The workflow consists of four sequential stages.

Stage 1 – Environment Setup

Purpose: Prepare the CI runner with all necessary tools and dependencies (supports both AMD64 and ARM64 agents).

Key Activities

  • Checkout the repository.
  • Install the k6 load‑testing tool via the package manager.
  • Download and install Kind for local Kubernetes clusters.
  • Set up kubectl for cluster management.
  • Configure required permissions and environment variables.

Stage 2 – Cluster Provisioning

Purpose: Create and configure a complete Kubernetes environment for testing.

Key Activities

  • Create a multi‑node Kind cluster using kind-config.yaml.
  • Install the NGINX Ingress Controller for request routing.
  • Wait for all control‑plane components to become ready.
  • Deploy the http‑echo applications (foo and bar services).
  • Verify that all pods are running and services are reachable.
  • Configure Ingress rules for hostname‑based routing.

Stage 3 – Load Testing

Purpose: Execute comprehensive load testing against the deployed services.

Key Activities

  • Perform health‑check probes to verify endpoint availability.
  • Run the k6 script (load-test.js) with predefined scenarios.
  • Monitor real‑time performance metrics during the run.
  • Generate detailed test results in JSON format.
  • Capture custom metrics for both foo and bar services (response times, error rates, throughput).

Test Configuration

PhaseDurationVirtual UsersPurpose
Ramp‑up10 s0 → 10Gradual load increase to target load
Sustained30 s20Peak performance evaluation
Ramp‑down10 s20 → 0Graceful load reduction

Performance Thresholds

  • Ramp‑up: 10 s to reach target load
  • Sustained load: 30 s at peak virtual users
  • Ramp‑down: 10 s to zero load
  • P95 response time

Reference: Goodnotes Take‑Home Assignment – DevOps Engineering

Note: The solution did not meet the team’s expectations.

Back to Blog

Related posts

Read more »

Hello, Newbie Here.

Hi! I'm falling back into the realm of S.T.E.M. I enjoy learning about energy systems, science, technology, engineering, and math as well. One of the projects I...