Created
June 4, 2022 21:02
-
-
Save mcfearsome/5c4506103787a5f352b5596eb03de4d2 to your computer and use it in GitHub Desktop.
k8s-find-resources-in-ns.bash
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
#!/usr/bin/env bash | |
ns=default | |
(k api-resources --namespaced --no-headers | awk '{ print $1 }' -) | ( | |
while read -r LINE; do | |
echo "resources is: $LINE"; | |
kubectl --namespace=$ns get "$LINE" -owide | |
done; | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment