Skip to content

Commit 3040d42

Browse files
authored
Merge pull request #38047 from windsonsea/kustom
[zh] sync managing-secret-using-kustomize.md
2 parents 61a1925 + bb7dca4 commit 3040d42

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

content/zh-cn/docs/tasks/configmap-secret/managing-secret-using-kustomize.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ secretGenerator:
9090
{{% tab name=".env 文件" %}}
9191
<!--
9292
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
9594
pulls in data from an `.env.secret` file:
9695
-->
9796
你也可以使用 `.env` 文件在 `kustomization.yaml` 中定义 `secretGenerator`。
@@ -141,8 +140,7 @@ the Secret data and appending the hash value to the name. This ensures that
141140
a new Secret is generated each time the data is modified.
142141
143142
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).
146144
-->
147145
生成 Secret 时,Secret 的名称最终是由 `name` 字段和数据的哈希值拼接而成。
148146
这将保证每次修改数据时生成一个新的 Secret。
@@ -158,11 +156,11 @@ kubectl](/docs/tasks/configmap-secret/managing-secret-using-kubectl/#verify-the-
158156
-->
159157
## 编辑 Secret {#edit-secret}
160158
161-
1. 在 `kustomization.yaml` 文件中,修改诸如 `password` 等数据。
162-
1. 应用包含 kustomization 文件的目录:
159+
1. 在 `kustomization.yaml` 文件中,修改诸如 `password` 等数据。
160+
1. 应用包含 kustomization 文件的目录:
163161
164162
```shell
165-
kubectl apply -k <directory-path>
163+
kubectl apply -k <目录路径>
166164
```
167165

168166
<!--
@@ -193,17 +191,16 @@ To delete a Secret, use `kubectl`:
193191
要删除 Secret,请使用 `kubectl`
194192

195193
```shell
196-
kubectl delete secret db-user-pass-96mffmfh4k
194+
kubectl delete secret db-user-pass
197195
```
198196

199-
<!-- Optional section; add links to information related to this topic. -->
200197
## {{% heading "whatsnext" %}}
201198

202199
<!--
203200
- 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/)
205202
- Learn how to [manage Secrets using config file](/docs/tasks/configmap-secret/managing-secret-using-config-file/)
206203
-->
207204
- 进一步阅读 [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/)
209206
- 了解如何[使用配置文件管理 Secret](/zh-cn/docs/tasks/configmap-secret/managing-secret-using-config-file/)

0 commit comments

Comments
 (0)