Locust is an open source load testing tool.
You can use it :
- locally on your machine/servers
- with Docker 🐳
- with Kubernetes ☸
Last Locust version tested: 2.32.9
kubectl create namespace locustkubectl config set-context --current --namespace=locustlocust-tasks contains your script and dependencies for load testing.
Your script must have the name locustfile.py.
kubectl create configmap locust-configmap --from-file=locust-tasks/kubectl apply -f k8s/locust-master-deployment.yamlkubectl apply -f k8s/locust-worker-deployment.yamlThe HPA is a controller that allows the number of pods in a deployment, replicaset, or statefulset to be automatically increased or decreased based on user-provided CPU usage or custom metrics.
kubectl apply -f k8s/locust-worker-hpa.yamlkubectl get svc locust-master -o jsonpath="{.status.loadBalancer.ingress[0].ip}"http://[external_ip]:8089
kubectl delete namespace locust