Last active
July 22, 2025 14:51
-
-
Save duboisf/b73fb645b73bd809e8d12afddb2cdc57 to your computer and use it in GitHub Desktop.
Find all images used in the current kubernetes cluster with image sizes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get no -o json | |
| from json | |
| get items | |
| select status.images status.nodeInfo.architecture | |
| rename images arch | |
| flatten | |
| update images.names { |in| | |
if ($in | length) > 1 { | |
$in | filter { $in !~ @sha } | |
} else { | |
$in | |
} | |
} | |
| flatten | |
| flatten | |
| update sizeBytes { into filesize } | |
| sort-by sizeBytes | |
| uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment