Files
platform/scripts/k8s-all
2021-08-30 14:58:45 +02:00

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