Home

Awesome

klocust

Klocust is a command-line tool for managing Locust distributed load testing on Kubernetes.

Installation

Required

Recommend

Install klocust binary

$ brew tap DevopsArtFactory/devopsart
$ brew update
$ brew install klocust 
$ klocust version
0.0.1

Build from source

shell autocompletion for bash/zsh

echo 'source <(kubectl completion bash)' >>~/.bashrc
or
echo 'source <(kubectl completion zsh)' >>~/.zsh

Usages

klocust list

$ klocust list

>>> 1 locust deployments in loadtest namespace. (PREFIX: locust-main-)
+-------+---------------------+-------+------------+-----------+------+
| NAME  | DEPLOYMENT          | READY | UP-TO-DATE | AVAILABLE | AGE  |
+-------+---------------------+-------+------------+-----------+------+
| hello | locust-main-hello   | 1/1   | 1          | 1         | 9m5s |
+-------+---------------------+-------+------------+-----------+------+

klocust init

$ klocust init hello

Update config & locust files

$ vi hello-klocust.yaml
$ vi hello-locustfile.py
$ docker run -p 8089:8089 -v $PWD:/mnt/locust locustio/locust -f /mnt/locust/hello-locustfile.py

or 

$ pip3 install locust
$ locust -f hello-locustfile.py

klocust apply

$ klocust apply hello
$ open https://locust-hello.{your domain}

klocust delete

$ klocust delete hello

Contribution Guide