Once a RabbitMQ cluster is deployed on AKS as described in "Setting Up RabbitMQ Cluster in AKS Using RabbitMQ Cluster Operator" it would be grat to test if the deployment is working as expected. For this purpose we can use a perf-test . Let's run a perf-test step by step for RabbitMQ in AKS cluster using wsl in this post.
Expectation is to run a performance test as shown below.
We can execute below commands to run a test on RabbitMQ cluster deployed in AKS.
instance=rabbitmq-cluster
username=$(kubectl -n pocrmq get secret rabbitmq-service-credentials -o jsonpath="{.data.username}" | base64 --decode)
password=$(kubectl -n pocrmq get secret rabbitmq-service-credentials -o jsonpath="{.data.password}" | base64 --decode)
kubectl -n rabbitmq run perf-test --image=pivotalrabbitmq/perf-test --overrides='{"spec": { "nodeSelector": {"kubernetes.io/os": "linux"}}}' -- --uri "amqp://${username}:${password}@${instance}"
Once the above commands executed the test run will begin in the perf-test pod. We can see the logs of it as shown below.
kubectl logs -f perf-test -n rabbitmq
After running the tets for some time you can delete the perf-test pod to stop test run.
kubectl delete pod perf-test -n rabbitmq
Notes:
The deprecated warning shown in the first screenshot is because of the per-test is using a deprecated non exclusive transinet queue. Since wwe only use this perf-test temporarily to see if the deployed RabbitMQ clsuter is working, we can ignore the warning. In the next posts, we will discuss how to use more modern duarable quorum queues.
No comments:
Post a Comment