@@ -10,7 +10,7 @@ weight: 20
10
10
11
11
{{< caution >}}
12
12
<!--
13
- ConfigMap does not provide secrecy or encryption.
13
+ ConfigMap does not provide secrecy or encryption.
14
14
If the data you want to store are confidential, use a
15
15
{{< glossary_tooltip text="Secret" term_id="secret" >}} rather than a ConfigMap,
16
16
or use additional (third party) tools to keep your data private.
@@ -112,7 +112,7 @@ These different methods lend themselves to different ways of modeling
112
112
the data being consumed.
113
113
For the first three methods, the
114
114
{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} uses the data from
115
- the Secret when it launches container(s) for a Pod.
115
+ the ConfigMap when it launches container(s) for a Pod.
116
116
-->
117
117
您可以使用四种方式来使用 ConfigMap 配置 Pod 中的容器:
118
118
@@ -121,18 +121,18 @@ the Secret when it launches container(s) for a Pod.
121
121
1. 在只读卷里面添加一个文件,让应用来读取
122
122
1. 编写代码在 Pod 中运行,使用 Kubernetes API 来读取 ConfigMap
123
123
124
- 这些不同的方法适用于不同的数据使用方式。对前三个方法,{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 使用 Secret 中的数据在 Pod 中启动容器。
124
+ 这些不同的方法适用于不同的数据使用方式。对前三个方法,{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 使用 ConfigMap 中的数据在 Pod 中启动容器。
125
125
126
126
<!--
127
- The fourth method means you have to write code to read the Secret and its data.
127
+ The fourth method means you have to write code to read the ConfigMap and its data.
128
128
However, because you're using the Kubernetes API directly, your application can
129
129
subscribe to get updates whenever the ConfigMap changes, and react
130
130
when that happens. By accessing the Kubernetes API directly, this
131
131
technique also lets you access a ConfigMap in a different namespace.
132
132
133
133
Here's an example Pod that uses values from ` game-demo` to configure a Pod:
134
134
-->
135
- 第四种方法意味着你必须编写代码才能读取 Secret 和它的数据。然而,由于您是直接使用 Kubernetes API,因此只要 ConfigMap 发生更改,您的应用就能够通过订阅来获取更新,并且在这样的情况发生的时候做出反应。通过直接进入 Kubernetes API,这个技术也可以让你能够获取到不同的命名空间里的 ConfigMap。
135
+ 第四种方法意味着你必须编写代码才能读取 ConfigMap 和它的数据。然而,由于您是直接使用 Kubernetes API,因此只要 ConfigMap 发生更改,您的应用就能够通过订阅来获取更新,并且在这样的情况发生的时候做出反应。通过直接进入 Kubernetes API,这个技术也可以让你能够获取到不同的命名空间里的 ConfigMap。
136
136
137
137
这是一个 Pod 的示例,它通过使用 `game-demo` 中的值来配置一个 Pod:
138
138
0 commit comments