Skip to content

Commit a1fd581

Browse files
authored
Merge pull request #36278 from yanrongshi/zh-cn-sync-control-plane-flags.md
[zh-cn]Sync control-plane-flags.md
2 parents d3f2e3c + a55aadb commit a1fd581

File tree

1 file changed

+32
-25
lines changed

1 file changed

+32
-25
lines changed

content/zh-cn/docs/setup/production-environment/tools/kubeadm/control-plane-flags.md

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ To workaround that you must use [patches](#patches).
120120
{{< /note >}}
121121

122122
<!--
123-
## APIServer flags
123+
### APIServer flags
124124
-->
125125
### APIServer 参数 {#apiserver-flags}
126126

@@ -146,7 +146,7 @@ apiServer:
146146
```
147147
148148
<!--
149-
## ControllerManager flags
149+
### ControllerManager flags
150150
-->
151151
### ControllerManager 参数 {#controllermanager-flags}
152152
@@ -221,20 +221,20 @@ etcd:
221221
election-timeout: 1000
222222
```
223223
<!--
224-
## Customizing the control plane with patches {#patches}
224+
## Customizing with patches {#patches}
225225
226226
Kubeadm allows you to pass a directory with patch files to `InitConfiguration` and `JoinConfiguration`
227-
on individual nodes. These patches can be used as the last customization step before the control
228-
plane component manifests are written to disk.
227+
on individual nodes. These patches can be used as the last customization step before component configuration
228+
is written to disk.
229229

230230
You can pass this file to `kubeadm init` with `--config <YOUR CONFIG YAML>`:
231231
-->
232-
## 使用补丁定制控制平面 {#patches}
232+
## 使用补丁定制 {#patches}
233233

234234
{{< feature-state for_k8s_version="v1.22" state="beta" >}}
235235

236236
Kubeadm 允许将包含补丁文件的目录传递给各个节点上的 `InitConfiguration` 和 `JoinConfiguration`。
237-
这些补丁可被用作控制平面组件清单写入磁盘之前的最后一个自定义步骤
237+
这些补丁可被用作组件配置写入磁盘之前的最后一个自定义步骤
238238

239239
可以使用 `--config <你的 YAML 格式控制文件>` 将配置文件传递给 `kubeadm init`:
240240

@@ -273,15 +273,16 @@ For example, `kube-apiserver0+merge.yaml` or just `etcd.json`.
273273
例如,`kube-apiserver0+merge.yaml` 或只是 `etcd.json`。
274274

275275
<!--
276-
- `target` can be one of `kube-apiserver`, `kube-controller-manager`, `kube-scheduler` and `etcd`.
276+
- `target` can be one of `kube-apiserver`, `kube-controller-manager`, `kube-scheduler`, `etcd`
277+
and `kubeletconfiguration`.
277278
- `patchtype` can be one of `strategic`, `merge` or `json` and these must match the patching formats
278279
[supported by kubectl](/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch).
279280
The default `patchtype` is `strategic`.
280281
- `extension` must be either `json` or `yaml`.
281282
- `suffix` is an optional string that can be used to determine which patches are applied first
282283
alpha-numerically.
283284
-->
284-
- `target` 可以是 `kube-apiserver`、`kube-controller-manager`、`kube-scheduler` 和 `etcd` 之一。
285+
- `target` 可以是 `kube-apiserver`、`kube-controller-manager`、`kube-scheduler`、`etcd` 和 `kubeletconfiguration` 之一。
285286
- `patchtype` 可以是 `strategy`、`merge` 或 `json` 之一,并且这些必须匹配
286287
[kubectl 支持](/zh-cn/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch) 的补丁格式。
287288
默认补丁类型是 `strategic` 的。
@@ -300,33 +301,39 @@ API structure that can be used for the same purpose.
300301
{{< /note >}}
301302

302303
<!--
303-
## Customizing the kubelet
304+
## Customizing the kubelet {#kubelet}
304305

305-
To customize the kubelet you can add a `KubeletConfiguration` next to the `ClusterConfiguration` or
306-
`InitConfiguration` separated by `---` within the same configuration file. This file can then be passed to `kubeadm init`.
306+
To customize the kubelet you can add a [`KubeletConfiguration`](/docs/reference/config-api/kubelet-config.v1beta1/)
307+
next to the `ClusterConfiguration` or `InitConfiguration` separated by `---` within the same configuration file.
308+
This file can then be passed to `kubeadm init` and kubeadm will apply the same base `KubeletConfiguration`
309+
to all nodes in the cluster.
307310
-->
308-
## 自定义 kubelet {#customizing-the-kubelet}
311+
## 自定义 kubelet {#kubelet}
309312

310313
要自定义 kubelet,你可以在同一配置文件中的 `ClusterConfiguration` 或 `InitConfiguration`
311-
之外添加一个 `KubeletConfiguration`,用 `---` 分隔。
312-
然后可以将此文件传递给 `kubeadm init`。
314+
之外添加一个 [`KubeletConfiguration`](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/),用 `---` 分隔。
315+
然后可以将此文件传递给 `kubeadm init`,kubeadm 会将相同的
316+
`KubeletConfiguration` 配置应用于集群中的所有节点。
313317

314-
{{< note >}}
315318
<!--
316-
kubeadm applies the same `KubeletConfiguration` to all nodes in the cluster. To apply node
317-
specific settings you can use kubelet flags as overrides by passing them in the `nodeRegistration.kubeletExtraArgs`
318-
field supported by both `InitConfiguration` and `JoinConfiguration`. Some kubelet flags are deprecated,
319-
so check their status in the [kubelet reference documentation](/docs/reference/command-line-tools-reference/kubelet)
320-
before using them.
319+
For applying instance-specific configuration over the base `KubeletConfiguration` you can use the
320+
[`kubeletconfiguration` patch target](#patches).
321+
322+
Alternatively, you can use kubelet flags as overrides by passing them in the
323+
`nodeRegistration.kubeletExtraArgs` field supported by both `InitConfiguration` and `JoinConfiguration`.
324+
Some kubelet flags are deprecated, so check their status in the
325+
[kubelet reference documentation](/docs/reference/command-line-tools-reference/kubelet) before using them.
321326
-->
322-
kubeadm 将相同的 `KubeletConfiguration` 配置应用于集群中的所有节点。
323-
要应用节点特定设置,你可以使用 `kubelet` 参数进行覆盖,方法是将它们传递到 `InitConfiguration` 和 `JoinConfiguration`
327+
要在基础 `KubeletConfiguration` 上应用特定节点的配置,你可以使用
328+
[`kubeletconfiguration` 补丁定制](#patches)。
329+
330+
或者你可以使用 `kubelet` 参数进行覆盖,方法是将它们传递到 `InitConfiguration` 和 `JoinConfiguration`
324331
支持的 `nodeRegistration.kubeletExtraArgs` 字段中。一些 kubelet 参数已被弃用,
325332
因此在使用这些参数之前,请在 [kubelet 参考文档](/zh-cn/docs/reference/command-line-tools-reference/kubelet) 中检查它们的状态。
326-
{{< /note >}}
333+
327334

328335
<!--
329-
For more details see [Configuring each kubelet in your cluster using kubeadm](/docs/setup/production-environment/tools/kubeadm/kubelet-integration)
336+
For additional details see [Configuring each kubelet in your cluster using kubeadm](/docs/setup/production-environment/tools/kubeadm/kubelet-integration)
330337
-->
331338
更多详情,请参阅[使用 kubeadm 配置集群中的每个 kubelet](/zh-cn/docs/setup/production-environment/tools/kubeadm/kubelet-integration)
332339

0 commit comments

Comments
 (0)