{"id":13522436,"url":"https://github.com/howardjohn/kubectl-resources","last_synced_at":"2025-03-22T10:31:26.883Z","repository":{"id":45034838,"uuid":"193801143","full_name":"howardjohn/kubectl-resources","owner":"howardjohn","description":"Plugin to access Kubernetes resource requests, limits, and usage.","archived":false,"fork":false,"pushed_at":"2022-01-13T05:34:16.000Z","size":3435,"stargazers_count":41,"open_issues_count":6,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T10:37:49.475Z","etag":null,"topics":["kubectl","kubectl-plugins","kubernetes"],"latest_commit_sha":null,"homepage":null,"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/howardjohn.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":"2019-06-26T00:22:34.000Z","updated_at":"2025-03-05T15:27:35.000Z","dependencies_parsed_at":"2022-08-28T18:53:04.140Z","dependency_job_id":null,"html_url":"https://github.com/howardjohn/kubectl-resources","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howardjohn%2Fkubectl-resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howardjohn%2Fkubectl-resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howardjohn%2Fkubectl-resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howardjohn%2Fkubectl-resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/howardjohn","download_url":"https://codeload.github.com/howardjohn/kubectl-resources/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244943794,"owners_count":20536290,"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":["kubectl","kubectl-plugins","kubernetes"],"created_at":"2024-08-01T06:00:47.243Z","updated_at":"2025-03-22T10:31:26.541Z","avatar_url":"https://github.com/howardjohn.png","language":"Go","funding_links":[],"categories":["kubectl Plugins"],"sub_categories":["Installing plugins via awesome-kubectl-plugins"],"readme":"# Kubectl Resource Plugin\n\n[![Build status](https://badge.buildkite.com/cf86c7994aac947617af9b5a26cd4377f75f62d4f5a0529efa.svg)](https://buildkite.com/john-howard/build)\n\nA plugin to access Kubernetes resource requests, limits, and usage.\n\n## Install\n\n`go get github.com/howardjohn/kubectl-resources`\n\n## Usage\n\n```\nPlugin to access Kubernetes resource requests, limits, and usage.\n\nUsage:\n  kubectl-resources [flags]\n\nFlags:\n  -A, --all-namespaces                 If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.\n  -b, --by string                      column to aggregate on. Default is pod (default \"POD\")\n  -c, --color                          show colors for pods using excessive resources (default true)\n  -h, --help                           help for kubectl-resources\n  -n, --namespace string               If present, the namespace scope for this CLI request\n  -l, --selector string                Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)\n  -d, --show-nodes                     include node names\n  -v, --verbose                        show full resource names\n  -w, --warnings                       only show resources using excessive resources\n```\n\nExample output:\n\n```\n$ kubectl resources\nNAMESPACE       POD             CPU USE CPU REQ CPU LIM MEM USE MEM REQ MEM LIM\ndefault         details-v1      6m      110m    2000m   36Mi    39Mi    1000Mi\ndefault         productpage-v1  12m     110m    2000m   71Mi    39Mi    1000Mi\ndefault         ratings-v1      5m      110m    2000m   34Mi    39Mi    1000Mi\ndefault         reviews-v1      6m      110m    2000m   117Mi   39Mi    1000Mi\ndefault         reviews-v2      7m      110m    2000m   106Mi   39Mi    1000Mi\ndefault         reviews-v3      6m      110m    2000m   114Mi   39Mi    1000Mi\ndefault         shell-f2g7f     4m      20m     2500m   24Mi    164Mi   1465Mi\ndefault         shell-p6ggs     5m      20m     2500m   24Mi    164Mi   1465Mi\n```\n\n`kubectl resources` will by default shorten pod and node names. This can be disabled with `-v`.\nIn the above example, the `details-v1` deployment has just one replica, so only the deployment name is shown.\nFor `shell`, which has multiple replicas, just the replicaset's identifier is shown.\nFor nodes, only the unique segment of the name is shown.\n\nYou can also aggregate info at different levels. By default this is at the pod level, but can also be namespace, node, or container.\n\nFor example, to see resource utilization by namespace\n\n```\n$ kubectl resources --by namespace\nNAMESPACE     CPU USE  CPU REQ  CPU LIM  MEM USE  MEM REQ  MEM LIM\ndefault       3m       110m     2100m    29Mi     144Mi    1152Mi\nistio-system  70m      2140m    14800m   570Mi    3641Mi   8934Mi\nkube-system   82m      1831m    3222m    1312Mi   1203Mi   2365Mi\n              155m     4081m    20122m   1912Mi   4989Mi   12452Mi\n```\n\n## Known Issues\n\nWhile init containers [play a role in resource allocation](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#resources), they are not accounted for in this tool.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowardjohn%2Fkubectl-resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhowardjohn%2Fkubectl-resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowardjohn%2Fkubectl-resources/lists"}