Last active
July 13, 2020 20:57
-
-
Save rms1000watt/6aa247e1f25fb6952ba3b1c3fa2d3be1 to your computer and use it in GitHub Desktop.
Get & Set Kubernetes Secret Value
This file contains hidden or 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
| kubectl get secret app1 -o jsonpath="{.data.MYSQL_CONN}" | base64 --decode | |
| cs=$(echo -n "mysql://user:pass@host:port/db" | base64) | |
| kubectl patch secret app1 -p='{"data":{"MSQL_CONN": "'"${cs}"'"}}' -v=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment