If you need to check hpa, Horizontal Pod Autoscaling, or throw some chaos at a selected deployment in Kubernetes, then you would run a Load Generator
Step 1 – Run a BusyBox container
The next command will use a busybox container and dump you into it’s shell window:
kubectl run -i --tty load-generator --image=busybox /bin/sh
As a substitute, you would additionally run:
kubectl --generator=run-pod/v1 run -i --tty load-generator --image=busybox /bin/sh
Step 2 – Run a wget loop
Now you can set off a wget loop to make HTTP request calls to your deployment:
whereas true; do wget -q -O - http://php-apache; performed
The above command makes calls to a php-apache deployment.
Step 3 – Discovering your deployment
You may swap out the above http://php-apache URL by discovering out what your deployment is named. The next code will let you understand the title of the deployments out there in your cluster:
kubectl get deploy