Created
February 16, 2022 14:30
-
-
Save akhenakh/6cf624e4134797246583dacac2143d9a to your computer and use it in GitHub Desktop.
Dump all kubernetes ressources from all namespaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DATE=`date +%F` | |
for NS in `kubectl get ns --no-headers -o custom-columns=":metadata.name"` | |
do | |
kubectl get all -n $NS -o yaml > ${DATE}-${NS}.yaml | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment