{"id":13581572,"url":"https://github.com/NimbleArchitect/kubectl-ice","last_synced_at":"2025-04-06T10:32:34.707Z","repository":{"id":37238846,"uuid":"463633861","full_name":"NimbleArchitect/kubectl-ice","owner":"NimbleArchitect","description":"Kubectl-ice is an open-source tool for Kubernetes users to monitor and optimize container resource usage. Features include usage breakdowns for pods and containers, making scaling and optimization easier. The tool is compatible with major cloud providers and is actively developed by a community of contributors","archived":false,"fork":false,"pushed_at":"2024-03-30T13:55:23.000Z","size":710,"stargazers_count":249,"open_issues_count":1,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-05T21:44:45.935Z","etag":null,"topics":["cli","golang","krew","krew-plugin","kubectl","kubectl-plugin","kubectl-plugins","kubernetes","multi-container","sidecar-container"],"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/NimbleArchitect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"NimbleArchitect","ko_fi":"nimblearchitect","custom":["buymeacoffee.com/NimbleArchitect"]}},"created_at":"2022-02-25T18:17:37.000Z","updated_at":"2024-10-25T15:09:44.000Z","dependencies_parsed_at":"2024-01-14T19:17:00.513Z","dependency_job_id":"d278e303-0d4f-4072-abdd-2cfd4a05329d","html_url":"https://github.com/NimbleArchitect/kubectl-ice","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":"replicatedhq/krew-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleArchitect%2Fkubectl-ice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleArchitect%2Fkubectl-ice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleArchitect%2Fkubectl-ice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimbleArchitect%2Fkubectl-ice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NimbleArchitect","download_url":"https://codeload.github.com/NimbleArchitect/kubectl-ice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247470366,"owners_count":20944146,"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":["cli","golang","krew","krew-plugin","kubectl","kubectl-plugin","kubectl-plugins","kubernetes","multi-container","sidecar-container"],"created_at":"2024-08-01T15:02:06.058Z","updated_at":"2025-04-06T10:32:34.270Z","avatar_url":"https://github.com/NimbleArchitect.png","language":"Go","funding_links":["https://github.com/sponsors/NimbleArchitect","https://ko-fi.com/nimblearchitect","buymeacoffee.com/NimbleArchitect","https://www.buymeacoffee.com/NimbleArchitect"],"categories":["Go"],"sub_categories":[],"readme":"# kubectl-ice\nA kubectl plugin that allows you to easily view advanced configuration of all containers\n that are running inside pods, I created it so I could peer inside the pods and see\n the details of the containers that are inside running pods and then extended it so all\n containers could be viewed at once.\n\nice lists detailed information about the containers present inside a\n pod, useful for trouble-shooting multi container issues. You can view volume, \n image, port and executable configurations, along with current cpu and memory\n metrics all at the container level (requires metrics server)\n\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nimblearchitect/kubectl-ice)\n![GitHub](https://img.shields.io/github/license/NimbleArchitect/kubectl-ice)\n![Github All Releases](https://img.shields.io/github/downloads/NimbleArchitect/kubectl-ice/total.svg?color=blue)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/NimbleArchitect/kubectl-ice/release.yml)\n[![CodeQL](https://github.com/NimbleArchitect/kubectl-ice/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/NimbleArchitect/kubectl-ice/actions/workflows/codeql-analysis.yml)\n\n## Features:\n* Runs on Windows, Linux and MacOS\n* Only uses read permissions, no writes are called\n* Tree view adds each container in a pod, then each pod in a replica or stateful set etc, all the way up to the node level\n* Selectors work just like they do with the standard kubectl command\n* Sortable output columns\n* List all the containers in a kubernetes pod including Init and Ephemeral containers\n* Include or exclude rows from output using the match flag, useful to exclude containers with low memory or cpu usage\n* List only cpu and memory results that dont fall within range using the oddities flag\n* Also displays information on init and ephemerial containers\n* Pods can be filtered using their priority and priorityClassName\n* Most sub commands utilize aliases meaning less typing (eg command and cmd are the same)\n* Easily view securityContext details and POSIX capabilities\n* Use the show-namespace flag to output the pods namespace\n* Ability to read yaml from file or stdin for processing\n* Can specify columns to output for a more custom view\n* Limited colour output of some sub commands: green = ok, yellow = warning, red = bad\n\n\n[![asciicast](https://asciinema.org/a/512927.svg)](https://asciinema.org/a/512927)\n\n\n## Contributing\n\nIf you like my work or find this program useful and want to say thanks you can reach me on twitter [@NimbleArchitect](https://twitter.com/nimblearchitect) or you can [Sponsor me](https://github.com/sponsors/NimbleArchitect) with github sponsors or [Buy Me A Coffee](https://www.buymeacoffee.com/NimbleArchitect)\n\n\nAll feedback and contributions are welcome, if you want to raise an issue or help with fixes or features please [raise an issue to discuss](https://github.com/NimbleArchitect/kubectl-ice/issues)\n\n\n# Documentation\nFull documentation can be found over at:\n\nhttps://nimblearchitect.github.io/kubectl-ice\n\n# Installation\n## Install using krew\n\n```\n$ kubectl krew install ice\n```\nupdate with \n```\n$ kubectl krew update\n$ kubectl krew upgrade ice\n```\ndont have krew? check it out here [https://github.com/GoogleContainerTools/krew](https://github.com/GoogleContainerTools/krew)\n\n## Install from binary\n- download the required binary from the [downloads](https://nimblearchitect.github.io/kubectl-ice/downloads/) page\n- unzip and copy the kubectl-ice file to your path\n- run ```kubectl-ice help``` to check its working\n\n## Install from Source\n\nclone and build the source using the following commands\n```shell\ngit clone https://github.com/NimbleArchitect/kubectl-ice.git\ncd kubectl-ice\nmake bin\n```\nthen copy ./bin/kubectl-ice to somewhere in your path and run ```kubectl-ice version``` to check its working\n\n## Usage\nif kubectl-ice is in your path you can replace the command ```kubectl-ice``` with ```kubectl ice``` (remove the dash) to\n make it feel more like a native kubectl command, this also works if you have kubectl set as an alias, for example\n if k is aliased to kubectl you can type ```k ice status``` instead of ```kubectl-ice status```\n\n\nThe following commands are available for `kubectl-ice`\n```\nkubectl-ice capabilities  # Shows details of configured container POSIX capabilities\nkubectl-ice command       # Retrieves the command line and any arguments specified at the container level\nkubectl-ice cpu           # Show configured cpu size, limit and % usage of each container\nkubectl-ice environment   # List the env name and value for each container\nkubectl-ice help          # Help about any command\nkubectl-ice image         # List the image name and pull status for each container\nkubectl-ice ip            # List ip addresses of all pods in the namespace listed\nkubectl-ice lifecycle     # Show lifecycle actions for each container in a named pod\nkubectl-ice memory        # Show configured memory size, limit and % usage of each container\nkubectl-ice ports         # Shows ports exposed by the containers in a pod\nkubectl-ice probes        # Shows details of configured startup, readiness and liveness probes of each container\nkubectl-ice restarts      # Show restart counts for each container in a named pod\nkubectl-ice security      # Shows details of configured container security settings\nkubectl-ice status        # List status of each container in a pod\nkubectl-ice volumes       # Display container volumes and mount points\n```\n\nice also supports all the standard kubectl flags in addition to:\n```\nFlags:\n  -A, --all-namespaces                 List containers from pods in all namespaces\n      --annotation string              Show the selected annotation as a column\n      --color string                   Add some much needed colour to the table output. string can be one of: columns, custom, errors, mix and none (overrides environment variable ICE_COLOUR)\n  -c, --container string               Container name. If set shows only the named containers\n      --context string                 The name of the kubeconfig context to use\n  -m, --match string                   Filters out results, comma seperated list of COLUMN OP VALUE, where OP can be one of ==,\u003c,\u003e,\u003c=,\u003e= and != \n  -M, --match-only string              Filters out results but only calculates up visible rows\n  -n, --namespace string               If present, the namespace scope for this CLI request\n      --node-label string              Show the selected node label as a column\n      --node-tree                      Displayes the tree with the nodes as the root\n  -o, --output string                  Output format, currently csv, list, json and yaml are supported\n      --pod-label string               Show the selected pod label as a column\n      --select string                  Filters pods based on their spec field, comma seperated list of FIELD OP VALUE, where OP can be one of ==, = and != \n  -l, --selector string                Selector (label query) to filter on\n      --show-namespace                 Shows a column containing the pods namespace name for each container\n  -t, --tree                           Display tree like view instead of the standard list\n      --node-tree                      Displayes the tree with the nodes as the root\n      --show-node                      Show the node name column\n  -T  --show-type                      Show the container type column where:\n                                            I = init container\n                                            C = container\n                                            E = ephemerial container\n                                            P = Pod\n                                            D = Deployment\n                                            R = ReplicaSet\n                                            A = DaemonSet\n                                            S = StatefulSet\n                                            N = Node\n\n```\nselect subcommands also support the following flags\n```\nFlags:\n  -d, --details          Display the timestamp instead of age along with the message column\n  -p, --previous         Show previous state\n  -r, --raw              Show raw uncooked values\n      --sort string      Sort by column\n      --oddities         Show only the outlier rows that dont fall within the computed range (requires min 5 rows in output)\n```\nall flags are optional, see usage instructions and examples for more info\n\n## Examples\nSome example commands are listed below but full [usage instructions](https://nimblearchitect.github.io/kubectl-ice/documentation/#3_Usage) and [examples](https://nimblearchitect.github.io/kubectl-ice/documentation/#3.2_Example%20commands) can be found over at my website https://nimblearchitect.github.io/kubectl-ice/\n\n\n### Single pod info\nShows the currently used memory along with the configured memory requests and limits of all containers (side cars) in the pod named web-pod\n```\nkubectl ice memory web-pod\n```\n### Named containers\nthe optional container flag (-c) searchs all selected pods and lists only containers that match the name web-frontend\n```\nkubectl ice command -c web-frontend\n```\n\n### Alternate status view\nthe tree flag shows the containers and pods in a tree view, with values calculated all the way up to the parent\n```\nkubectl ice status -l app=demoprobe --tree\n```\n\n### Excluding rows\nuse the --match flag to show only the output rows where the used memory column is greater than or equal to 3MB, this has the effect of exclusing any row where the used memory column is currently under 4096kB, the value 4096 can be replaced with any whole number in kilobytes\n```\nkubectl ice mem -l app=userandomcpu --match 'used\u003e=4096'\n```\n\n### Extra selections\nusing the --select flag allows you to filter the pod selection to only pods that have a priorityClassName thats equal to system-cluster-critical, you can also match against priority\n```\nkubectl ice status --select 'priorityClassName=system-cluster-critical' -A\n```\n\n### Column labels\nwith the --node-label and --pod-label flags its possible to show the values of the labels as columns in the output table\n```\nkubectl ice status --node-label \"beta.kubernetes.io/os\" --pod-label \"component\" -n kube-system\n```\n\n\n## License\nLicensed under Apache 2.0 see [LICENSE](https://github.com/NimbleArchitect/kubectl-pod/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNimbleArchitect%2Fkubectl-ice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNimbleArchitect%2Fkubectl-ice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNimbleArchitect%2Fkubectl-ice/lists"}