Enable performance testing for the modern era!
Utilize the full power of Locust in the cloud.
Docs: github.io/locust-k8s-operator/
The Operator is designed to unlock seamless and effortless distributed performance testing in the cloud and enable continuous integration for CI/CD. By design, the entire system is cloud native and focuses on automation and CI practices. One strong feature about the system is its ability to horizontally scale to meet any required performance demands.
You describe a load test as a LocustTest custom resource. The operator creates the master and worker pods, wires them together, streams the results wherever you point them, and cleans everything up when the run finishes.
Observability. Export traces and metrics straight out of Locust with native OpenTelemetry, no sidecar involved. Prometheus scraping works out of the box for setups that aren't on OTLP yet.
Control over placement. Node affinity, taint tolerations, node selectors, and runtimeClassName for sandboxed runtimes such as gVisor or Kata Containers. Master and worker pods take independent resource specs, and CPU limits can be lifted entirely for latency-sensitive runs.
Everything your test needs at runtime. Inject credentials from Secrets and ConfigMaps as environment variables or file mounts. Mount test data and certificates from PVCs, ConfigMaps, or Secrets, targeted at the master, the workers, or both. Private registries are supported through imagePullSecrets.
Kafka and AWS MSK integration for testing event-driven systems, with authentication handled for you.
Tests run in isolation, so you can run many at once without cross-interference, and a configurable TTL tears down resources once a run is done. The features page covers the full list.
All documentation for this project is available at github.io/locust-k8s-operator/.
Kubernetes 1.29 or newer, and Helm 3.x to install the chart.
For local development you'll also want Go 1.26+, Docker for building images, kubectl pointed at your cluster, and Kind if you plan to run the E2E suite.
Install the operator using Helm:
helm repo add locust-k8s-operator https://abdelrhmanhamouda.github.io/locust-k8s-operator
helm install locust-operator locust-k8s-operator/locust-k8s-operatorOr from the repository:
helm install locust-operator charts/locust-k8s-operator/Already running locust.io/v1 resources? They keep working through the conversion webhook, and the migration guide walks through moving to v2. The v1 API is deprecated and slated for removal in v3.
# Install CRDs
make install
# Run operator locally (against configured cluster)
make run
# Run tests
make test
# Run E2E tests (requires Kind)
make test-e2e
# Build and push operator image
make docker-build docker-push IMG=<your-registry>/locust-operator:tagSee CONTRIBUTING.md for detailed development setup.
The project is actively maintained and under continuous development and improvement. If you have any request or want to chat, kindly open a ticket. If you wish to contribute code and/or ideas, kindly check the contribution section.
There's plenty to do, come say hi in the issues!
Also check out CONTRIBUTING.md.
Open source licensed under Apache-2.0 license (see LICENSE file for details).

