Skip to content

Commit 0b9899c

Browse files
committed
Add information about returned values in stringdata and a link to verify secret
1 parent 134eeb2 commit 0b9899c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

content/en/docs/tasks/configmap-secret/managing-secret-using-config-file.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ The following example stores two strings in a Secret using the `data` field.
7272
secret/mysecret created
7373
```
7474
75+
To verify that the Secret was created and to decode the Secret data, refer to
76+
[Managing Secrets using kubectl](/docs/tasks/configmap-secret/managing-secret-using-kubectl/#verify-the-secret).
77+
7578
For certain scenarios, you may wish to use the `stringData` field instead. This
7679
field allows you to put a non-base64 encoded string directly into the Secret,
7780
and the string will be encoded for you when the Secret is created or updated.
@@ -102,6 +105,8 @@ stringData:
102105
username: <user>
103106
password: <password>
104107
```
108+
When you retrieve the Secret data, the command returns the encoded values,
109+
and not the plaintext values you provided in `stringData`.
105110

106111
Create the Secret using [`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands#apply):
107112

content/en/docs/tasks/configmap-secret/managing-secret-using-kubectl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ username: 5 bytes
111111

112112
The commands `kubectl get` and `kubectl describe` avoid showing the contents
113113
of a `Secret` by default. This is to protect the `Secret` from being exposed
114-
accidentally, or from being stored in a terminal log.
114+
accidentally, or from being stored in a terminal log. To check the actual content of the encoded data, please refer to [Decoding the Secret](#decoding-secret).
115115

116116
## Decoding the Secret {#decoding-secret}
117117

0 commit comments

Comments
 (0)