{"id":31793529,"url":"https://github.com/suizer98/kubernetes-machinegun","last_synced_at":"2026-04-10T02:53:36.020Z","repository":{"id":317790846,"uuid":"1067830828","full_name":"Suizer98/Kubernetes-Machinegun","owner":"Suizer98","description":"As Tinker once said: \"Pew Pew, Pew Pew Pew!\"","archived":false,"fork":false,"pushed_at":"2025-10-03T02:43:59.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-03T04:22:35.176Z","etag":null,"topics":["ddos","docker","fastapi","kubernetes","minikube","postgresql","redis"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Suizer98.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-01T13:02:34.000Z","updated_at":"2025-10-03T02:44:03.000Z","dependencies_parsed_at":"2025-10-06T08:17:15.540Z","dependency_job_id":null,"html_url":"https://github.com/Suizer98/Kubernetes-Machinegun","commit_stats":null,"previous_names":["suizer98/kubernetes-machinegun"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Suizer98/Kubernetes-Machinegun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suizer98%2FKubernetes-Machinegun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suizer98%2FKubernetes-Machinegun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suizer98%2FKubernetes-Machinegun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suizer98%2FKubernetes-Machinegun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Suizer98","download_url":"https://codeload.github.com/Suizer98/Kubernetes-Machinegun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Suizer98%2FKubernetes-Machinegun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004913,"owners_count":26083802,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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":["ddos","docker","fastapi","kubernetes","minikube","postgresql","redis"],"created_at":"2025-10-10T18:19:25.925Z","updated_at":"2025-10-10T18:19:28.719Z","avatar_url":"https://github.com/Suizer98.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔫 Kubernetes Machine Gun\r\n\r\n[![Tech Stacks](https://skillicons.dev/icons?i=kubernetes,python,fastapi,nginx,prometheus,grafana,postgresql,redis,docker,bash\u0026theme=dark)](https://skillicons.dev)\r\n\r\n**Load testing platform for Kubernetes applications**\r\n\r\n```mermaid\r\ngraph TD\r\n    MG[Machine Gun 🔫] --\u003e|Load Test| NG[Nginx ⚖️]\r\n    NG --\u003e|Load Balance| FA1[FastAPI 1 🚀]\r\n    NG --\u003e|Load Balance| FA2[FastAPI 2 🚀]\r\n    NG --\u003e|Load Balance| FA3[FastAPI 3 🚀]\r\n    \r\n    FA1 --\u003e|Metrics| PM[Prometheus 📊]\r\n    FA2 --\u003e|Metrics| PM\r\n    FA3 --\u003e|Metrics| PM\r\n    NG --\u003e|Metrics| PM\r\n    \r\n    FA1 --\u003e|Data| PG[(PostgreSQL 🐘)]\r\n    FA2 --\u003e|Data| PG\r\n    FA3 --\u003e|Data| PG\r\n    \r\n    FA1 --\u003e|Queue Tasks| RD[(Redis Queue 🔴)]\r\n    FA2 --\u003e|Queue Tasks| RD\r\n    FA3 --\u003e|Queue Tasks| RD\r\n    \r\n    PM --\u003e|Visualize| GF[Grafana 📈]\r\n    \r\n    classDef machineGun fill:#ff6b6b,stroke:#d63031,stroke-width:3px,color:#fff\r\n    classDef nginx fill:#00b894,stroke:#00a085,stroke-width:2px,color:#fff\r\n    classDef fastapi fill:#6c5ce7,stroke:#5f3dc4,stroke-width:2px,color:#fff\r\n    classDef database fill:#fdcb6e,stroke:#e17055,stroke-width:2px,color:#000\r\n    classDef queue fill:#e84393,stroke:#d63031,stroke-width:2px,color:#fff\r\n    classDef monitoring fill:#74b9ff,stroke:#0984e3,stroke-width:2px,color:#fff\r\n    \r\n    class MG machineGun\r\n    class NG nginx\r\n    class FA1,FA2,FA3 fastapi\r\n    class PG database\r\n    class RD queue\r\n    class PM,GF monitoring\r\n```\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# Deploy\r\nchmod +x deploy.sh \u0026\u0026 ./deploy.sh\r\n\r\n# Access services\r\nminikube service grafana -n machine-gun\r\nminikube service prometheus -n machine-gun\r\nminikube service nginx -n machine-gun\r\n```\r\n\r\n## 💥 Launch Attacks\r\n\r\n```bash\r\n# DDoS (1000 RPS)\r\nminikube kubectl -- exec -it deployment/machine-gun -n machine-gun -- \\\r\n  python3 machine_gun.py --attack=ddos --target=http://nginx --duration=60 --rps=1000\r\n\r\n# Burst (2000 RPS spike)\r\nminikube kubectl -- exec -it deployment/machine-gun -n machine-gun -- \\\r\n  python3 machine_gun.py --attack=burst --target=http://nginx --duration=30 --rps=2000\r\n\r\n# Sustained (500 RPS)\r\nminikube kubectl -- exec -it deployment/machine-gun -n machine-gun -- \\\r\n  python3 machine_gun.py --attack=sustained --target=http://nginx --duration=300 --rps=500\r\n```\r\n\r\n## Monitoring\r\n\r\n- **Grafana**: `minikube service grafana -n machine-gun` (admin/admin)\r\n- **Prometheus**: `minikube service prometheus -n machine-gun`\r\n- **FastAPI**: `minikube service nginx -n machine-gun`\r\n\r\n## Stop Services\r\n\r\n```bash\r\n# Stop all services (clean)\r\nminikube kubectl -- delete namespace machine-gun\r\n\r\n# Stop Minikube entirely\r\nminikube stop\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuizer98%2Fkubernetes-machinegun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuizer98%2Fkubernetes-machinegun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuizer98%2Fkubernetes-machinegun/lists"}