{"id":24117175,"url":"https://github.com/sbittla/jmeter-load-testing","last_synced_at":"2026-05-11T13:03:06.445Z","repository":{"id":268082440,"uuid":"903229142","full_name":"sbittla/jmeter-load-testing","owner":"sbittla","description":"This repo used for auto scaling JMeter Agents with Kubernetes ","archived":false,"fork":false,"pushed_at":"2025-01-03T18:12:08.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T19:20:40.852Z","etag":null,"topics":["jmeter","jmeter-agent","jmeter-master","jmeter-scripting","jmeter-tests","kubernetes","kubernetes-cluster","kubernetes-deployment","kubernetes-setup","load-testing","load-testing-agent","loadtest","performance","performance-analysis","performance-metrics","performance-testing","performance-testing-extension"],"latest_commit_sha":null,"homepage":"https://www.bittla.me/","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbittla.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-14T03:49:04.000Z","updated_at":"2025-02-08T05:22:16.000Z","dependencies_parsed_at":"2025-02-28T14:22:04.404Z","dependency_job_id":"9d183588-fde4-457b-bf6a-dde11cddd2f3","html_url":"https://github.com/sbittla/jmeter-load-testing","commit_stats":null,"previous_names":["sbittla/jmeter-load-testing"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sbittla/jmeter-load-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbittla%2Fjmeter-load-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbittla%2Fjmeter-load-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbittla%2Fjmeter-load-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbittla%2Fjmeter-load-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbittla","download_url":"https://codeload.github.com/sbittla/jmeter-load-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbittla%2Fjmeter-load-testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32895978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jmeter","jmeter-agent","jmeter-master","jmeter-scripting","jmeter-tests","kubernetes","kubernetes-cluster","kubernetes-deployment","kubernetes-setup","load-testing","load-testing-agent","loadtest","performance","performance-analysis","performance-metrics","performance-testing","performance-testing-extension"],"created_at":"2025-01-11T07:38:27.678Z","updated_at":"2026-05-11T13:03:06.413Z","avatar_url":"https://github.com/sbittla.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jmeter-load-testing\n\nThis repo used for auto scaling JMeter Agents with Kubernetes\n\n### **1. Framework Requirements**\n\n* **Core Features**:\n  * Automate the setup and teardown of JMeter agents.\n  * Distribute load across multiple JMeter instances.\n  * Monitor test progress and aggregate results.\n  * Scalability using Kubernetes (K8s) for orchestration.\n* **Key Components**:\n  * JMeter Master: Coordinates test execution.\n  * JMeter Agents: Run test scripts.\n  * Result Aggregator: Collects and analyzes results.\n\n### **2. Prerequisites**\n\n* Install [Docker](https://www.docker.com).\n* Set up a Kubernetes cluster ([Minikube](https://k8s-docs.netlify.app/en/docs/tasks/tools/install-minikube/)) for local testing or a cloud provider like GKE, AKS, or EKS).\n* Install [kubectl](https://kubernetes.io/docs/tasks/tools/) and [Helm](https://helm.sh/docs/intro/install/).\n* Install JMeter locally for testing scripts.\n\n### **3. Create JMeter Docker Images**\n\n```\ndocker build -t your-repo/jmeter:latest .\ndocker push your-repo/jmeter:latest\n```\n\n### **4. Run Kubectl Context**\n\ncopy your `./kubernetes/.kube/config` to `~/.kube/config` file\n\nRun the context\n\n```\n kubectl config use-context prod-cluster\n```\n\nVerify the ccurrent context\n\n\u003cpre class=\"!overflow-visible\"\u003e\u003cdiv class=\"contain-inline-size rounded-md border-[0.5px] border-token-border-medium relative bg-token-sidebar-surface-primary dark:bg-gray-950\"\u003e\u003cdiv class=\"overflow-y-auto p-4\" dir=\"ltr\"\u003e\u003ccode class=\"!whitespace-pre hljs language-bash\"\u003ekubectl config current-context\n\u003c/code\u003e\u003c/div\u003e\u003c/div\u003e\u003c/pre\u003e\n\nList All contexts\n\n```\nkubectl config get-contexts\n\n```\n\nRestart your `kubectl` proxy (if applicable):\n\n```\nkubectl proxy --port=8080\n\n```\n\nRun before any other step\n\n```\nin powershell run as a administrator\n minikube start --driver=hyperv\n```\n\n### **5. Deploy Resources to Kubernetes**\n\nValidate yaml manually\n\n```\nkubectl apply --dry-run=client --validate=true -f jmeter-agent-deployment.yaml\n\n```\n\n**Apply Configurations**:\n\n```\nkubectl create namespace jmeter-ns\n\nkubectl apply -f jmeter-agent-deployment.yaml\nkubectl apply -f jmeter-master-deployment.yaml\n\nkubectl apply -f jmeter-agent-service.yaml\n\n```\n\n**Verify Deployments**:\n\nkubectl get pods\n\n```\nNAME                             READY   STATUS              RESTARTS   AGE\njmeter-agent-84bcbcb4f-7zzqf     0/1     ContainerCreating   0          4s\njmeter-agent-84bcbcb4f-cj6tp     0/1     ContainerCreating   0          4s\njmeter-agent-84bcbcb4f-ptlbd     0/1     ContainerCreating   0          4s\njmeter-master-57b5c764d9-hn4wc   0/1     ContainerCreating   0          52s\n```\n\nkubectl get services\n\n```\nNAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE\nkubernetes   ClusterIP   10.96.0.1    \u003cnone\u003e        443/TCP   15m\n```\n\n### **6. Run the test**\n\nConfigure test parameters\n\n```\nkubectl exec -it jmeter-master -n jmeter-ns -- jmeter -n -t /tests/HTTPSignInSignOffPlan.jmx -Jusers=50 -Jduration=300 -R jmeter-agent-0, jmeter-agent-1, jmeter-agent-2\n```\n\nRun the test\n\n```\nkubectl logs -f deployment/jmeter-master -n jmeter\n\n```\n\n### **7. Collect and Aggregate Results**\n\n* Use Kubernetes logs to fetch results:\n\n  ```kubectl\n  kubectl cp jmeter/jmeter-master:/test/test-results.jtl ./test-results.jtl\n\n  ```\n\nCleanup\n\n```\nkubectl delete namespace jmeter-ns\n\n```\n\n### **8. Monitor and Scale**\n\n* Use Kubernetes Horizontal Pod Autoscaler (HPA) to scale agents based on CPU usage:\n\n```\nkubectl autoscale deployment jmeter-agent --cpu-percent=50 --min=1 --max=10\n\n```\n\n### **9. Framework Structure**\n\nOrganize the project:\n\n```\njmeter-load-testing/\n├── Dockerfile\n├── kubernetes/\n│   ├── jmeter-master-deployment.yaml\n│   ├── jmeter-agent-deployment.yaml\n│   └── configmap.yaml\n├── helm-chart/\n└── tests/\n    ├── test.jmx\n    ├── test-data.csv\n\n```\n\n# **More trouble shooting techniques **\n\n## **couldn’t get current server API group list: Get “http://localhost:8080/api?timeout=32s”: dial tcp 127.0.0.1:8080: connect: connection refused **\n\n###### ChatGPT said:\n\nThe error message indicates that a client application, likely `kubectl`, is trying to access the Kubernetes API server at `http://localhost:8080`, but the connection is being refused. This is typically caused by the API server not running, being configured incorrectly, or the client not being able to reach it. Here’s how to troubleshoot and resolve the issue:\n\n---\n\n### 1. **Check Kubernetes Context and Configuration**\n\n* Run the following to inspect the current configuration:\n* Ensure the `current-context` points to the correct cluster.\n* To change the context, use:\n\n---\n\n### 2. **Verify Kubernetes API Server is Running**\n\n* If you are running Kubernetes locally (e.g., via `minikube` or `kind`), ensure the cluster is started:\n  * **Minikube:**\n\n    If it’s not running, start it:\n  * **Kind:**\n\n    If no clusters are listed, create one:\n\n---\n\n### 3. **Inspect API Server Endpoint**\n\n* The default API server address is unlikely to be `http://localhost:8080` unless you're running a local proxy (e.g., `kubectl proxy`).\n* Check the correct endpoint in the kubeconfig:\n\n  Look for the `server` entry under the current context, which should point to the correct API server URL.\n\n---\n\n### 4. **Start `kubectl proxy` if Needed**\n\n* If you need to connect through `http://localhost:8080`, you might need to run `kubectl proxy`:\n* This will forward requests from `localhost:8080` to the API server.\n\n---\n\n### 5. **Check Network Connectivity**\n\n* Ensure the client can reach the API server's actual endpoint.\n* Test the connection using:\n* Replace `\u003cAPI_SERVER_ENDPOINT\u003e` with the actual API server URL (e.g., `https://\u003cyour-cluster-endpoint\u003e`).\n\n---\n\n### 6. **Restart Kubernetes Components**\n\n* If running Kubernetes locally, restarting components may help:\n* If running on a managed cluster, verify the API server status with your cloud provider.\n\n---\n\n### 7. **Check for Firewall/Proxy Issues**\n\n* If you’re on a corporate network, ensure there are no firewalls or proxies blocking access to the API server.\n\n### 8. **Troubleshoot for Minikube**\n\n```\n$minikube start\n* minikube v1.34.0 on Microsoft Windows 11 Home 10.0.22631.4602 Build 22631.4602\n* Unable to pick a default driver. Here is what was considered, in preference order:\n  - docker: Not healthy: \"docker version --format {{.Server.Os}}-{{.Server.Version}}:{{.Server.Platform.Name}}\" exit status 1: error during connect: Get \"http://%2F%2F.%2Fpipe%2FdockerDesktopLinuxEngine/v1.47/version\": open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.\n  - docker: Suggestion:  \u003chttps://minikube.sigs.k8s.io/docs/drivers/docker/\u003e\n  - hyperv: Not healthy: Hyper-V requires Administrator privileges\n  - hyperv: Suggestion: Right-click the PowerShell icon and select Run as Administrator to open PowerShell in elevated mode. \u003c\u003e\n* Alternatively you could install one of these drivers:\n  - virtualbox: Not installed: unable to find VBoxManage in $PATH\n  - qemu2: Not installed: exec: \"qemu-system-x86_64\": executable file not found in %PATH%\n  - podman: Not installed: exec: \"podman\": executable file not found in %PATH%\n\nhttps://www.virtualbox.org/wiki/Downloads\n\nhttps://www.qemu.org/download/\n\nhttps://www.msys2.org/\n\nhttps://podman.io/docs/installation\n\n$kubectl get nodes\nE1215 09:39:19.938225   20516 memcache.go:265] couldn't get current server API group list: Get \"http://localhost:8080/api?timeout=32s\": dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.\nhttps://discuss.kubernetes.io/t/couldnt-get-current-server-api-group-list-get-http-localhost-8080-api-timeout-32s-dial-tcp-127-0-0-1-connect-connection-refused/25471\n\nResolve by\nKUBECONFIG=$HOME/.kube/config\nsudo chown $(id -u):$(id -g) $HOME/.kube/config\n\nif this still doesnt resolve. then,\nAll you need is to remove containerd service and reinstall it again\n\n\nInstall the latest PowerShell for new features and improvements! https://aka.ms/PSWindows\n\n. : File C:\\Users\\srinivas\\OneDrive\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1 cannot be loaded\nbecause running scripts is disabled on this system. For more information, see about_Execution_Policies at\nhttps:/go.microsoft.com/fwlink/?LinkID=135170.\nAt line:1 char:3\n+ . 'C:\\Users\\srinivas\\OneDrive\\Documents\\WindowsPowerShell\\Microsoft.P ...\n+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n    + CategoryInfo          : SecurityError: (:) [], PSSecurityException\n    + FullyQualifiedErrorId : UnauthorizedAccess\nhttps://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4#msi\n\n\npowershell run as a administrator\n minikube start --driver=hyperv\n```\n\n## **E1215 10:18:45.156194   14160 status.go:263] The \"minikube\" host does not exist!**\n\nChatGPT said:\n\nThe error indicates that Minikube is not able to find a cluster named `minikube`. This usually happens when no Minikube cluster has been created or the configuration is corrupted.\n\nHere’s how to troubleshoot and resolve the issue:\n\n---\n\n### 1. **Verify Existing Minikube Clusters**\n\n* Check if there are any existing Minikube clusters:\n* If the list is empty or the `minikube` profile is missing, you need to create a new cluster.\n\n---\n\n### 2. **Create a New Minikube Cluster**\n\n* Start a new Minikube cluster:\n* Specify a profile name if needed:\n\n---\n\n### 3. **Delete and Recreate the Cluster**\n\n* If there was an incomplete or corrupted setup, delete the existing configuration:\n* Then, create a new cluster:\n\n---\n\n### 4. **Check Virtualization**\n\n* Ensure your system supports virtualization, as Minikube often uses virtual machines.\n* Verify virtualization is enabled:\n  * **Linux:**\n  * **Windows (PowerShell):**\n  * **macOS:** Virtualization is enabled by default on modern Macs.\n* If virtualization is not supported, you can use the `--driver` flag with alternatives like Docker:\n\n---\n\n### 5. **Check the Minikube Driver**\n\n* Confirm the driver being used is properly installed and configured:\n* Supported drivers include:\n  * `docker`\n  * `virtualbox`\n  * `hyperkit`\n  * `none` (bare metal)\n* If needed, explicitly specify a driver:\n\n---\n\n### 6. **Inspect Logs**\n\n* If issues persist, check Minikube logs for details:\n\n---\n\n### 7. **Reset Minikube**\n\n* If your Minikube setup is corrupted, reset Minikube entirely:\n* After resetting, recreate the cluster:\n\n---\n\nLet me know if you encounter any issues during these steps!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbittla%2Fjmeter-load-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbittla%2Fjmeter-load-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbittla%2Fjmeter-load-testing/lists"}