[zh] sync glossary entry for CRI

This commit is contained in:
windsonsea 2024-12-02 16:17:32 +08:00
parent eaa0c3a9b2
commit aea804a35b
5 changed files with 31 additions and 73 deletions

View File

@ -27,7 +27,7 @@ CRI 是一个插件接口,它使 kubelet 能够使用各种容器运行时,
这样 {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 能启动
{{< glossary_tooltip text="Pod" term_id="pod" >}} 及其容器。
{{< glossary_definition prepend="容器运行时接口CRI是" term_id="container-runtime-interface" length="all" >}}
{{< glossary_definition prepend="容器运行时接口CRI是" term_id="cri" length="all" >}}
<!-- body -->
<!--
@ -44,7 +44,7 @@ runtime, which can be configured separately within the kubelet by using the
`--image-service-endpoint` [command line flags](/docs/reference/command-line-tools-reference/kubelet).
-->
当通过 gRPC 连接到容器运行时kubelet 将充当客户端。运行时和镜像服务端点必须在容器运行时中可用,
可以使用 `--image-service-endpoint`
可以使用 `--image-service-endpoint`
[命令行标志](/zh-cn/docs/reference/command-line-tools-reference/kubelet)在 kubelet 中单独配置。
<!--

View File

@ -1,43 +0,0 @@
---
title: 容器运行时接口Container Runtime Interface
id: container-runtime-interface
date: 2021-11-24
full_link: /zh-cn/docs/concepts/architecture/cri
short_description: >
kubelet 和容器运行时之间通信的主要协议。
aka:
tags:
- cri
---
<!--
title: Container Runtime Interface
id: container-runtime-interface
date: 2021-11-24
full_link: /docs/concepts/architecture/cri
short_description: >
The main protocol for the communication between the kubelet and Container Runtime.
aka:
tags:
- cri
-->
<!--
The main protocol for the communication between the {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} and Container Runtime.
-->
{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 和容器运行时之间通信的主要协议。
<!--more-->
<!--
The Kubernetes Container Runtime Interface (CRI) defines the main
[gRPC](https://grpc.io) protocol for the communication between the
[node components](/docs/concepts/architecture/#node-components)
{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} and
{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}.
-->
Kubernetes 容器运行时接口Container Runtime InterfaceCRI定义了主要 [gRPC](https://grpc.io) 协议,
用于[节点组件](/zh-cn/docs/concepts/architecture/#node-components)
{{< glossary_tooltip text="kubelet" term_id="kubelet" >}}
和{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}之间的通信。

View File

@ -1,42 +1,43 @@
---
title: 容器运行时接口Container Runtime InterfaceCRI
id: cri
date: 2019-03-07
full_link: /zh-cn/docs/concepts/architecture/#container-runtime
date: 2021-11-24
full_link: /zh-cn/docs/concepts/architecture/cri
short_description: >
一组与 kubelet 集成的容器运行时 API
在 kubelet 和本地容器运行时之间通讯的协议
aka:
tags:
- fundamental
- fundamental
---
<!--
title: Container runtime interface (CRI)
title: Container Runtime Interface (CRI)
id: cri
date: 2019-03-07
full_link: /docs/concepts/architecture/#container-runtime
date: 2021-11-24
full_link: /docs/concepts/architecture/cri
short_description: >
An API for container runtimes to integrate with kubelet
Protocol for communication between the kubelet and the local container runtime.
aka:
tags:
- fundamental
- fundamental
-->
<!--
The container runtime interface (CRI) is an API for container runtimes
to integrate with {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} on a node.
The main protocol for the communication between the {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} and Container Runtime.
-->
容器运行时接口Container Runtime InterfaceCRI是一组让容器运行时与节点上
{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 集成的 API。
在 {{< glossary_tooltip text="kubelet" term_id="kubelet" >}} 与容器运行时之间通信的主要协议。
<!--more-->
<!--
For more information, see the [CRI](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md) API and specifications.
The Kubernetes Container Runtime Interface (CRI) defines the main
[gRPC](https://grpc.io) protocol for the communication between the
[node components](/docs/concepts/architecture/#node-components)
{{< glossary_tooltip text="kubelet" term_id="kubelet" >}} and
{{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}.
-->
更多信息,请参考[容器运行时接口CRI](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/container-runtime-interface.md)
API 与规范。
Kubernetes 容器运行时接口CRI定义了在[节点组件](/zh-cn/docs/concepts/architecture/#node-components)
{{< glossary_tooltip text="kubelet" term_id="kubelet" >}}
和{{< glossary_tooltip text="容器运行时" term_id="container-runtime" >}}之间通信的主要
[gRPC](https://grpc.io) 协议。

View File

@ -20,17 +20,17 @@ description: >-
The [kubelet](/docs/reference/command-line-tools-reference/kubelet/) collects pod and
container metrics via [cAdvisor](https://github.com/google/cadvisor). As an alpha feature,
Kubernetes lets you configure the collection of pod and container
metrics via the {{< glossary_tooltip term_id="container-runtime-interface" text="Container Runtime Interface">}} (CRI). You
metrics via the {{< glossary_tooltip term_id="cri" text="Container Runtime Interface">}} (CRI). You
must enable the `PodAndContainerStatsFromCRI` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) and
use a compatible CRI implementation (containerd >= 1.6.0, CRI-O >= 1.23.0) to
use the CRI based collection mechanism.
-->
[kubelet](/zh-cn/docs/reference/command-line-tools-reference/kubelet/) 通过
[cAdvisor](https://github.com/google/cadvisor) 收集 Pod 和容器指标。作为一个 Alpha 特性,
Kubernetes 允许你通过{{< glossary_tooltip term_id="container-runtime-interface" text="容器运行时接口">}}CRI
Kubernetes 允许你通过{{< glossary_tooltip term_id="cri" text="容器运行时接口">}}CRI
配置收集 Pod 和容器指标。要使用基于 CRI 的收集机制,你必须启用 `PodAndContainerStatsFromCRI`
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
并使用兼容的 CRI 实现containerd >= 1.6.0, CRI-O >= 1.23.0)。
并使用兼容的 CRI 实现containerd >= 1.6.0, CRI-O >= 1.23.0)。
<!-- body -->
@ -44,7 +44,7 @@ collection with cAdvisor include:
-->
## CRI Pod 和容器指标 {#cri-pod-container-metrics}
当启用 `PodAndContainerStatsFromCRI` 时,Kubelet 轮询底层容器运行时以获取
当启用 `PodAndContainerStatsFromCRI` 时,kubelet 轮询底层容器运行时以获取
Pod 和容器统计信息,而不是直接使用 cAdvisor 检查主机系统。同直接使用 cAdvisor
收集信息相比,依靠容器运行时获取这些信息的好处包括:
@ -54,14 +54,14 @@ Pod 和容器统计信息,而不是直接使用 cAdvisor 检查主机系统。
again by the kubelet.
-->
- 潜在的性能改善,如果容器运行时在正常操作中已经收集了这些信息。
在这种情况下,这些数据可以被重用,而不是由 Kubelet 再次进行聚合。
在这种情况下,这些数据可以被重用,而不是由 kubelet 再次进行聚合。
<!--
- It further decouples the kubelet and the container runtime allowing collection of metrics for
container runtimes that don't run processes directly on the host with kubelet where they are
observable by cAdvisor (for example: container runtimes that use virtualization).
-->
- 这种做法进一步解耦了 Kubelet 和容器运行时。
对于使用 Kubelet 来在主机上运行进程的容器运行时,其行为可用 cAdvisor 观测;
- 这种做法进一步解耦了 kubelet 和容器运行时。
对于使用 kubelet 来在主机上运行进程的容器运行时,其行为可用 cAdvisor 观测;
对于其他运行时(例如,使用虚拟化的容器运行时)而言,
这种做法提供了允许收集容器运行时指标的可能性。

View File

@ -69,7 +69,7 @@ By default, Kubernetes fetches node summary metrics data using an embedded
[cAdvisor](https://github.com/google/cadvisor) that runs within the kubelet. If you
enable the `PodAndContainerStatsFromCRI` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
in your cluster, and you use a container runtime that supports statistics access via
{{< glossary_tooltip term_id="container-runtime-interface" text="Container Runtime Interface">}} (CRI), then
{{< glossary_tooltip term_id="cri" text="Container Runtime Interface">}} (CRI), then
the kubelet [fetches Pod- and container-level metric data using CRI](/docs/reference/instrumentation/cri-pod-container-metrics), and not via cAdvisor.
-->
## 概要指标 API 源 {#summary-api-source}
@ -77,7 +77,7 @@ the kubelet [fetches Pod- and container-level metric data using CRI](/docs/refer
默认情况下Kubernetes 使用 kubelet 内运行的嵌入式 [cAdvisor](https://github.com/google/cadvisor)
获取节点概要指标数据。如果你在自己的集群中启用 `PodAndContainerStatsFromCRI`
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
且你通过{{< glossary_tooltip term_id="container-runtime-interface" text="容器运行时接口">}}CRI使用支持统计访问的容器运行时
且你通过{{< glossary_tooltip term_id="cri" text="容器运行时接口">}}CRI使用支持统计访问的容器运行时
则 kubelet [将使用 CRI 来获取 Pod 和容器级别的指标数据](/zh-cn/docs/reference/instrumentation/cri-pod-container-metrics)
而不是 cAdvisor 来获取。