File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
content/en/docs/tasks/configmap-secret Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ The output is similar to:
130
130
Now you can decode the ` password ` data:
131
131
132
132
``` shell
133
+ # This is an example for documentation purposes.
134
+ # If you did things this way, the data 'MWYyZDFlMmU2N2Rm' could be stored in
135
+ # your shell history.
136
+ # Someone with access to you computer could find that remembered command
137
+ # and base-64 decode the secret, perhaps without your knowledge.
138
+ # It's usually better to combine the steps, as shown later in the page.
133
139
echo ' MWYyZDFlMmU2N2Rm' | base64 --decode
134
140
```
135
141
@@ -139,6 +145,15 @@ The output is similar to:
139
145
1f2d1e2e67df
140
146
```
141
147
148
+ In order to avoid storing a secret encoded value in your shell history, you can
149
+ run the following command:
150
+
151
+ ``` shell
152
+ kubectl get secret db-user-pass -o jsonpath=' {.data.password}' | base64 --decode
153
+ ```
154
+
155
+ The output shall be similar as above.
156
+
142
157
## Clean Up
143
158
144
159
Delete the Secret you created:
You can’t perform that action at this time.
0 commit comments