kubectl analyze-images gives you an at-a-glance view of the largest and most-used container images in a Kubernetes cluster, with image sizes, pod usage, and cached-on-node counts in one easy-to-scan report.
curl -fsSL https://raw.githubusercontent.com/ronaknnathani/kubectl-analyze-images/main/install.sh | shBy default, the script installs to /usr/local/bin when writable, otherwise ~/.local/bin. Override with INSTALL_DIR=/path/to/bin.
Download the latest archive for your platform from the releases page, then place the binary on your PATH.
kubectl krew install analyze-imagesgit clone https://github.com/ronaknnathani/kubectl-analyze-images.git
cd kubectl-analyze-images
make build
make installRequires Go 1.26+.
kubectl analyze-images
kubectl analyze-images -n production -l app=web
kubectl analyze-images --context=prod --kubeconfig=/path/to/kubeconfig
kubectl analyze-images --sort-by=pods --top-images=50
kubectl analyze-images -o json
kubectl analyze-images --truncate-image-names --image-name-parts=2The plugin lists pods and nodes with read-only Kubernetes API calls. Pod specs provide usage counts, while node status provides image sizes and cached-on-node counts. For namespace or label-filtered runs, it reports only matching pod images and enriches them with node image data when available.
make build # Run deps, tests, lint, then build the plugin
make test # Run tests
make lint # Run pinned golangci-lint
make ci # Run the same checks as GitHub Actions
make check # Run tests and linter
make test-coverage # Run tests with coverage report
make snapshot # Build snapshot release locallymake ci
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin vX.Y.ZGoReleaser publishes release artifacts via GitHub Actions. Update plugins/analyze-images.yaml with checksums from the release before distributing via krew.
MIT. See LICENSE.
