Skip to content

Commit 330f17c

Browse files
authored
Merge pull request #37195 from my-git9/zhsync8
[zh-cn]sync kubelet-config-file configure-service-account
2 parents 0088ea5 + 09f6f54 commit 330f17c

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

content/zh-cn/docs/tasks/administer-cluster/kubelet-config-file.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,28 @@ evictionHard:
6262
6363
<!--
6464
In the example, the Kubelet is configured to serve on IP address 192.168.0.8 and port 20250, pull images in parallel,
65-
and evict Pods when available memory drops below 200Mi.
65+
and evict Pods when available memory drops below 200Mi. Since only one of the four evictionHard thresholds is configured,
66+
other evictionHard thresholds are reset to 0 from their built-in defaults.
6667
All other Kubelet configuration values are left at their built-in defaults, unless overridden
6768
by flags. Command line flags which target the same value as a config file will override that value.
6869
-->
6970
在这个示例中, Kubelet 被设置为在地址 192.168.0.8 端口 20250 上提供服务,以并行方式拉取镜像,
7071
当可用内存低于 200Mi 时, kubelet 将会开始驱逐 Pod。
72+
由于仅配置了四个 evictionHard 阈值之一,因此其他 evictionHard 阈值被重置为 0,而不是使用其内置默认值。
7173
没有声明的其余配置项都将使用默认值,除非使用命令行参数来重载。
7274
命令行中的参数将会覆盖配置文件中的对应值。
7375
76+
{{< note >}}
77+
<!--
78+
In the example, by changing the default value of only one parameter for
79+
evictionHard, the default values of other parameters will not be inherited and
80+
will be set to zero. In order to provide custom values, you should provide all
81+
the threshold values respectively.
82+
-->
83+
在示例中,通过只更改 evictionHard 的一个参数的默认值,
84+
其他参数的默认值将不会被继承,他们会被设置为零。如果要提供自定义值,你应该分别设置所有阈值。
85+
{{< /note >}}
86+
7487
<!--
7588
## Start a Kubelet process configured via the config file
7689

content/zh-cn/docs/tasks/configure-pod-container/configure-service-account.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,25 @@ field of a pod to the name of the service account you wish to use.
194194
The service account has to exist at the time the pod is created, or it will be rejected.
195195

196196
You cannot update the service account of an already created pod.
197-
198-
You can clean up the service account from this example like this:
199197
-->
200198
Pod 被创建时服务账号必须存在,否则会被拒绝。
201199

202200
你不能更新已经创建好的 Pod 的服务账号。
203201

202+
{{< note >}}
203+
<!--
204+
The `spec.serviceAccount` field is a deprecated alias for `spec.serviceAccountName`.
205+
If you want to remove the fields from a workload resource, set both fields to empty explicitly
206+
on the [pod template](/docs/concepts/workloads/pods#pod-templates).
207+
-->
208+
`spec.serviceAccount` 字段是 `spec.serviceAccountName` 的已弃用别名。
209+
如果要从工作负载资源中删除这些字段,请在
210+
[Pod 模板](/zh-cn/docs/concepts/workloads/pods#pod-templates)上将这两个字段显式设置为空。
211+
{{< /note >}}
212+
213+
<!--
214+
You can clean up the service account from this example like this:
215+
-->
204216
你可以清除服务账号,如下所示:
205217

206218
```shell

0 commit comments

Comments
 (0)