diff --git a/.zsh/config.sh.d/kubernetes.sh b/.zsh/config.sh.d/kubernetes.sh new file mode 100644 index 0000000..abf0999 --- /dev/null +++ b/.zsh/config.sh.d/kubernetes.sh @@ -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 :