/k6-in-k8

This repo provides the setup to run K6 in K8 and the ability to run basic network load tests both locally and in K8

Primary LanguageGoApache License 2.0Apache-2.0

K6 in K8

This repo provides the following

  • Basic HTTP Server to simulate network traffic
  • Basic setup to run K6 locally using docker compose
  • Basic setup to run K6 in K8
  • Additional ability to export K6 metrics to datadog from K8

Building the test HTTP Server

The test HTTP server is from paninetworks testing-tools

Build the go binary

  go mod init main
  go get github.com/cgilmour/maxopen
  CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o httpserver main

Build the docker image and push it up to the docker hub:

  export DOCKER_USERNAME=...
  docker build --tag $DOCKER_USERNAME/httptest:1 .  
  docker push $DOCKER_USERNAME/httptest:1

Running Locally using Docker compose

The docker compose script was modified from Beautiful Load Testing With K6 and Docker Compose