Skip to content

Commit 677bee3

Browse files
committed
[zh] Resync concepts section (10)
1 parent acf2e99 commit 677bee3

File tree

4 files changed

+81
-50
lines changed

4 files changed

+81
-50
lines changed

content/zh/docs/concepts/architecture/cloud-controller.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
2-
title: 云控制器管理器的基础概念
2+
title: 云控制器管理器
33
content_type: concept
44
weight: 40
55
---
66

77
<!--
8-
title: Concepts Underlying the Cloud Controller Manager
8+
title: Cloud Controller Manager
99
content_type: concept
1010
weight: 40
1111
-->

content/zh/docs/concepts/architecture/control-plane-node-communication.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ aliases:
1515
<!-- overview -->
1616

1717
<!--
18-
This document catalogs the communication paths between the control plane (really the apiserver) and the Kubernetes cluster. The intent is to allow users to customize their installation to harden the network configuration such that the cluster can be run on an untrusted network (or on fully public IPs on a cloud provider).
18+
This document catalogs the communication paths between the control plane (apiserver) and the Kubernetes cluster. The intent is to allow users to customize their installation to harden the network configuration such that the cluster can be run on an untrusted network (or on fully public IPs on a cloud provider).
1919
-->
2020
本文列举控制面节点(确切说是 API 服务器)和 Kubernetes 集群之间的通信路径。
2121
目的是为了让用户能够自定义他们的安装,以实现对网络配置的加固,使得集群能够在不可信的网络上
@@ -24,14 +24,15 @@ This document catalogs the communication paths between the control plane (really
2424
<!-- body -->
2525
<!--
2626
## Node to Control Plane
27-
Kubernetes has a "hub-and-spoke" API pattern. All API usage from nodes (or the pods they run) terminate at the apiserver (none of the other control plane components are designed to expose remote services). The apiserver is configured to listen for remote connections on a secure HTTPS port (typically 443) with one or more forms of client [authentication](/docs/reference/access-authn-authz/authentication/) enabled.
27+
Kubernetes has a "hub-and-spoke" API pattern. All API usage from nodes (or the pods they run) terminate at the apiserver. None of the other control plane components are designed to expose remote services. The apiserver is configured to listen for remote connections on a secure HTTPS port (typically 443) with one or more forms of client [authentication](/docs/reference/access-authn-authz/authentication/) enabled.
2828
One or more forms of [authorization](/docs/reference/access-authn-authz/authorization/) should be enabled, especially if [anonymous requests](/docs/reference/access-authn-authz/authentication/#anonymous-requests) or [service account tokens](/docs/reference/access-authn-authz/authentication/#service-account-tokens) are allowed.
2929
-->
3030
## 节点到控制面
3131

3232
Kubernetes 采用的是中心辐射型(Hub-and-Spoke)API 模式。
33-
所有从集群(或所运行的 Pods)发出的 API 调用都终止于 apiserver(其它控制面组件都没有被设计为可暴露远程服务)。
34-
apiserver 被配置为在一个安全的 HTTPS 端口(443)上监听远程连接请求,
33+
所有从集群(或所运行的 Pods)发出的 API 调用都终止于 apiserver。
34+
其它控制面组件都没有被设计为可暴露远程服务。
35+
apiserver 被配置为在一个安全的 HTTPS 端口(通常为 443)上监听远程连接请求,
3536
并启用一种或多种形式的客户端[身份认证](/zh/docs/reference/access-authn-authz/authentication/)机制。
3637
一种或多种客户端[鉴权机制](/zh/docs/reference/access-authn-authz/authorization/)应该被启用,
3738
特别是在允许使用[匿名请求](/zh/docs/reference/access-authn-authz/authentication/#anonymous-requests)
@@ -84,7 +85,7 @@ The connections from the apiserver to the kubelet are used for:
8485
* Attaching (through kubectl) to running pods.
8586
* Providing the kubelet's port-forwarding functionality.
8687
87-
These connections terminate at the kubelet's HTTPS endpoint. By default, the apiserver does not verify the kubelet's serving certificate, which makes the connection subject to man-in-the-middle attacks, and **unsafe** to run over untrusted and/or public networks.
88+
These connections terminate at the kubelet's HTTPS endpoint. By default, the apiserver does not verify the kubelet's serving certificate, which makes the connection subject to man-in-the-middle attacks and **unsafe** to run over untrusted and/or public networks.
8889
-->
8990
### API 服务器到 kubelet
9091

@@ -121,7 +122,6 @@ kubelet 之间使用 [SSH 隧道](#ssh-tunnels)。
121122
122123
The connections from the apiserver to a node, pod, or service default to plain HTTP connections and are therefore neither authenticated nor encrypted. They can be run over a secure HTTPS connection by prefixing `https:` to the node, pod, or service name in the API URL, but they will not validate the certificate provided by the HTTPS endpoint nor provide client credentials so while the connection will be encrypted, it will not provide any guarantees of integrity. These connections **are not currently safe** to run over untrusted and/or public networks.
123124
-->
124-
125125
### apiserver 到节点、Pod 和服务
126126

127127
从 apiserver 到节点、Pod 或服务的连接默认为纯 HTTP 方式,因此既没有认证,也没有加密。
@@ -153,7 +153,7 @@ Konnectivity 服务是对此通信通道的替代品。
153153
154154
{{< feature-state for_k8s_version="v1.18" state="beta" >}}
155155
156-
As a replacement to the SSH tunnels, the Konnectivity service provides TCP level proxy for the control plane to cluster communication. The Konnectivity service consists of two parts: the Konnectivity server and the Konnectivity agents, running in the control plane network and the nodes network respectively. The Konnectivity agents initiate connections to the Konnectivity server and maintain the network connections.
156+
As a replacement to the SSH tunnels, the Konnectivity service provides TCP level proxy for the control plane to cluster communication. The Konnectivity service consists of two parts: the Konnectivity server in the control plane network and the Konnectivity agents in the nodes network. The Konnectivity agents initiate connections to the Konnectivity server and maintain the network connections.
157157
After enabling the Konnectivity service, all control plane to nodes traffic goes through these connections.
158158
159159
Follow the [Konnectivity service task](/docs/tasks/extend-kubernetes/setup-konnectivity/) to set up the Konnectivity service in your cluster.

content/zh/docs/concepts/architecture/nodes.md

Lines changed: 62 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ weight: 10
1717
<!--
1818
Kubernetes runs your workload by placing containers into Pods to run on _Nodes_.
1919
A node may be a virtual or physical machine, depending on the cluster. Each node
20-
contains the services necessary to run
21-
{{< glossary_tooltip text="Pods" term_id="pod" >}}, managed by the
22-
{{< glossary_tooltip text="control plane" term_id="control-plane" >}}.
20+
is managed by the
21+
{{< glossary_tooltip text="control plane" term_id="control-plane" >}}
22+
and contains the services necessary to run
23+
{{< glossary_tooltip text="Pods" term_id="pod" >}}.
2324
2425
Typically you have several nodes in a cluster; in a learning or resource-limited
2526
environment, you might have just one.
@@ -31,8 +32,8 @@ The [components](/docs/concepts/overview/components/#node-components) on a node
3132
-->
3233
Kubernetes 通过将容器放入在节点(Node)上运行的 Pod 中来执行你的工作负载。
3334
节点可以是一个虚拟机或者物理机器,取决于所在的集群配置。
34-
每个节点包含运行 {{< glossary_tooltip text="Pods" term_id="pod" >}} 所需的服务
35-
这些 Pods 由 {{< glossary_tooltip text="控制面" term_id="control-plane" >}} 负责管理。
35+
每个节点包含运行 {{< glossary_tooltip text="Pods" term_id="pod" >}} 所需的服务
36+
这些节点由 {{< glossary_tooltip text="控制面" term_id="control-plane" >}} 负责管理。
3637

3738
通常集群中会有若干个节点;而在一个学习用或者资源受限的环境中,你的集群中也可能
3839
只有一个节点。
@@ -556,17 +557,6 @@ that the scheduler won't place Pods onto unhealthy nodes.
556557
{{< glossary_tooltip text="污点" term_id="taint" >}}。
557558
这意味着调度器不会将 Pod 调度到不健康的节点上。
558559

559-
<!--
560-
`kubectl cordon` marks a node as 'unschedulable', which has the side effect of the service
561-
controller removing the node from any LoadBalancer node target lists it was previously
562-
eligible for, effectively removing incoming load balancer traffic from the cordoned node(s).
563-
-->
564-
{{< caution>}}
565-
`kubectl cordon` 会将节点标记为“不可调度(Unschedulable)”。
566-
此操作的副作用是,服务控制器会将该节点从负载均衡器中之前的目标节点列表中移除,
567-
从而使得来自负载均衡器的网络请求不会到达被保护起来的节点。
568-
{{< /caution>}}
569-
570560
<!--
571561
### Node capacity
572562
@@ -625,31 +615,58 @@ for more information.
625615
了解详细信息。
626616

627617
<!--
628-
## Graceful Node Shutdown {#graceful-node-shutdown}
618+
## Graceful node shutdown {#graceful-node-shutdown}
629619
-->
630620
## 节点体面关闭 {#graceful-node-shutdown}
631621

632-
{{< feature-state state="alpha" for_k8s_version="v1.20" >}}
622+
{{< feature-state state="beta" for_k8s_version="v1.21" >}}
633623

634624
<!--
635-
If you have enabled the `GracefulNodeShutdown` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), then the kubelet attempts to detect the node system shutdown and terminates pods running on the node.
625+
The kubelet attempts to detect node system shutdown and terminates pods running on the node.
626+
636627
Kubelet ensures that pods follow the normal [pod termination process](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) during the node shutdown.
637628
-->
638-
如果你启用了 `GracefulNodeShutdown` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
639-
那么 kubelet 尝试检测节点的系统关闭事件并终止在节点上运行的 Pod。
629+
kubelet 会尝试检测节点系统关闭事件并终止在节点上运行的 Pods。
630+
640631
在节点终止期间,kubelet 保证 Pod 遵从常规的 [Pod 终止流程](/zh/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)
641632

642633
<!--
643-
When the `GracefulNodeShutdown` feature gate is enabled, kubelet uses [systemd inhibitor locks](https://www.freedesktop.org/wiki/Software/systemd/inhibit/) to delay the node shutdown with a given duration. During a shutdown kubelet terminates pods in two phases:
634+
The graceful node shutdown feature depends on systemd since it takes advantage of
635+
[systemd inhibitor locks](https://www.freedesktop.org/wiki/Software/systemd/inhibit/) to
636+
delay the node shutdown with a given duration.
637+
-->
638+
体面节点关闭特性依赖于 systemd,因为它要利用
639+
[systemd 抑制器锁](https://www.freedesktop.org/wiki/Software/systemd/inhibit/)
640+
在给定的期限内延迟节点关闭。
641+
642+
<!--
643+
Graceful node shutdown is controlled with the `GracefulNodeShutdown`
644+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) which is
645+
enabled by default in 1.21.
644646
-->
645-
当启用了 `GracefulNodeShutdown` 特性门控时,
646-
kubelet 使用 [systemd 抑制器锁](https://www.freedesktop.org/wiki/Software/systemd/inhibit/)
647-
在给定的期限内延迟节点关闭。在关闭过程中,kubelet 分两个阶段终止 Pod:
647+
体面节点关闭特性受 `GracefulNodeShutdown`
648+
[特性门控](/docs/reference/command-line-tools-reference/feature-gates/)
649+
控制,在 1.21 版本中是默认启用的。
650+
651+
<!--
652+
Note that by default, both configuration options described below,
653+
`ShutdownGracePeriod` and `ShutdownGracePeriodCriticalPods` are set to zero,
654+
thus not activating Graceful node shutdown functionality.
655+
To activate the feature, the two kubelet config settings should be configured appropriately and set to non-zero values.
656+
-->
657+
注意,默认情况下,下面描述的两个配置选项,`ShutdownGracePeriod`
658+
`ShutdownGracePeriodCriticalPods` 都是被设置为 0 的,因此不会激活
659+
体面节点关闭功能。
660+
要激活此功能特性,这两个 kubelet 配置选项要适当配置,并设置为非零值。
648661

649662
<!--
663+
During a graceful shutdown, kubelet terminates pods in two phases:
664+
650665
1. Terminate regular pods running on the node.
651666
2. Terminate [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical) running on the node.
652667
-->
668+
在体面关闭节点过程中,kubelet 分两个阶段来终止 Pods:
669+
653670
1. 终止在节点上运行的常规 Pod。
654671
2. 终止在节点上运行的[关键 Pod](/zh/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical)
655672

@@ -658,9 +675,11 @@ Graceful Node Shutdown feature is configured with two [`KubeletConfiguration`](/
658675
* `ShutdownGracePeriod`:
659676
* Specifies the total duration that the node should delay the shutdown by. This is the total grace period for pod termination for both regular and [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical).
660677
* `ShutdownGracePeriodCriticalPods`:
661-
* Specifies the duration used to terminate [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical) during a node shutdown. This should be less than `ShutdownGracePeriod`.
678+
* Specifies the duration used to terminate [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical) during a node shutdown. This value should be less than `ShutdownGracePeriod`.
662679
-->
663-
节点体面关闭的特性对应两个 [`KubeletConfiguration`](/zh/docs/tasks/administer-cluster/kubelet-config-file/) 选项:
680+
节点体面关闭的特性对应两个
681+
[`KubeletConfiguration`](/zh/docs/tasks/administer-cluster/kubelet-config-file/) 选项:
682+
664683
* `ShutdownGracePeriod`
665684
* 指定节点应延迟关闭的总持续时间。此时间是 Pod 体面终止的时间总和,不区分常规 Pod 还是
666685
[关键 Pod](/zh/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical)
@@ -670,10 +689,16 @@ Graceful Node Shutdown feature is configured with two [`KubeletConfiguration`](/
670689
的持续时间。该值应小于 `ShutdownGracePeriod`
671690

672691
<!--
673-
For example, if `ShutdownGracePeriod=30s`, and `ShutdownGracePeriodCriticalPods=10s`, kubelet will delay the node shutdown by 30 seconds. During the shutdown, the first 20 (30-10) seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical).
674-
-->
675-
例如,如果设置了 `ShutdownGracePeriod=30s``ShutdownGracePeriodCriticalPods=10s`,则 kubelet 将延迟 30 秒关闭节点。
676-
在关闭期间,将保留前 20(30 - 10)秒用于体面终止常规 Pod,而保留最后 10 秒用于终止
692+
For example, if `ShutdownGracePeriod=30s`, and
693+
`ShutdownGracePeriodCriticalPods=10s`, kubelet will delay the node shutdown by
694+
30 seconds. During the shutdown, the first 20 (30-10) seconds would be reserved
695+
for gracefully terminating normal pods, and the last 10 seconds would be
696+
reserved for terminating [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical).
697+
-->
698+
例如,如果设置了 `ShutdownGracePeriod=30s``ShutdownGracePeriodCriticalPods=10s`
699+
则 kubelet 将延迟 30 秒关闭节点。
700+
在关闭期间,将保留前 20(30 - 10)秒用于体面终止常规 Pod,
701+
而保留最后 10 秒用于终止
677702
[关键 Pod](/zh/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical)
678703

679704
## {{% heading "whatsnext" %}}
@@ -685,8 +710,10 @@ For example, if `ShutdownGracePeriod=30s`, and `ShutdownGracePeriodCriticalPods=
685710
section of the architecture design document.
686711
* Read about [taints and tolerations](/docs/concepts/scheduling-eviction/taint-and-toleration/).
687712
-->
688-
* 了解有关节点[组件](/zh/docs/concepts/overview/components/#node-components)
689-
* 阅读[节点的 API 定义](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#node-v1-core)
690-
* 阅读架构设计文档中有关[节点](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md#the-kubernetes-node)的章节
691-
* 了解[污点和容忍度](/zh/docs/concepts/scheduling-eviction/taint-and-toleration/)
713+
* 了解有关节点[组件](/zh/docs/concepts/overview/components/#node-components)
714+
* 阅读 [Node 的 API 定义](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#node-v1-core)。
715+
* 阅读架构设计文档中有关
716+
[节点](https://git.k8s.io/community/contributors/design-proposals/architecture/architecture.md#the-kubernetes-node)
717+
的章节。
718+
* 了解[污点和容忍度](/zh/docs/concepts/scheduling-eviction/taint-and-toleration/)
692719

content/zh/docs/concepts/overview/components.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,21 @@ The control plane's components make global decisions about the cluster (for exam
5252
-->
5353
## 控制平面组件(Control Plane Components) {#control-plane-components}
5454

55-
控制平面的组件对集群做出全局决策(比如调度),以及检测和响应集群事件(例如,当不满足部署的 `replicas` 字段时,启动新的 {{< glossary_tooltip text="pod" term_id="pod">}})。
55+
控制平面的组件对集群做出全局决策(比如调度),以及检测和响应集群事件(例如,当不满足部署的
56+
`replicas` 字段时,启动新的 {{< glossary_tooltip text="pod" term_id="pod">}})。
5657

5758
<!--
5859
Control plane components can be run on any machine in the cluster. However,
5960
for simplicity, set up scripts typically start all control plane components on
6061
the same machine, and do not run user containers on this machine. See
61-
[Building High-Availability Clusters](/docs/admin/high-availability/) for an example multi-master-VM setup.
62+
[Creating Highly Available clusters with kubeadm](/docs/setup/production-environment/tools/kubeadm/high-availability/)
63+
for an example control plane setup that runs across multiple VMs.
6264
-->
6365
控制平面组件可以在集群中的任何节点上运行。
64-
然而,为了简单起见,设置脚本通常会在同一个计算机上启动所有控制平面组件,并且不会在此计算机上运行用户容器。
65-
请参阅[构建高可用性集群](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/)
66-
中对于多主机 VM 的设置示例。
66+
然而,为了简单起见,设置脚本通常会在同一个计算机上启动所有控制平面组件,
67+
并且不会在此计算机上运行用户容器。
68+
请参阅[使用 kubeadm 构建高可用性集群](/zh/docs/setup/production-environment/tools/kubeadm/high-availability/)
69+
中关于多 VM 控制平面设置的示例。
6770

6871
### kube-apiserver
6972

@@ -203,7 +206,8 @@ Kubernetes 启动的容器自动将此 DNS 服务器包含在其 DNS 搜索列
203206
-->
204207
### Web 界面(仪表盘)
205208

206-
[Dashboard](/zh/docs/tasks/access-application-cluster/web-ui-dashboard/) 是Kubernetes 集群的通用的、基于 Web 的用户界面。
209+
[Dashboard](/zh/docs/tasks/access-application-cluster/web-ui-dashboard/)
210+
是Kubernetes 集群的通用的、基于 Web 的用户界面。
207211
它使用户可以管理集群中运行的应用程序以及集群本身并进行故障排除。
208212

209213
<!--

0 commit comments

Comments
 (0)