Skip to content

Commit 905fd26

Browse files
committed
[zh-cn] resync /tasks/administer-cluster/kubelet-config-file.md
1 parent b43d6c9 commit 905fd26

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

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

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ struct.
3636
-->
3737
## 创建配置文件
3838

39-
[`KubeletConfiguration`](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/) 结构体定义了可以通过文件配置的 Kubelet 配置子集,
39+
[`KubeletConfiguration`](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)
40+
结构体定义了可以通过文件配置的 Kubelet 配置子集,
4041

4142
<!--
4243
The configuration file must be a JSON or YAML representation of the parameters
@@ -48,21 +49,15 @@ Here is an example of what this file might look like:
4849
确保 kubelet 可以读取该文件。
4950

5051
下面是一个 Kubelet 配置文件示例:
51-
```
52-
apiVersion: v1
53-
kind: ConfigMap
54-
metadata:
55-
name: kubelet-config-1.20
56-
namespace: kube-system
57-
data:
58-
kubelet: |
59-
apiVersion: kubelet.config.k8s.io/v1beta1
60-
kind: KubeletConfiguration
61-
address: "192.168.0.8"
62-
port: 20250
63-
serializeImagePulls: false
64-
evictionHard:
65-
memory.available: "200Mi"
52+
53+
```yaml
54+
apiVersion: kubelet.config.k8s.io/v1beta1
55+
kind: KubeletConfiguration
56+
address: "192.168.0.8"
57+
port: 20250
58+
serializeImagePulls: false
59+
evictionHard:
60+
memory.available: "200Mi"
6661
```
6762
6863
<!--
@@ -71,18 +66,16 @@ and evict Pods when available memory drops below 200Mi.
7166
All other Kubelet configuration values are left at their built-in defaults, unless overridden
7267
by flags. Command line flags which target the same value as a config file will override that value.
7368
-->
74-
在这个示例中, Kubelet 被设置为在地址 192.168.0.8 端口 20250 上提供服务,以并行方式拖拽镜像
75-
当可用内存低于 200Mi 时, kubelet 将会开始驱逐 Pods
76-
没有声明的其余配置项都将使用默认值,除非使用命令行参数来重载。
69+
在这个示例中, Kubelet 被设置为在地址 192.168.0.8 端口 20250 上提供服务,以并行方式拉取镜像
70+
当可用内存低于 200Mi 时, kubelet 将会开始驱逐 Pod
71+
没有声明的其余配置项都将使用默认值,除非使用命令行参数来重载。
7772
命令行中的参数将会覆盖配置文件中的对应值。
7873
7974
<!--
8075
## Start a Kubelet process configured via the config file
8176
82-
{{< note >}}
8377
If you use kubeadm to initialize your cluster, use the kubelet-config while creating your cluster with `kubeadmin init`.
8478
See [configuring kubelet using kubeadm](/docs/setup/production-environment/tools/kubeadm/kubelet-integration/) for details.
85-
{{< /note >}}
8679

8780
Start the Kubelet with the `--config` flag set to the path of the Kubelet's config file.
8881
The Kubelet will then load its config from this file.

0 commit comments

Comments
 (0)