Skip to content

Commit

Permalink
[zh-cn]sync architecture/_index duration cluster-autoscaling (kuberne…
Browse files Browse the repository at this point in the history
…tes#48529)

* [zh-cn]sync architecture/_index duration

Signed-off-by: xin.li <xin.li@daocloud.io>

* Update _index.md

* Update _index.md

---------

Signed-off-by: xin.li <xin.li@daocloud.io>
Co-authored-by: Qiming Teng <tengqm@outlook.com>
  • Loading branch information
my-git9 and tengqm authored Oct 28, 2024
1 parent ee23103 commit b7b75fb
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 24 deletions.
50 changes: 40 additions & 10 deletions content/zh-cn/docs/concepts/architecture/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,48 @@ usually runs multiple nodes, providing fault-tolerance and high availability.
This document outlines the various components you need to have for a complete and working Kubernetes cluster.
-->
Kubernetes 集群由一个控制平面和一组用于运行容器化应用的工作机器组成,这些工作机器称作节点(Node)。
每个集群至少需要一个工作节点来运行 Pod。
Kubernetes 集群由一个控制平面和一组用于运行容器化应用的工作机器组成,
这些工作机器称作节点(Node)。每个集群至少需要一个工作节点来运行 Pod。

工作节点托管着组成应用负载的 Pod。控制平面管理集群中的工作节点和 Pod。
在生产环境中,控制平面通常跨多台计算机运行,而一个集群通常运行多个节点,以提供容错和高可用。

本文概述了构建一个完整且可运行的 Kubernetes 集群所需的各种组件。

<!--
{{< figure src="/images/docs/kubernetes-cluster-architecture.svg" alt="The control plane (kube-apiserver, etcd, kube-controller-manager, kube-scheduler) and several nodes. Each node is running a kubelet and kube-proxy."
title="Kubernetes cluster components"
caption="**Note:** This diagram presents an example reference architecture for a Kubernetes cluster. The actual distribution of components can vary based on specific cluster setups and requirements." class="diagram-large" >}}
{{< figure src="/images/docs/kubernetes-cluster-architecture.svg"
alt="The control plane (kube-apiserver, etcd, kube-controller-manager, kube-scheduler) and several nodes. Each node is running a kubelet and kube-proxy."
caption="Figure 1. Kubernetes cluster components." class="diagram-large" >}}
-->
{{< figure src="/images/docs/kubernetes-cluster-architecture.svg" alt="控制平面(kube-apiserver、etcd、kube-controller-manager、kube-scheduler)和多个节点。每个节点运行 kubelet 和 kube-proxy。"
title="Kubernetes 集群组件"
caption="**注意:** 此图展示了 Kubernetes 集群的参考架构示例。这些组件的实际分布可能会基于特定的集群设置和要求而有所不同。" class="diagram-large" >}}
{{< figure src="/images/docs/kubernetes-cluster-architecture.svg"
alt="控制平面(kube-apiserver、etcd、kube-controller-manager、kube-scheduler)和多个节点。每个节点运行 kubelet 和 kube-proxy。"
caption="图 1. Kubernetes 集群组件。" class="diagram-large" >}}

<!--
{{ /* details summary="About this architecture" */ }}
-->
{{< details summary="关于此架构" >}}
<!--
The diagram in Figure 1 presents an example reference architecture for a Kubernetes cluster.
The actual distribution of components can vary based on specific cluster setups and requirements.
-->
图 1 中的图表展示了 Kubernetes 集群的示例参考架构,
组件的实际分布可能根据特定的集群设置和要求而有所不同。

<!--
In the diagram, each node runs the [`kube-proxy`](#kube-proxy) component. You need a
network proxy component on each node to ensure that the
{{< glossary_tooltip text="Service" term_id="service">}} API and associated behaviors
are available on your cluster network. However, some network plugins provide their own,
third party implementation of proxying. When you use that kind of network plugin,
the node does not need to run `kube-proxy`.
-->
图中每个节点都运行 [`kube-proxy`](#kube-proxy) 组件。
你需要在每个节点上安装一个网络代理组件,以确保 {{< glossary_tooltip text="Service" term_id="service">}}
API 和相关行为在你的集群网络上可用。
但是,一些网络插件为流量代理提供了自己的第三方实现。
当你使用那种网络插件时,节点便不需要运行 `kube-proxy`
{{< /details >}}

<!--
## Control plane components
Expand All @@ -50,7 +76,8 @@ as well as detecting and responding to cluster events (for example, starting up
## 控制平面组件 {#control-plane-components}

控制平面组件会为集群做出全局决策,比如资源的调度。
以及检测和响应集群事件,例如当不满足 Deployment 的 `{{< glossary_tooltip text="replicas" term_id="replica" >}}`
以及检测和响应集群事件,例如当不满足 Deployment 的
`{{< glossary_tooltip text="replicas" term_id="replica" >}}`
字段时,要启动新的 {{< glossary_tooltip text="Pod" term_id="pod">}})。

<!--
Expand Down Expand Up @@ -134,6 +161,8 @@ The following controllers can have cloud provider dependencies:
- Route 控制器:用于在底层云基础架构中设置路由
- Service 控制器:用于创建、更新和删除云平台上的负载均衡器

---

<!--
## Node components
Expand Down Expand Up @@ -332,7 +361,8 @@ balancing factors such as operational complexity, performance, and management ov
-->
### 集群管理工具 {#cluster-management-tools}

像 kubeadm、kops 和 Kubespray 这样的工具提供了不同的集群部署和管理方法,每种方法都有自己的组件布局和管理方式。
像 kubeadm、kops 和 Kubespray 这样的工具提供了不同的集群部署和管理方法,
每种方法都有自己的组件布局和管理方式。

Kubernetes 架构的灵活性使各组织能够根据特定需求调整其集群,平衡操作复杂性、性能和管理开销等因素。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ node capacity (CPU, memory, and other node resources) available in your cluster.
You can use the [Cluster Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) to manage the scale of your nodes automatically.
The cluster autoscaler can integrate with a cloud provider, or with Kubernetes'
[cluster API](https://github.com/kubernetes/autoscaler/blob/c6b754c359a8563050933a590f9a5dece823c836/cluster-autoscaler/cloudprovider/clusterapi/README.md),
[cluster API](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/README.md),
to achieve the actual node management that's needed.
-->
## 自动水平扩缩容 {#autoscaling-horizontal}
Expand All @@ -74,7 +74,7 @@ to achieve the actual node management that's needed.

你可以使用 [Cluster Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler)
自动管理节点的数目规模。Cluster Autoscaler 可以与云驱动或 Kubernetes 的
[Cluster API](https://github.com/kubernetes/autoscaler/blob/c6b754c359a8563050933a590f9a5dece823c836/cluster-autoscaler/cloudprovider/clusterapi/README.md)
[Cluster API](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/README.md)
集成,以完成实际所需的节点管理。

<!--
Expand All @@ -83,7 +83,7 @@ removes nodes when those nodes are empty.
#### Cloud provider integrations {#cluster-autoscaler-providers}
The [README](https://github.com/kubernetes/autoscaler/tree/c6b754c359a8563050933a590f9a5dece823c836/cluster-autoscaler#readme)
The [README](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/README.md)
for the cluster autoscaler lists some of the cloud provider integrations
that are available.
-->
Expand All @@ -93,8 +93,8 @@ that are available.
#### 云驱动集成组件 {#cluster-autoscaler-providers}

Cluster Autoscaler 的
[README](https://github.com/kubernetes/autoscaler/tree/c6b754c359a8563050933a590f9a5dece823c836/cluster-autoscaler#readme)
列举了一些可用的云驱动集成组件
[README](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/README.md)
中列举了一些可用的云驱动集成组件

<!--
## Cost-aware multidimensional scaling {#autoscaling-multi-dimension}
Expand Down Expand Up @@ -153,8 +153,12 @@ cloud providers:
-->
在 Karpenter 的核心与以下云驱动之间,存在可用的集成组件:

<!--
- [Amazon Web Services](https://github.com/aws/karpenter-provider-aws)
- [Azure](https://github.com/Azure/karpenter-provider-azure)
-->
- [亚马逊 Web 服务(Amazon Web Service)](https://github.com/aws/karpenter-provider-aws)
- [Azure](https://github.com/Azure/karpenter-provider-azure)

<!--
## Related components
Expand Down Expand Up @@ -189,7 +193,7 @@ and cores, and scales the number of replicas of the target workload accordingly.
#### Cluster Proportional Autoscaler

对于需要基于集群大小进行扩缩容的工作负载(例如 `cluster-dns` 或其他系统组件),
你可以使用 [Cluster Proportional Autoscaler](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler)
你可以使用 [**Cluster Proportional Autoscaler**](https://github.com/kubernetes-sigs/cluster-proportional-autoscaler)

Cluster Proportional Autoscaler 监视可调度节点和核心的数量,并相应地调整目标工作负载的副本数量。

Expand Down
36 changes: 28 additions & 8 deletions content/zh-cn/docs/reference/glossary/duration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ id: duration
date: 2024-10-05
full_link:
short_description: >
以字符串形式指定的时间间隔,格式符合 Go 语言的
[time.Duration](https://pkg.go.dev/time),
允许使用秒、分钟和小时等不同单位灵活地指定时间。
表示时间量的字符串值。
aka:
tags:
- fundamental
Expand All @@ -17,15 +15,37 @@ id: duration
date: 2024-10-05
full_link:
short_description: >
A time interval specified as a string in the format accepted by Go's [time.Duration](https://pkg.go.dev/time), allowing for flexible time specifications using various units like seconds, minutes, and hours.
A string value representing an amount of time.
aka:
tags:
- fundamental
-->

<!--
In Kubernetes APIs, a duration must be non-negative and is typically expressed with a suffix.
For example, `5s` for five seconds or `1m30s` for one minute and thirty seconds.
A string value representing an amount of time.
-->
在 Kubernetes API 中,duration 必须是非负的,通常带有后缀单位。
例如,`5s` 表示五秒,`1m30s` 表示一分三十秒。
表示时间量的字符串值。

<!--more-->

<!--
The format of a (Kubernetes) duration is based on the
[`time.Duration`](https://pkg.go.dev/time#Duration) type from the Go programming language.
-->
(Kubernetes 中)持续时间的格式基于 Go 编程语言中的 [`time.Duration`](https://pkg.go.dev/time#Duration) 类型。

<!--
In Kubernetes APIs that use durations, the value is expressed as series of a non-negative
integers combined with a time unit suffix. You can have more than one time quantity and
the duration is the sum of those time quantities.
The valid time units are "ns", "µs" (or "us"), "ms", "s", "m", and "h".
-->
在使用持续时间的 Kubernetes API 中,该值表示为一系列非负整数与时间单位后缀的组合。
你可以设置多个时间量,并且持续时间是这些时间量的总和。
有效的时间单位为 "ns"、"µs"(或 "us")、"ms"、"s"、"m" 和 "h"。

<!--
For example: `5s` represents a duration of five seconds, and `1m30s` represents a duration
of one minute and thirty seconds.
-->
例如:`5s` 代表时长为五秒,`1m30s` 代表时长为一分三十秒。

0 comments on commit b7b75fb

Please sign in to comment.