cfg/.zsh/config.sh.d/kubernetes.sh

20 lines
368 B
Bash
Raw Normal View History

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