Created
May 31, 2021 11:47
-
-
Save ybelleguic/e63fcb0bc6f730d5edd200f66db874e0 to your computer and use it in GitHub Desktop.
kubernetes list all objects in ns
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
function klsns() { | |
NS=$1 | |
if [ "${#@}" -eq "0" ]; then | |
NS="default" | |
fi | |
for i in $(kubectl api-resources --verbs=list --namespaced -o name 2>/dev/null) | |
do | |
kubectl get --show-kind --ignore-not-found -n $NS $i 2>/dev/null | |
sleep 0.1 | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment