Add kubectlgetall command
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
14452bceb8
commit
b150e86533
1 changed files with 16 additions and 0 deletions
16
.zsh/config.sh.d/kubernetes.sh
Normal file
16
.zsh/config.sh.d/kubernetes.sh
Normal 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 :
|
Loading…
Reference in a new issue