Skip to content

Instantly share code, notes, and snippets.

@schwabix
Created July 8, 2024 13:53
Show Gist options
  • Save schwabix/4e5eff7dfd4a543a78e1d70e17d1d420 to your computer and use it in GitHub Desktop.
Save schwabix/4e5eff7dfd4a543a78e1d70e17d1d420 to your computer and use it in GitHub Desktop.
Dump all secrets in namespacce
#!/bin/sh
kubectl -n <NS> get secret -o custom-columns=:.metadata.name,:.metadata.namespace --no-headers | xargs -n 2 sh -c '(kubectl get secret -n $3 -o yaml $2) > $2.yaml'
-- {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment