@@ -90,8 +90,7 @@ secretGenerator:
90
90
{{% tab name=".env 文件" %}}
91
91
<!--
92
92
You can also define the secretGenerator in the ` kustomization.yaml` file by
93
- providing `.env` files.
94
- For example, the following `kustomization.yaml` file
93
+ providing `.env` files. For example, the following `kustomization.yaml` file
95
94
pulls in data from an `.env.secret` file :
96
95
-->
97
96
你也可以使用 `.env` 文件在 `kustomization.yaml` 中定义 `secretGenerator`。
@@ -141,8 +140,7 @@ the Secret data and appending the hash value to the name. This ensures that
141
140
a new Secret is generated each time the data is modified.
142
141
143
142
To verify that the Secret was created and to decode the Secret data, refer to
144
- [Managing Secrets using
145
- kubectl](/docs/tasks/configmap-secret/managing-secret-using-kubectl/#verify-the-secret).
143
+ [Managing Secrets using kubectl](/docs/tasks/configmap-secret/managing-secret-using-kubectl/#verify-the-secret).
146
144
-->
147
145
生成 Secret 时,Secret 的名称最终是由 `name` 字段和数据的哈希值拼接而成。
148
146
这将保证每次修改数据时生成一个新的 Secret。
@@ -158,11 +156,11 @@ kubectl](/docs/tasks/configmap-secret/managing-secret-using-kubectl/#verify-the-
158
156
-->
159
157
## 编辑 Secret {#edit-secret}
160
158
161
- 1. 在 `kustomization.yaml` 文件中,修改诸如 `password` 等数据。
162
- 1. 应用包含 kustomization 文件的目录:
159
+ 1. 在 `kustomization.yaml` 文件中,修改诸如 `password` 等数据。
160
+ 1. 应用包含 kustomization 文件的目录:
163
161
164
162
```shell
165
- kubectl apply -k <directory-path >
163
+ kubectl apply -k <目录路径 >
166
164
```
167
165
168
166
<!--
@@ -193,17 +191,16 @@ To delete a Secret, use `kubectl`:
193
191
要删除 Secret,请使用 ` kubectl ` :
194
192
195
193
``` shell
196
- kubectl delete secret db-user-pass-96mffmfh4k
194
+ kubectl delete secret db-user-pass
197
195
```
198
196
199
- <!-- Optional section; add links to information related to this topic. -->
200
197
## {{% heading "whatsnext" %}}
201
198
202
199
<!--
203
200
- Read more about the [Secret concept](/docs/concepts/configuration/secret/)
204
- - Learn how to [manage Secrets with the ` kubectl` command ](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
201
+ - Learn how to [manage Secrets using kubectl](/docs/tasks/configmap-secret/managing-secret-using-kubectl/)
205
202
- Learn how to [manage Secrets using config file](/docs/tasks/configmap-secret/managing-secret-using-config-file/)
206
203
-->
207
204
- 进一步阅读 [ Secret 概念] ( /zh-cn/docs/concepts/configuration/secret/ )
208
- - 了解如何[ 使用 ` kubectl ` 命令管理 Secret] ( /zh-cn/docs/tasks/configmap-secret/managing-secret-using-kubectl/ )
205
+ - 了解如何[ 使用 kubectl 管理 Secret] ( /zh-cn/docs/tasks/configmap-secret/managing-secret-using-kubectl/ )
209
206
- 了解如何[ 使用配置文件管理 Secret] ( /zh-cn/docs/tasks/configmap-secret/managing-secret-using-config-file/ )
0 commit comments