Skip to content

jthin/locust-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

☸ Locust in Kubernetes

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: 1.5.1

Deploy Locust to Kubernetes

Create Locust namespace and switch to Locust namespace

kubectl create namespace locust
kubectl config set-context --current --namespace=locust

Create a ConfigMap containing locust-tasks folder items

locust-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/

Deploy

kubectl apply -f k8s/locust-master-deployment.yaml
kubectl apply -f k8s/locust-worker-deployment.yaml

(Optional) Activate HPA

kubectl apply -f k8s/locust-worker-hpa.yaml

Get external IP to access to Locust portal

kubectl get svc locust-master -o jsonpath="{.status.loadBalancer.ingress[0].ip}"

Launch Locust portal

http://[external_ip]:8089

Delete created ressources

kubectl delete namespace locust

Useful links

About

Locust on Kubernetes

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages