{"id":16799631,"url":"https://github.com/tomplus/k8s-multi-tool","last_synced_at":"2026-04-27T01:31:39.110Z","repository":{"id":62573573,"uuid":"148687308","full_name":"tomplus/k8s-multi-tool","owner":"tomplus","description":"Set of tools to manage your Kubernetes clusters","archived":false,"fork":false,"pushed_at":"2018-09-29T19:14:14.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-08T22:04:11.797Z","etag":null,"topics":["asyncio","exec","k8s","kubernetes","logs","pod","python","tail"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomplus.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}},"created_at":"2018-09-13T19:27:41.000Z","updated_at":"2018-09-29T19:13:21.000Z","dependencies_parsed_at":"2022-11-03T18:40:05.148Z","dependency_job_id":null,"html_url":"https://github.com/tomplus/k8s-multi-tool","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tomplus/k8s-multi-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomplus%2Fk8s-multi-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomplus%2Fk8s-multi-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomplus%2Fk8s-multi-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomplus%2Fk8s-multi-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomplus","download_url":"https://codeload.github.com/tomplus/k8s-multi-tool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomplus%2Fk8s-multi-tool/sbom","scorecard":{"id":893196,"data":{"date":"2025-08-11","repo":{"name":"github.com/tomplus/k8s-multi-tool","commit":"53c85cd59af2260267f121e4266f578706ef54f3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T12:39:50.862Z","repository_id":62573573,"created_at":"2025-08-24T12:39:50.862Z","updated_at":"2025-08-24T12:39:50.862Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32319559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asyncio","exec","k8s","kubernetes","logs","pod","python","tail"],"created_at":"2024-10-13T09:29:21.748Z","updated_at":"2026-04-27T01:31:39.093Z","avatar_url":"https://github.com/tomplus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-multi-tool (k8smtool)\n\n[![PyPI version](https://badge.fury.io/py/k8smtool.svg)](https://badge.fury.io/py/k8smtool)\n[![pypi supported versions](https://img.shields.io/pypi/pyversions/k8smtool.svg)](https://pypi.python.org/pypi/k8smtool)\n\nSet of tools to manage your Kubernetes clusters.\n\n# Requirements\n\n* Python \u003e= 3.5.2\n* [kubernetes_asyncio](https://github.com/tomplus/kubernetes_asyncio)\n\n# Instalation\n\nThis application is distributed as a Python package. You can install it globally\nin your system:\n\n```\npip install k8smtool\n```\n\nor in the virtual environment:\n\n```\n# create virtalenv\nvirtualenv -ppython3 env\n\n# activate\n. env/bin/activate\n\n# instalation\npip install k8smtool\n```\n\n# Usage\n\nAll scripts read the confguration from `.kube/config` or from a file defined by `KUBECONFIG` as _kubectl_ does it.\n\nCommon arguments:\n\nPositional arguments - `[filters [filters ...]]` are optional and can have values:\n* `@namespace` - get objects from `namespace` only\n* `~name` - get objects with name like `name*`\n* `labe~value` - get objects which has `label` equals `value`\nThis argument can be joined and repeated like this `@namespace1 @namespace2 ~my-pod-name stage~dev`\n\n\n## Actions on PODs\n\nThe script `pod.py` can list pods, images, execute commands or print logs from PODs.\n\n```\nusage: pod.py [-h] [--cmd CMD] [--batch-size BATCH_SIZE] [--follow]\n              [--lines LINES]\n              {delete-broken,exec,images,ls,tail} [filters [filters ...]]\n\nExecute actions on pods\n\npositional arguments:\n  {delete-broken,exec,images,ls,tail}\n                        command to execute\n  filters               @namespace, ~name, label-name~value\n\noptional arguments:\n  -h, --help            show this help message and exit\n\nOption for `exec` command::\n  --cmd CMD             command to execute\n  --batch-size BATCH_SIZE\n                        batch size\n\nOption for `tail` command::\n  --follow              follow logs\n  --lines LINES         show the last lines\n```\n\n### list pods\n\n```\n# all pods from all namespaces\npod.py ls\n\n# pods from \"my-namespace\"\npod.py ls @my-namespace\n\n# pods with name like \"dns\"\npod.py ls ~dns\n\n# pods with label team=bears\npod.py ls team~bears\n\n```\n\nExample output:\n\n```\nNAMESPACE    PODS                                                 VERSION                         STATUS   CONDITIONS                      NODE\nkube-system  event-exporter-v0.1.9-5cfff98cdb-9ksr6               v0.1.9;v0.2.2                   Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-j0vb\nkube-system  fluentd-gcp-v2.0.17-cffq6                            2.0.17;v0.2.2                   Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-j0vb\nkube-system  fluentd-gcp-v2.0.17-ltfff                            2.0.17;v0.2.2                   Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-mnpm\nkube-system  heapster-v1.5.2-56fb496f65-ffffs                     v1.5.2;v0.2.2;1.8.1             Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-j0vb\nkube-system  kube-dns-56dc69f5bd-mmffw                            1.14.10;1.14.10;v0.2.3;1.14.10  Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-mnpm\nkube-system  kube-dns-autoscaler-7db4ffb9b7-f5hbx                 1.1.2-r2                        Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-j0vb\nkube-system  kube-proxy-cluster-1-default-pool-b4ff0116-mfxf      v1.9.7-gke.5                    Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-mmx0\nkube-system  kubernetes-dashboard-85c74f8997-kbfwf                v1.8.3                          Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-mmx0\nkube-system  metrics-server-v0.2.1-7f8dd98c8f-ftkfs               v0.2.1;1.8.1                    Running  Initialized+PodScheduled+Ready  cluster-1-default-pool-b43b0116-mnpm\n```\n\nNotice: VERSION contains version of images of all containers within POD.\n\n### list used images\n\n```\npod.py images @default\n```\n\nExample output:\n```\nIMAGE                                              NAMESACE  POD-STATUS\ngcr.io/google-samples/hello-app:1.0                default   Running\nquay.io/coreos/configmap-reload:v0.0.1             default   Running\nquay.io/coreos/prometheus-config-reloader:v0.22.1  default   Running\nquay.io/coreos/prometheus-operator:v0.22.1         default   Running\nquay.io/prometheus/prometheus:v2.3.1               default   Running\ntpimages/airly-exporter:latest                     default   Running\n```\n\n### send exec command to multiple pods\n\n```\n# exec command \"date\" on all pods from namespace \"default\" (in the same time)\npod.py exec @default --cmd date\n\n# exec command in batch mode (eg. 2 pods at a time)\npod.py exec @default --cmd date --batch-size 2\n\n# you will be asked about command\npod.py exec @default\n```\n\n### tail logs from multiple pods\n\n```\n# print out last 10 lines from all pods with the name like \"kube-dns\"\npod.py tail ~kube-dns --lines 10\n\n# follow new logs\npod.py tail ~kube-dns --follow\n```\n\n### delete \"broken\" pods\n\n```\n# delete pods which are not in ready state and running (eg. failed, evicted, completed jobs)\npod.py delete-broken\n```\n\n## Searching Kubernetes' objects\n\nScript `search.py` searches Kubernetes objects.\n\n```\nusage: search.py [-h] query [filters [filters ...]]\n\nSearch objects\n\npositional arguments:\n  query       regexp pattern\n  filters     @namespace, ~name, label-name~value\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n\nExample:\n\n```\n# list objects which contains phrase \"prometheus\" in defintion\nsearch.py prometheus\n\n# list objects which have defined port=8080\nsearch.py \"port.*?8080\"\n```\n\nOutput:\n\n```\nNAMESPACE    TYPE       OBJECT                                RESULT\ndefault      pod        prometheus-operator-6dd95b9d7b-gghrf  'ports': [{'container_port': 8080,\nkube-system  endpoints  default-http-backend                  'ports': [{'name': 'http', 'port': 8080, 'protoco\nkube-system  pod        l7-default-backend-6497bcdb4d-bvwhq   'port': 8080,\nkube-system  service    default-http-backend                  ,\"spec\":{\"ports\":[{\"name\":\"http\",\"port\":80,\"protocol\":\"TCP\",\"targetPort\":8080}],\"select\n```\n\nNOTICE: `RESULT` contains this part of object's definition where searched phrase was found\n\n\n## Recently created objects\n\nThe script `just.py` lists newly created objects.\n\n```\nusage: just.py [-h] [--age AGE] [filters [filters ...]]\n\nList objects created about 5 minutes ago\n\npositional arguments:\n  filters     @namespace, ~name, label-name~value\n\noptional arguments:\n  -h, --help  show this help message and exit\n  --age AGE\n```\n\nExample:\n\n```\n# list objects created about 1h ago\njust.py --age 3600\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomplus%2Fk8s-multi-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomplus%2Fk8s-multi-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomplus%2Fk8s-multi-tool/lists"}