How to Run a Load Generator on Kubernetes
If you would like to test hpa
, Horizontal Pod Autoscaling, or throw some chaos at a specific deployment in Kubernetes, then you could run a Load Generator
Step 1 – Run a BusyBox container
The following command will use a busybox
container and dump you into it’s shell window:
|
|
As an alternative, you could also run:
|
|
Step 2 – Run a wget
loop
You can now trigger a wget
loop to make HTTP request calls to your deployment:
|
|
The above command makes calls to a php-apache
deployment.
Step 3 – Finding your deployment
You can swap out the above http://php-apache
URL by finding out what your deployment is called. The following code will let you know the name of the deployments available in your cluster:
|
|