File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
content/zh/docs/tasks/configmap-secret Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,10 @@ Now you can decode the `password` data:
184
184
现在你可以解码 ` password ` 的数据:
185
185
186
186
``` shell
187
+ # 这是一个用于文档说明的示例。
188
+ # 如果你这样做,数据 'MWYyZDFlMmU2N2Rm' 可以存储在你的 shell 历史中。
189
+ # 可以进入你电脑的人可以找到那个记住的命令并可以在你不知情的情况下 base-64 解码这个 Secret。
190
+ # 通常最好将这些步骤结合起来,如页面后面所示。
187
191
echo ' MWYyZDFlMmU2N2Rm' | base64 --decode
188
192
```
189
193
@@ -194,6 +198,21 @@ echo 'MWYyZDFlMmU2N2Rm' | base64 --decode
194
198
1f2d1e2e67df
195
199
```
196
200
201
+ <!--
202
+ In order to avoid storing a secret encoded value in your shell history, you can
203
+ run the following command:
204
+ -->
205
+ 为了避免在 shell 历史记录中存储 Secret 的编码值,可以执行如下命令:
206
+
207
+ ``` shell
208
+ kubectl get secret db-user-pass -o jsonpath=' {.data.password}' | base64 --decode
209
+ ```
210
+
211
+ <!--
212
+ The output shall be similar as above.
213
+ -->
214
+ 输出应与上述类似。
215
+
197
216
<!-- ## Clean Up -->
198
217
## 清理 {#clean-up}
199
218
You can’t perform that action at this time.
0 commit comments