Skip to content

Commit b375acc

Browse files
committed
[zh-cn]sync endpoint-slice endpoint node-metrics
Signed-off-by: xin.li <[email protected]>
1 parent 3afa6a4 commit b375acc

File tree

4 files changed

+80
-28
lines changed

4 files changed

+80
-28
lines changed

content/zh-cn/docs/reference/glossary/endpoint-slice.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ id: endpoint-slice
44
date: 2018-04-12
55
full_link: /zh-cn/docs/concepts/services-networking/endpoint-slices/
66
short_description: >
7-
一种将网络端点与 Kubernetes 资源组合在一起的方法
7+
EndpointSlices 跟踪具有匹配 Service 选择算符的 Pod 的 IP 地址
88
99
aka:
1010
tags:
@@ -16,25 +16,23 @@ id: endpoint-slice
1616
date: 2018-04-12
1717
full_link: /docs/concepts/services-networking/endpoint-slices/
1818
short_description: >
19-
A way to group network endpoints together with Kubernetes resources.
19+
EndpointSlices track the IP addresses of Pods with matching Service selectors.
2020
2121
aka:
2222
tags:
2323
- networking
2424
-->
2525

2626
<!--
27-
A way to group network endpoints together with Kubernetes resources.
27+
EndpointSlices track the IP addresses of Pods with matching {{< glossary_tooltip text="selectors" term_id="selector" >}}.
2828
-->
29-
一种将网络端点与 Kubernetes 资源组合在一起的方法。
29+
EndpointSlices 跟踪具有匹配{{< glossary_tooltip text="选择算符" term_id="selector" >}}的
30+
Pod 的 IP 地址。
3031

3132
<!--more-->
3233

3334
<!--
34-
A scalable and extensible way to group network endpoints together. These can be
35-
used by {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}} to
36-
establish network routes on each {{< glossary_tooltip text="node" term_id="node" >}}.
35+
EndpointSlices can be configured manually for {{< glossary_tooltip text="Services" term_id="service" >}} without selectors specified.
3736
-->
38-
一种将网络端点组合在一起的可扩缩、可扩展方式。
39-
它们将被 {{< glossary_tooltip text="kube-proxy" term_id="kube-proxy" >}} 用于在
40-
每个 {{< glossary_tooltip text="节点" term_id="node">}} 上建立网络路由。
37+
EndpointSlices 可以手动配置给没有指定选择算符的
38+
{{< glossary_tooltip text="Service" term_id="service" >}}。

content/zh-cn/docs/reference/glossary/endpoint.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ id: endpoints
44
date: 2020-04-23
55
full_link:
66
short_description: >
7-
端点负责记录与服务(Service)的选择器相匹配的 Pod 的 IP 地址
7+
Service 的一个端点是实现该服务的 Pod 之一(或外部服务器)
88
99
aka:
1010
tags:
@@ -16,26 +16,35 @@ id: endpoints
1616
date: 2020-04-23
1717
full_link:
1818
short_description: >
19-
Endpoints track the IP addresses of Pods with matching Service selectors.
19+
An endpoint of a Service is one of the Pods (or external servers) that implements the Service.
2020
2121
aka:
2222
tags:
2323
- networking
2424
-->
2525

2626
<!--
27-
Endpoints track the IP addresses of Pods with matching {{< glossary_tooltip text="selectors" term_id="selector" >}}.
27+
An endpoint of a {{< glossary_tooltip text="Service" term_id="service" >}} is one of the {{< glossary_tooltip text="Pods" term_id="pod" >}} (or external servers) that implements the Service.
2828
-->
29-
端点负责记录与服务的{{< glossary_tooltip text="选择器" term_id="selector" >}}相匹配的 Pod 的 IP 地址。
29+
一个 {{< glossary_tooltip text="Service" term_id="service" >}}
30+
的端点是实现该 Service 的 {{< glossary_tooltip text="Pod 之一" term_id="pod" >}}
31+
(或外部服务器)。
3032

3133
<!--more-->
3234

3335
<!--
34-
Endpoints can be configured manually for {{< glossary_tooltip text="Services" term_id="service" >}} without selectors specified.
36+
For Services with {{< glossary_tooltip text="selectors" term_id="selector" >}},
37+
the EndpointSlice controller will automatically create one or more {{<
38+
glossary_tooltip text="EndpointSlices" term_id="endpoint-slice" >}} giving the
39+
IP addresses of the selected endpoint Pods.
3540
-->
36-
端点可以手动配置到{{< glossary_tooltip text="服务(Service)" term_id="service" >}}上,而不必指定选择器标识。
41+
对于带有{{< glossary_tooltip text="选择器" term_id="selector" >}}的 Service,
42+
EndpointSlice 控制器将自动创建一个或多个
43+
{{< glossary_tooltip text="EndpointSlices" term_id="endpoint-slice" >}},
44+
提供选定端点 Pod 的 IP 地址。
3745

3846
<!--
39-
The {{< glossary_tooltip text="EndpointSlice" term_id="endpoint-slice" >}} resource provides a scalable and extensible alternative to Endpoints.
47+
EndpointSlices can also be created manually to indicate the endpoints of
48+
Services that have no selector specified.
4049
-->
41-
{{< glossary_tooltip text="EndpointSlice" term_id="endpoint-slice" >}} 提供了一种可伸缩、可扩展的替代方案
50+
EndpointSlices 也可以手动创建,以指示没有指定选择器的服务的端点

