/jmeter-k8s-cluster

JMeter cluster on k8s with Grafana monitoring

Primary LanguageShellApache License 2.0Apache-2.0

Jmeter Cluster in Kubernetes

Prerequisits

  • Kubernetes Cluster version 1.27+
  • Kubectl access

Setup Guide

  • Create jmeter cluster. Script inputs are namespace (for default press enter) & Slave count (Default count depends on worker nodes).

    ./jmeter_cluster_create.sh
  • Create grafana, reporter & Influxdb for dashboard (optional)

    ./dashboard.sh
    
  • To access the Grafana dashboard use LB url from grafana service. Or use Kube port-forward to access.

    kubectl port-forward svc/jmeter-grafana 3000
  • To generate Grafana-reporter add reporter endpoint http://<GRAFANA_LB_URL>:8686/api/v5/report/ltaas as dashboard link. Visual guide. Or use port-forward both to access.

    kubectl port-forward svc/jmeter-grafana 3000 8686
  • To Start jmeter load test

    ./start_test.sh <jmx_file_path>

Start load-test with csv

  • To run the load test

    ./start_csv_copy.sh <jmx_dir>
    ./start_csv_test.sh <jmx_dir>
  • To copy the results file as tar.gz

    ./copy_results.sh
  • To stop the load test during the execution

    ./jmetet_stop.sh

Changelog

  • Edited namespace as default
  • Added grafana-reporter as a sidecar container in grafana's k8s deployment
  • Grafana datasource (influxdb) & dashboard provisioning automated
  • Added LB support to grafana service
  • Move kube manifest separate directory
  • Separated csv copy & load test function
  • Added support to generate native jmeter report & copy back to local

Reference