Last active
October 24, 2023 19:10
-
-
Save elarib/1231df8a2c4b0442da381329c99b9ee6 to your computer and use it in GitHub Desktop.
Dump all kubernetes secrets configmaps to yaml files
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
NAMESPACE=YOUR_NAMESPACE_HERE && \ | |
kubectl -n $NAMESPACE get --no-headers configmaps | awk '{print $1}' | \ | |
xargs -I {} sh -c "kubectl -n $NAMESPACE get configmaps {} -o yaml > {}.yaml" |
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
NAMESPACE=YOUR_NAMESPACE_HERE && \ | |
kubectl -n $NAMESPACE get --no-headers secrets --field-selector type=Opaque | awk '{print $1}' | \ | |
xargs -I {} sh -c "kubectl -n $NAMESPACE get secret {} -o yaml > {}.yaml" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment