base64 - base64 encode/decode data and print to standard output
base64 [OPTION]... [FILE]
Options you will use
-d, --decode- decode data
-w, --wrap=COLS- wrap encoded lines after COLS characters (default 76); 0 disables wrapping
Examples
$ kubectl get secret db -o jsonpath='{.data.password}' | base64 -dread a Secret value - base64 is an encoding, not encryption
$ echo -n s3cret | base64encode WITHOUT a trailing newline (-n) - a classic Secret bug
Gotchas
- echo without -n adds a newline, which becomes part of the encoded value.
Try base64 in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.