Skip to content

Latest commit

 

History

History
9 lines (9 loc) · 266 Bytes

snippets-kubectl.md

File metadata and controls

9 lines (9 loc) · 266 Bytes
Export ALL resources from a namespace
mkdir resources
cd resources
kubectl api-resources --namespaced | awk '{print $1}' | sed '1d' |\
  while read -r resource; do \
    echo "$(kubectl get $resource -n <namespace> -o yaml > $resource.yaml)"; \
  done