Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Created November 15, 2018 17:44
Show Gist options
  • Save ipedrazas/a53d49258a7b6e668e3fac6c2b825b64 to your computer and use it in GitHub Desktop.
Save ipedrazas/a53d49258a7b6e668e3fac6c2b825b64 to your computer and use it in GitHub Desktop.
List docker images in a Kubernetes cluster
#!/bin/bash
IMAGES=()
# Get helm releases
helm ls -q | while read i; do
echo "Processing release $i";
# Get docker images per release
helm get "$i" | grep "image: \"" | awk '{print $2}';
done
# remove duplicates
# awk '!a[$0]++' alpha03.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment