This directory contains everything needed to run load tests using k6 in the Kubernetes cluster.
script.js
: This is the main file that defines the k6 load test script.test-run.yaml
: The Kubernetes manifest that defines the job for running the k6 test in the cluster.- Taskfile: Automates common tasks related to the k6 test, such as starting, deleting, and reloading the test run.
You can use the following commands in the Taskfile to manage the k6 tests:
-
Start the Test: Use
task start
to:- Create a ConfigMap from the
script.js
. - Deploy the k6 test job in the cluster.
- Stream logs from the k6 test.
- Create a ConfigMap from the
-
Delete the Test: Use
task delete
to:- Delete the k6 test job.
- Remove the ConfigMap used for the test.
-
Reload the Test: Use
task reload
to:- Delete the current test.
- Re-deploy the test from scratch.
- Stream the test logs.