Last active
May 19, 2020 03:05
-
-
Save Bharathkumarraju/97a919f7cb4313d9ab4f23e079d2c446 to your computer and use it in GitHub Desktop.
List all available api resources in all namespaces in kubernetes cluster
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 | |
ALL_RESOURCES=$(kubectl api-resources | awk 'NR>1' | awk '{print $1}' | xargs echo) | |
for i in $ALL_RESOURCES | |
do | |
echo -e "$i\n------------------------------------------------------------------" | |
kubectl get $i --all-namespaces | |
echo -e "\n" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment