Add kubectlgetall command

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-06-08 11:42:48 +02:00
parent 14452bceb8
commit b150e86533
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -0,0 +1,16 @@
function kubectlgetall {
local namespace="${1}"
shift
for i in $(
kubectl api-resources --verbs=list --namespaced -o name |
grep -v "events.events.k8s.io" |
grep -v "events" |
sort | uniq
); do
echo "Resource:" $i >&2
kubectl -n ${namespace} get --ignore-not-found ${i} "${@}"
done
}
# vim: set ft=zsh :