From cbd4d3b4a6157163fcffc83ced67d064c7b7c263 Mon Sep 17 00:00:00 2001 From: "xin.li" Date: Sat, 25 Mar 2023 22:39:01 +0800 Subject: [PATCH] [zh-cn]sync production-environment/container-runtimes.md Signed-off-by: xin.li --- .../container-runtimes.md | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/content/zh-cn/docs/setup/production-environment/container-runtimes.md b/content/zh-cn/docs/setup/production-environment/container-runtimes.md index 700cf596f2f..d6fd63dd9b6 100644 --- a/content/zh-cn/docs/setup/production-environment/container-runtimes.md +++ b/content/zh-cn/docs/setup/production-environment/container-runtimes.md @@ -301,12 +301,19 @@ Your container runtime must support at least v1alpha2 of the container runtime i Kubernetes {{< skew currentVersion >}} defaults to using v1 of the CRI API. If a container runtime does not support the v1 API, the kubelet falls back to using the (deprecated) v1alpha2 API instead. + +Kubernetes [starting v1.26](/blog/2022/11/18/upcoming-changes-in-kubernetes-1-26/#cri-api-removal) +_only works_ with v1 of the CRI API. Earlier versions default +to v1 version, however if a container runtime does not support the v1 API, the kubelet falls back to +using the (deprecated) v1alpha2 API instead. --> ## CRI 版本支持 {#cri-versions} 你的容器运行时必须至少支持 v1alpha2 版本的容器运行时接口。 -Kubernetes {{< skew currentVersion >}} 默认使用 v1 版本的 CRI API。如果容器运行时不支持 v1 版本的 API, +Kubernetes [从 1.26 版本开始](/blog/2022/11/18/upcoming-changes-in-kubernetes-1-26/#cri-api-removal)**仅适用于** +v1 版本的容器运行时(CRI)API。早期版本默认为 v1 版本, +但是如果容器运行时不支持 v1 版本的 API, 则 kubelet 会回退到使用(已弃用的)v1alpha2 版本的 API。 一旦你更新了这个配置文件,可能就同样需要重启 `containerd`:`systemctl restart containerd`。 + +请注意,声明匹配的 `pod-infra-container-image` 是 kubelet 的最佳实践。 +如果未配置,kubelet 可能会尝试对 `pause` 镜像进行垃圾回收。 +[containerd 固定 pause 镜像](https://github.com/containerd/containerd/issues/6352)的工作正在进行中, +将不再需要在 kubelet 上进行此设置。 + ### CRI-O