Created
May 11, 2021 11:37
-
-
Save luigidifraia/2151a792721f1f5cc9f7b2b849905e6a to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# List all non-ephemeral containers used by pods in all namespaces of a k8s cluster | |
kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" | \ | |
tr -s '[[:space:]]' '\n' | \ | |
sort | uniq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment