Created
May 7, 2020 07:24
-
-
Save mstrzele/c59d3d5c41def260671f8c8bcb5209ee 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
#!/usr/bin/env bash | |
namespace=$1 | |
mapfile -t api_resources < <(kubectl api-resources --namespaced -o name --sort-by=name --verbs=list) | |
options=() | |
if [[ -n $namespace ]]; then | |
options+=("-n $namespace") | |
fi | |
IFS=',' | |
eval "kubectl ${options[*]} get ${api_resources[*]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment