{"id":28047212,"url":"https://github.com/woodprogrammer/kubectl-load","last_synced_at":"2025-05-11T20:46:47.264Z","repository":{"id":290604848,"uuid":"975008520","full_name":"WoodProgrammer/kubectl-load","owner":"WoodProgrammer","description":"CLI tool to handle deployment manifests according to your Kubernetes topology","archived":false,"fork":false,"pushed_at":"2025-05-07T02:03:03.000Z","size":878,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-11T20:46:24.211Z","etag":null,"topics":["docker","kubectl","kubernetes","linux","loadtest","plugin","testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WoodProgrammer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-04-29T16:30:02.000Z","updated_at":"2025-05-07T02:03:07.000Z","dependencies_parsed_at":"2025-05-07T03:19:06.392Z","dependency_job_id":"f0ccdd9d-04c8-440e-9b4c-ce811b9e6de5","html_url":"https://github.com/WoodProgrammer/kubectl-load","commit_stats":null,"previous_names":["woodprogrammer/k8sload","woodprogrammer/kubectl-load"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoodProgrammer%2Fkubectl-load","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoodProgrammer%2Fkubectl-load/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoodProgrammer%2Fkubectl-load/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WoodProgrammer%2Fkubectl-load/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WoodProgrammer","download_url":"https://codeload.github.com/WoodProgrammer/kubectl-load/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253632898,"owners_count":21939382,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["docker","kubectl","kubernetes","linux","loadtest","plugin","testing"],"created_at":"2025-05-11T20:46:43.262Z","updated_at":"2025-05-11T20:46:47.253Z","avatar_url":"https://github.com/WoodProgrammer.png","language":"Go","readme":"# kubectl-load\n\nkubectl-load is a Kubernetes-native load testing tool that spins up producer and consumer pods to perform network traffic tests using iperf3. It provides an easy way to simulate and measure network throughput between nodes or zones and exposes metrics via a Prometheus-compatible exporter.\n\n🚀 Features\n\n*  Deploys iperf3-based load test pods (producer and consumer) into Kubernetes\n\n* Customizable test topologies and node affinities\n\n* Prometheus-compatible metrics exporter for test results\n\n* Supports hostNetwork, topology spread constraints, node selectors, and affinity rules\n\n* Automates TCP performance testing across nodes or availability zones\n\n## Usage\n\nThe load test is configured via a declarative topology file (YAML format). Example:\n\n```yaml\n\ntopology:\n  producer:\n    name: producer\n    namespace: producer\n    spec:\n      hostNetwork: true\n      port: 3000\n      replicas: 2\n      exporterImage: emirozbir/k8sload-exporter:latest\n      image: emirozbir/k8sload:latest\n      command: [\"iperf3\"]\n      args: [\"-s\", \"-p\", \"3000\"]\n      antiAffinity: true\n      topologyKeys:\n        - app: nginx\n      nodeSelector:\n        node: node-two\n      nodeAffinityRules:\n        az: us-west-1a\n\n  consumer:\n    name: consumer\n    namespace: consumer\n    spec:\n      port: 8080\n      exporterPort: 9100\n      replicas: 1\n      command: [\"iperf3\"]\n      args: [\"-c\", \"producer.producer\", \"-p\", \"3000\", \"-J\", \"\u003e\", \"metrics.json\"]\n      exporterImage: emirozbir/k8sload-exporter:latest\n      image: emirozbir/k8sload:latest\n      antiAffinity: false\n      topologyKeys:\n        - app: nginx\n      nodeSelector:\n        node: node-one\n      nodeAffinityRules:\n        az: us-west-1b\n```\n\nthen you can easily download the recent release and move it under a PATH on your local with the name `kubectl-load`\n\n```sh\n$ kubectl load -f load.yaml\n\n```\n\u003cimg src=\"img/cli.png\"\u003e\u003c/img\u003e\n\n```sh\nroot@ubuntu-s-2vcpu-2gb-90gb-intel-fra1-01:~# kubectl get po -n producer\nNAME                        READY   STATUS    RESTARTS   AGE\nproducer-788f7565d5-2gfb8   1/1     Running   0          9m49s\nproducer-788f7565d5-2wxvz   0/1     Pending   0          9m49s\n```\n\nThe producer pods will spin up an iperf3 server and it basically wait for the load.\n\n\nLet's check the sample output in consumer side;\n\n```sh\nroot@ubuntu-s-2vcpu-2gb-90gb-intel-fra1-01:~# kubectl get po -n consumer\n\nNAME                        READY   STATUS    RESTARTS   AGE\nconsumer-6fc7d77ddb-drb4n   2/2     Running   0          5s\n```\n\nConsumer pods will run the the iperf3 command what you have passed for load test scenario.\n\n### Prometheus Integration\n\n```yaml\nscrape_configs:\n  - job_name: \"k8sload\"\n    metrics_path: \"/metrics\"   # change if your exporter exposes metrics on a different path\n    scheme: \"http\"            # or \"http\" depending on your exporter\n    static_configs:\n      - targets:\n        - \"localhost:9100\"  # your exporter IP:port or domain\n```\n\n## How It Works\n\nThe producer pod starts an iperf3 server.\n\nThe consumer pod runs as a client, connecting to the producer and performing throughput tests.\n\nTest results are saved and exposed via an integrated Prometheus exporter.\n\nMetrics can be scraped by Prometheus and visualized in Grafana dashboards.\n\n📦 Docker Images\n\n* emirozbir/k8sload: Runs the iperf3 tests\n\n* emirozbir/k8sload-exporter: Exposes results as Prometheus metrics\n\n📊 Metrics\n\nAfter the test, results such as bandwidth, jitter, retransmits, and throughput are available under Prometheus metrics endpoint.\n\nExample metrics:\n\n```sh\nk8sload_bandwidth_bytes_total\nk8sload_retransmits_total\nk8sload_test_duration_seconds\n```\n\n📌 Use Cases\n\n* Test performance between Kubernetes nodes or pods\n\n* Benchmark under real-world deployment conditions\n\n* Validate network topology configurations\n\n* Visualize network throughput over time\n\n🛠️ Requirements\n\n* Kubernetes 1.20+\n* Prometheus (optional, for metric scraping)\n\n📈 Roadmap\n\n* Add UDP test support\n* Enable autoscaling scenarios\n* Add CLI for dynamic test provisioning\n* Support mesh or multi-hop topologies\n\n🤝 Contributing\n\nFeel free to open issues or pull requests for improvements, bug fixes, or new features.\n\n📜 License\n\nApache License, Version 2.0","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodprogrammer%2Fkubectl-load","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoodprogrammer%2Fkubectl-load","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodprogrammer%2Fkubectl-load/lists"}