Last active
August 5, 2019 20:26
-
-
Save steimntz/b20c3bd17c89ab44f8bd2e9abc755029 to your computer and use it in GitHub Desktop.
Change a Opaque secret in Kubernetes
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
MY_OLD_PASS="oldpass"; | |
MY_NEW_PASS="newpass"; | |
kubectl get secret sg -o yaml | sed -e "s,$(echo $MY_OLD_PASS | tr -d \\n | base64 -w 0),$(echo $MY_NEW_PASS | tr -d \\n | base64 -w 0)," | kubectl apply -f -; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment