Skip to content

Commit 82a9aeb

Browse files
authored
Merge pull request #37916 from shannonxtreme/edit-secret-cleanup
Remove edit steps from concept page
2 parents c1dd174 + beaf3ba commit 82a9aeb

File tree

1 file changed

+12
-35
lines changed
  • content/en/docs/concepts/configuration

1 file changed

+12
-35
lines changed

content/en/docs/concepts/configuration/secret.md

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ the exact mechanisms for issuing and refreshing those session tokens.
101101

102102
There are several options to create a Secret:
103103

104-
- [create Secret using `kubectl` command](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
105-
- [create Secret from config file](/docs/tasks/configmap-secret/managing-secret-using-config-file/)
106-
- [create Secret using kustomize](/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
104+
- [Use `kubectl`](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
105+
- [Use a configuration file](/docs/tasks/configmap-secret/managing-secret-using-config-file/)
106+
- [Use the Kustomize tool](/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
107107

108108
#### Constraints on Secret names and data {#restriction-names-data}
109109

@@ -132,41 +132,18 @@ number of Secrets (or other resources) in a namespace.
132132

133133
### Editing a Secret
134134

135-
You can edit an existing Secret using kubectl:
135+
You can edit an existing Secret unless it is [immutable](#secret-immutable). To
136+
edit a Secret, use one of the following methods:
136137

137-
```shell
138-
kubectl edit secrets mysecret
139-
```
140-
141-
This opens your default editor and allows you to update the base64 encoded Secret
142-
values in the `data` field; for example:
143-
144-
```yaml
145-
# Please edit the object below. Lines beginning with a '#' will be ignored,
146-
# and an empty file will abort the edit. If an error occurs while saving this file, it will be
147-
# reopened with the relevant failures.
148-
#
149-
apiVersion: v1
150-
data:
151-
username: YWRtaW4=
152-
password: MWYyZDFlMmU2N2Rm
153-
kind: Secret
154-
metadata:
155-
annotations:
156-
kubectl.kubernetes.io/last-applied-configuration: { ... }
157-
creationTimestamp: 2020-01-22T18:41:56Z
158-
name: mysecret
159-
namespace: default
160-
resourceVersion: "164619"
161-
uid: cfee02d6-c137-11e5-8d73-42010af00002
162-
type: Opaque
163-
```
138+
* [Use `kubectl`](/docs/tasks/configmap-secret/managing-secret-using-kubectl/#edit-secret)
139+
* [Use a configuration file](/docs/tasks/configmap-secret/managing-secret-using-config-file/#edit-secret)
164140

165-
That example manifest defines a Secret with two keys in the `data` field: `username` and `password`.
166-
The values are Base64 strings in the manifest; however, when you use the Secret with a Pod
167-
then the kubelet provides the _decoded_ data to the Pod and its containers.
141+
You can also edit the data in a Secret using the [Kustomize tool](/docs/tasks/configmap-secret/managing-secret-using-kustomize/#edit-secret). However, this
142+
method creates a new `Secret` object with the edited data.
168143

169-
You can package many keys and values into one Secret, or use many Secrets, whichever is convenient.
144+
Depending on how you created the Secret, as well as how the Secret is used in
145+
your Pods, updates to existing `Secret` objects are propagated automatically to
146+
Pods that use the data. For more information, refer to [Mounted Secrets are updated automatically](#mounted-secrets-are-updated-automatically).
170147

171148
### Using a Secret
172149

0 commit comments

Comments
 (0)