14 lines
344 B
Bash
Executable File
14 lines
344 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Simple script for fetching all resources from a namespace, might include some
|
|
# clutter
|
|
|
|
[ $# -lt 1 ] && echo "Usage: k8s-all [namespace]" && exit 1
|
|
|
|
for r in $(kubectl api-resources --verbs=list --namespaced -o name)
|
|
do
|
|
echo "Resource: $r" \
|
|
&& kubectl get $r -n $1 --ignore-not-found \
|
|
&& echo
|
|
done
|