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