content/zh-cn/docs/reference/instrumentation/node-metrics.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ description: >-
1818
The [kubelet](/docs/reference/command-line-tools-reference/kubelet/)
1919
gathers metric statistics at the node, volume, pod and container level,
2020
and emits this information in the
21-
[Summary API](https://github.com/kubernetes/kubernetes/blob/7d309e0104fedb57280b261e5677d919cb2a0e2d/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go).
21+
[Summary API](/docs/reference/config-api/kubelet-stats.v1alpha1/).
2222
-->
2323
[kubelet](/zh-cn/docs/reference/command-line-tools-reference/kubelet/)
24-
在节点、卷、Pod 和容器级别收集统计信息,并在
25-
[概要 API](https://github.com/kubernetes/kubernetes/blob/7d309e0104fedb57280b261e5677d919cb2a0e2d/staging/src/k8s.io/kubelet/pkg/apis/stats/v1alpha1/types.go)
24+
在节点、卷、Pod 和容器级别收集统计信息,
25+
并在[概要 API](zh-cn/docs/reference/config-api/kubelet-stats.v1alpha1/)
2626
中输出这些信息。
2727

2828
<!--
@@ -42,8 +42,11 @@ kubectl get --raw "/api/v1/nodes/minikube/proxy/stats/summary"
4242
<!--
4343
Here is the same API call using `curl`:
4444
45+
```shell
4546
# You need to run "kubectl proxy" first
4647
# Change 8080 to the port that "kubectl proxy" assigns
48+
curl http://localhost:8080/api/v1/nodes/minikube/proxy/stats/summary
49+
```
4750
-->
4851
下面是使用 `curl` 所执行的相同 API 调用:
4952

@@ -58,8 +61,8 @@ curl http://localhost:8080/api/v1/nodes/minikube/proxy/stats/summary
5861
Beginning with `metrics-server` 0.6.x, `metrics-server` queries the `/metrics/resource`
5962
kubelet endpoint, and not `/stats/summary`.
6063
-->
61-
`metrics-server` 0.6.x 开始,`metrics-server` 查询 `/metrics/resource` kubelet 端点,
62-
不查询 `/stats/summary`
64+
`metrics-server` 0.6.x 开始,`metrics-server` 查询 `/metrics/resource`
65+
kubelet 端点,不查询 `/stats/summary`
6366
{{< /note >}}
6467

6568
<!--
@@ -81,6 +84,46 @@ the kubelet [fetches Pod- and container-level metric data using CRI](/docs/refer
8184
则 kubelet [将使用 CRI 来获取 Pod 和容器级别的指标数据](/zh-cn/docs/reference/instrumentation/cri-pod-container-metrics)
8285
而不是 cAdvisor 来获取。
8386

87+
<!--
88+
## Pressure Stall Information (PSI) {#psi}
89+
-->
90+
## 压力停滞信息(PSI)
91+
92+
{{< feature-state for_k8s_version="v1.33" state="alpha" >}}
93+
94+
<!--
95+
As an alpha feature, Kubernetes lets you configure kubelet to collect Linux kernel
96+
[Pressure Stall Information](https://docs.kernel.org/accounting/psi.html)
97+
(PSI) for CPU, memory and IO usage. The information is collected at node, pod and container level.
98+
See [Summary API](/docs/reference/config-api/kubelet-stats.v1alpha1/) for detailed schema.
99+
You must enable the `KubeletPSI` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
100+
to use this feature. The information is also exposed in
101+
[Prometheus metrics](/docs/concepts/cluster-administration/system-metrics#psi-metrics).
102+
-->
103+
作为 Alpha 级别特性,Kubernetes 允许你配置 kubelet 来收集 Linux
104+
内核的[压力停滞信息](https://docs.kernel.org/accounting/psi.html)(PSI)
105+
的 CPU、内存和 IO 使用情况。这些信息是在节点、Pod 和容器级别上收集的。
106+
详细模式请参见 [Summary API](/zh-cn/docs/reference/config-api/kubelet-stats.v1alpha1/)
107+
你必须启用 `KubeletPSI`
108+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)才能使用此特性。
109+
这些信息也在
110+
[Prometheus 指标](/zh-cn/docs/concepts/cluster-administration/system-metrics#psi-metrics)中暴露。
111+
112+
<!--
113+
### Requirements
114+
115+
Pressure Stall Information requires:
116+
117+
- [Linux kernel versions 4.20 or later](/docs/reference/node/kernel-version-requirements#requirements-psi).
118+
- [cgroup v2](/docs/concepts/architecture/cgroups)
119+
-->
120+
### 要求
121+
122+
压力停滞信息要求:
123+
124+
- [Linux 内核版本 4.20 或更新](/zh-cn/docs/reference/node/kernel-version-requirements#requirements-psi)
125+
- [CGroup v2](/zh-cn/docs/concepts/architecture/cgroups)
126+
84127
## {{% heading "whatsnext" %}}
85128

86129
<!--

content/zh-cn/docs/reference/kubectl/conventions.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,20 @@ For a stable output in a script:
4646
## 子资源 {#subresources}
4747

4848
<!--
49-
* You can use the `--subresource` beta flag for kubectl commands like `get`, `patch`,
50-
`edit` and `replace` to fetch and update subresources for all resources that
51-
support them. Currently, only the `status` and `scale` subresources are supported.
49+
* You can use the `--subresource` argument for kubectl subcommands such as `get`, `patch`,
50+
`edit`, `apply` and `replace` to fetch and update subresources for all resources that
51+
support them. In Kubernetes version {{< skew currentVersion >}}, only the `status`, `scale`
52+
and `resize` subresources are supported.
5253
* For `kubectl edit`, the `scale` subresource is not supported. If you use `--subresource` with
5354
`kubectl edit` and specify `scale` as the subresource, the command will error out.
5455
* The API contract against a subresource is identical to a full resource. While updating the
5556
`status` subresource to a new value, keep in mind that the subresource could be potentially
5657
reconciled by a controller to a different value.
5758
-->
5859

59-
* 你可以将 `--subresource` Beta 标志用于 kubectl 命令,例如 `get``patch``edit``replace`
60-
来获取和更新所有支持子资源的资源的子资源。目前,仅支持 `status``scale` 子资源。
60+
* 你可以将 `--subresource` 参数用于 kubectl 命令,例如 `get``patch``edit``apply``replace`
61+
来获取和更新所有支持子资源的资源的子资源。Kubernetes {{< skew currentVersion >}} 版本中,
62+
仅支持 `status`, `scale``resize` 子资源。
6163
* 对于 `kubectl edit`,不支持 `scale` 子资源。如果将 `--subresource``kubectl edit` 一起使用,
6264
并指定 `scale` 作为子资源,则命令将会报错。
6365
* 针对子资源的 API 协定与完整资源相同。在更新 `status` 子资源为一个新值时,请记住,

0 commit comments

Comments
 (0)