@@ -46,7 +46,7 @@ with the aim of sharing knowledge on Kubernetes cluster best practices.
46
46
- lock-down the kubelet API
47
47
- locking down access to the API for system components like the kube-proxy and CoreDNS
48
48
- locking down what a Bootstrap Token can access
49
- - **Easy to use **: The user should not have to run anything more than a couple of commands:
49
+ - **User-friendly **: The user should not have to run anything more than a couple of commands:
50
50
- `kubeadm init`
51
51
- `export KUBECONFIG=/etc/kubernetes/admin.conf`
52
52
- `kubectl apply -f <network-of-choice.yaml>`
@@ -63,7 +63,7 @@ with the aim of sharing knowledge on Kubernetes cluster best practices.
63
63
- 锁定 kubelet API
64
64
- 锁定对系统组件(例如 kube-proxy 和 CoreDNS)的 API 的访问
65
65
- 锁定启动引导令牌(Bootstrap Token)可以访问的内容
66
- - ** 易用的 ** :用户只需要运行几个命令即可:
66
+ - ** 用户友好 ** :用户只需要运行几个命令即可:
67
67
- ` kubeadm init `
68
68
- ` export KUBECONFIG=/etc/kubernetes/admin.conf `
69
69
- ` kubectl apply -f <所选网络.yaml> `
@@ -558,7 +558,7 @@ API 服务器的静态 Pod 清单会受到用户提供的以下参数的影响:
558
558
- `--requestheader-client-ca-file` to`front-proxy-ca.crt`
559
559
- `--proxy-client-cert-file` to `front-proxy-client.crt`
560
560
- `--proxy-client-key-file` to `front-proxy-client.key`
561
- - Other flags for securing the front proxy ([API Aggregation](https://github.com/ kubernetes/community/blob/master/contributors/design-proposals/ api-machinery/aggregated-api-servers.md )) communications:
561
+ - Other flags for securing the front proxy ([API Aggregation](/docs/concepts/extend- kubernetes/api-extension/apiserver-aggregation/ )) communications:
562
562
- `--requestheader-username-headers=X-Remote-User`
563
563
- `--requestheader-group-headers=X-Remote-Group`
564
564
- `--requestheader-extra-headers-prefix=X-Remote-Extra-`
@@ -580,7 +580,7 @@ API 服务器的静态 Pod 清单会受到用户提供的以下参数的影响:
580
580
- ` --proxy-client-key-file ` 设为 ` front-proxy-client.key `
581
581
582
582
- 其他用于保护前端代理(
583
- [ API 聚合层] ( https://github.com/kubernetes/community/blob/master/contributors/design-proposals /api-machinery/aggregated-api-servers.md ) )
583
+ [ API 聚合层] ( /zh/docs/concepts/extend-kubernetes /api-extension/apiserver-aggregation/ ) )
584
584
通信的标志:
585
585
586
586
- ` --requestheader-username-headers=X-Remote-User `
@@ -697,7 +697,7 @@ into `/var/lib/kubelet/config/init/kubelet` file.
697
697
<!--
698
698
The init configuration is used for starting the kubelet on this specific node, providing an alternative for the kubelet drop-in file;
699
699
such configuration will be replaced by the kubelet base configuration as described in following steps.
700
- See [set Kubelet parameters via a config file](/docs/tasks/administer-cluster/kubelet-config-file) for additional info .
700
+ See [set Kubelet parameters via a config file](/docs/tasks/administer-cluster/kubelet-config-file) for additional information .
701
701
-->
702
702
初始化配置用于在这个特定节点上启动 kubelet,从而为 kubelet 插件文件提供了
703
703
一种替代方法。如以下步骤中所述,这种配置将由 kubelet 基本配置所替代。
@@ -710,17 +710,24 @@ See [set Kubelet parameters via a config file](/docs/tasks/administer-cluster/ku
710
710
<!--
711
711
1. To make dynamic kubelet configuration work, flag `--dynamic-config-dir=/var/lib/kubelet/config/dynamic` should be specified
712
712
in `/etc/systemd/system/kubelet.service.d/10-kubeadm.conf`
713
- 2 . The kubelet configuration can be changed by passing a `KubeletConfiguration` object to `kubeadm init` or `kubeadm join` by using
713
+ 1 . The kubelet configuration can be changed by passing a `KubeletConfiguration` object to `kubeadm init` or `kubeadm join` by using
714
714
a configuration file `--config some-file.yaml`. The `KubeletConfiguration` object can be separated from other objects such
715
715
as `InitConfiguration` using the `---` separator. For more details have a look at the `kubeadm config print-default` command.
716
716
-->
717
717
1 . 要使动态 kubelet 配置生效,应在 ` /etc/systemd/system/kubelet.service.d/10-kubeadm.conf `
718
718
中指定 ` --dynamic-config-dir=/var/lib/kubelet/config/dynamic ` 标志。
719
- 2 . 通过使用配置文件 ` --config some-file.yaml ` 将 ` KubeletConfiguration ` 对象传递给
719
+ 1 . 通过使用配置文件 ` --config some-file.yaml ` 将 ` KubeletConfiguration ` 对象传递给
720
720
` kubeadm init ` 或 ` kubeadm join ` 来更改 kubelet 配置。
721
721
可以使用 ` --- ` 分隔符将 ` KubeletConfiguration ` 对象与其他对象(例如 ` InitConfiguration ` )
722
722
分开。更多的详细信息,请查看 ` kubeadm config print-default ` 命令。
723
723
724
+ <!--
725
+ For more details about the `KubeletConfiguration` struct, take a look at the
726
+ [`KubeletConfiguration` reference](/docs/reference/config-api/kubelet-config.v1beta1/).
727
+ -->
728
+ 有关 ` KubeletConfiguration ` 结构的详细信息,可参阅
729
+ [ ` KubeletConfiguration ` 参考文档] ( /docs/reference/config-api/kubelet-config.v1beta1/ ) 。
730
+
724
731
<!--
725
732
### Wait for the control plane to come up
726
733
-->
@@ -748,7 +755,7 @@ kubeadm 依靠 kubelet 拉取控制平面镜像并将其作为静态 Pod 正确
748
755
-->
749
756
### (可选)编写基本 kubelet 配置 {#write-base-kubelet-configuration}
750
757
751
- {{< feature-state for_k8s_version="v1.9 " state="alpha " >}}
758
+ {{< feature-state for_k8s_version="v1.11 " state="beta " >}}
752
759
753
760
<!--
754
761
If kubeadm is invoked with `--feature-gates=DynamicKubeletConfig`:
@@ -1028,24 +1035,28 @@ A ServiceAccount for `kube-proxy` is created in the `kube-system` namespace; the
1028
1035
- ` kube-proxy ` 的 ServiceAccount 绑定了 ` system:node-proxier ` ClusterRole
1029
1036
中的特权
1030
1037
1031
- #### DNS {#dns}
1038
+ #### DNS
1032
1039
1033
1040
<!--
1034
- - In Kubernetes version 1.18 kube-dns usage with kubeadm is deprecated and will be removed in a future release
1035
1041
- The CoreDNS service is named `kube-dns`. This is done to prevent any interruption
1036
- in service when the user is switching the cluster DNS from kube-dns to CoreDNS or vice-versa
1037
- the `--config` method described [here](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-addon)
1038
- - A ServiceAccount for CoreDNS/kube-dns is created in the `kube-system` namespace.
1039
- - The `kube-dns ` ServiceAccount is bound to the privileges in the `system:kube-dns ` ClusterRole
1042
+ in service when the user is switching the cluster DNS from kube-dns to CoreDNS,
1043
+ the `--config` method described [here](/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-addon)
1044
+ - A ServiceAccount for CoreDNS is created in the `kube-system` namespace.
1045
+ - The `coredns ` ServiceAccount is bound to the privileges in the `system:coredns ` ClusterRole
1040
1046
-->
1041
- - 在 Kubernetes 1.18 版本中,通过 kubeadm 部署 kube-dns 这一操作已经弃用,
1042
- 将在未来的版本中删除。
1043
1047
- CoreDNS 服务的名称为 ` kube-dns ` 。这样做是为了防止当用户将集群 DNS 从 kube-dns
1044
- 切换到 CoreDNS 或者反过来时,出现服务中断 。` --config ` 方法在
1048
+ 切换到 CoreDNS 时出现服务中断 。` --config ` 方法在
1045
1049
[ 这里] ( /zh/docs/reference/setup-tools/kubeadm/kubeadm-init-phase/#cmd-phase-addon )
1046
1050
有描述。
1047
- - 在 ` kube-system ` 名字空间中创建 CoreDNS/kube-dns 的 ServiceAccount
1048
- - ` kube-dns ` 的 ServiceAccount 绑定了 ` system:kube-dns ` ClusterRole 中的特权
1051
+ - 在 ` kube-system ` 名字空间中创建 CoreDNS 的 ServiceAccount
1052
+ - ` coredns ` 的 ServiceAccount 绑定了 ` system:coredns ` ClusterRole 中的特权
1053
+
1054
+ <!--
1055
+ In Kubernetes version 1.21, support for using `kube-dns` with kubeadm was removed.
1056
+ You can use CoreDNS with kubeadm even when the related Service is named `kube-dns`.
1057
+ -->
1058
+ 在 Kubernetes 1.21 版本中,kubeadm 对 ` kube-dns ` 的支持被移除。
1059
+ 你可以在 kubeadm 使用 CoreDNS,即使相关的 Service 名字仍然是 ` kube-dns ` 。
1049
1060
1050
1061
<!--
1051
1062
## kubeadm join phases internal design
@@ -1183,17 +1194,16 @@ when the connection with the cluster is established, kubeadm try to access the `
1183
1194
## TLS 引导 {#tls-boostrap}
1184
1195
1185
1196
<!--
1186
- Once the cluster info are known, the file `bootstrap-kubelet.conf` is written, thus allowing kubelet to do TLS Bootstrapping
1187
- (conversely until v.1.7 TLS bootstrapping were managed by kubeadm).
1197
+ Once the cluster info are known, the file `bootstrap-kubelet.conf` is written, thus allowing kubelet to do TLS Bootstrapping.
1188
1198
-->
1189
- 知道集群信息后,将写入文件 ` bootstrap-kubelet.conf ` ,从而允许 kubelet 执行
1190
- TLS 引导(相反,在 v1.7 之前 TLS 引导都是由 kubeadm 管理) 。
1199
+ 知道集群信息后,kubeadm 将写入文件 ` bootstrap-kubelet.conf ` ,从而允许 kubelet 执行
1200
+ TLS 引导。
1191
1201
1192
1202
<!--
1193
- The TLS bootstrap mechanism uses the shared token to temporarily authenticate with the Kubernetes Master to submit a certificate
1203
+ The TLS bootstrap mechanism uses the shared token to temporarily authenticate with the Kubernetes API server to submit a certificate
1194
1204
signing request (CSR) for a locally created key pair.
1195
1205
-->
1196
- TLS 引导机制使用共享令牌对 Kubernetes 主控节点进行临时身份验证 ,以便
1206
+ TLS 引导机制使用共享令牌对 Kubernetes API 服务器进行临时身份验证 ,以便
1197
1207
为本地创建的密钥对提交证书签名请求(CSR)。
1198
1208
1199
1209
<!--
@@ -1209,7 +1219,7 @@ kubelet 加入集群,同时删除 `bootstrap-kubelet.conf`。
1209
1219
<!--
1210
1220
- The temporary authentication is validated against the token saved during the `kubeadm init` process (or with additional tokens
1211
1221
created with `kubeadm token`)
1212
- - The temporary authentication resolve to a user member of `system:bootstrappers:kubeadm:default-node-token` group which was granted
1222
+ - The temporary authentication resolve to a user member of `system:bootstrappers:kubeadm:default-node-token` group which was granted
1213
1223
access to CSR api during the `kubeadm init` process
1214
1224
- The automatic CSR approval is managed by the csrapprover controller, according with configuration done the `kubeadm init` process
1215
1225
-->
@@ -1222,24 +1232,24 @@ kubelet 加入集群,同时删除 `bootstrap-kubelet.conf`。
1222
1232
<!--
1223
1233
### (optional) Write init kubelet configuration
1224
1234
-->
1225
- ### (可选)编写 init kubelet 配置 {#write-init-kubelet-configuration}
1235
+ ### (可选)写入初始的 kubelet 配置 {#write-init-kubelet-configuration}
1226
1236
1227
- {{< feature-state for_k8s_version="v1.9 " state="alpha " >}}
1237
+ {{< feature-state for_k8s_version="v1.11 " state="beta " >}}
1228
1238
1229
1239
<!--
1230
1240
If kubeadm is invoked with `--feature-gates=DynamicKubeletConfig`:
1231
1241
-->
1232
1242
如果带 ` --feature-gates=DynamicKubeletConfig ` 参数调用 kubeadm,则 kubeadm:
1233
1243
1234
1244
<!--
1235
- 1. Read the kubelet base configuration from the `kubelet-base-config-v1.9 ` ConfigMap in the `kube-system` namespace using the
1245
+ 1. Read the kubelet base configuration from the `kubelet-base-config-v1.x ` ConfigMap in the `kube-system` namespace using the
1236
1246
Bootstrap Token credentials, and write it to disk as kubelet init configuration file `/var/lib/kubelet/config/init/kubelet`
1237
1247
2. As soon as kubelet starts with the Node's own credential (`/etc/kubernetes/kubelet.conf`), update current node configuration
1238
1248
specifying that the source for the node/kubelet configuration is the above ConfigMap.
1239
1249
-->
1240
- 1 . 使用引导令牌凭证从 ` kube-system ` 名字空间中 ConfigMap ` kubelet-base-config-v1.9 `
1250
+ 1 . 使用引导令牌凭证从 ` kube-system ` 名字空间中 ConfigMap ` kubelet-base-config-v1.x `
1241
1251
中读取 kubelet 基本配置,
1242
- 并将其作为 kubelet init 配置文件 ` /var/lib/kubelet/config/init/kubelet ` 写入磁盘。
1252
+ 并将其作为 kubelet 初始配置文件 ` /var/lib/kubelet/config/init/kubelet ` 写入磁盘。
1243
1253
2 . 一旦 kubelet 开始使用节点自己的凭据(` /etc/kubernetes/kubelet.conf ` ),
1244
1254
就更新当前节点配置,指定该节点或 kubelet 配置来自上述 ConfigMap。
1245
1255
0 commit comments