@@ -33,7 +33,7 @@ Run the following command:
33
33
34
34
``` shell
35
35
kubectl create secret generic db-user-pass \
36
- --from-literal=username=devuser \
36
+ --from-literal=username=admin \
37
37
--from-literal=password=' S!B\*d$zDsb='
38
38
```
39
39
You must use single quotes ` '' ` to escape special characters such as ` $ ` , ` \ ` ,
@@ -87,8 +87,8 @@ kubectl get secrets
87
87
The output is similar to:
88
88
89
89
```
90
- NAME TYPE DATA AGE
91
- db-user-pass Opaque 2 51s
90
+ NAME TYPE DATA AGE
91
+ db-user-pass Opaque 2 51s
92
92
```
93
93
94
94
View the details of the Secret:
@@ -143,11 +143,13 @@ accidentally, or from being stored in a terminal log.
143
143
S! B\* d$zDsb =
144
144
```
145
145
146
- {{< caution> }}This is an example for documentation purposes. In practice,
146
+ {{< caution > }}
147
+ This is an example for documentation purposes. In practice,
147
148
this method could cause the command with the encoded data to be stored in
148
149
your shell history. Anyone with access to your computer could find the
149
150
command and decode the secret. A better approach is to combine the view and
150
- decode commands.{{< /caution> }}
151
+ decode commands.
152
+ {{< /caution > }}
151
153
152
154
` ` ` shell
153
155
kubectl get secret db-user-pass -o jsonpath=' {.data.password}' | base64 --decode
@@ -193,10 +195,8 @@ To delete a Secret, run the following command:
193
195
kubectl delete secret db-user-pass
194
196
` ` `
195
197
196
- < ! -- discussion -->
197
-
198
198
# # {{% heading "whatsnext" %}}
199
199
200
200
- Read more about the [Secret concept](/docs/concepts/configuration/secret/)
201
- - Learn how to [manage Secrets using config files ](/docs/tasks/configmap-secret/managing-secret-using-config-file/)
201
+ - Learn how to [manage Secrets using config file ](/docs/tasks/configmap-secret/managing-secret-using-config-file/)
202
202
- Learn how to [manage Secrets using kustomize](/docs/tasks/configmap-secret/managing-secret-using-kustomize/)
0 commit comments