make layout prettier

pull/39230/head
zhuzhenghao 2023-02-02 23:19:43 +08:00
parent 3af9f76eb5
commit 3a9c75946a
1 changed files with 51 additions and 49 deletions

View File

@ -48,6 +48,7 @@ characters.
echo -n 'admin' > ./username.txt echo -n 'admin' > ./username.txt
echo -n 'S!B\*d$zDsb=' > ./password.txt echo -n 'S!B\*d$zDsb=' > ./password.txt
``` ```
The `-n` flag ensures that the generated files do not have an extra newline The `-n` flag ensures that the generated files do not have an extra newline
character at the end of the text. This is important because when `kubectl` character at the end of the text. This is important because when `kubectl`
reads a file and encodes the content into a base64 string, the extra reads a file and encodes the content into a base64 string, the extra
@ -61,6 +62,7 @@ characters.
--from-file=./username.txt \ --from-file=./username.txt \
--from-file=./password.txt --from-file=./password.txt
``` ```
The default key name is the file name. You can optionally set the key name The default key name is the file name. You can optionally set the key name
using `--from-file=[key=]source`. For example: using `--from-file=[key=]source`. For example:
@ -128,7 +130,7 @@ accidentally, or from being stored in a terminal log.
The output is similar to: The output is similar to:
```json ```json
{"password":"UyFCXCpkJHpEc2I9","username":"YWRtaW4="} { "password": "UyFCXCpkJHpEc2I9", "username": "YWRtaW4=" }
``` ```
1. Decode the `password` data: 1. Decode the `password` data: