<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Kubernetes Blog</title>
    <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/</link>
    <description>The Kubernetes blog is used by the project to communicate new features, community reports, and any news that might be relevant to the Kubernetes community.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-cn</language>
    <image>
      <url>https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.png</url>
      <title>The Kubernetes project logo</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/</link>
    </image>
    
    <atom:link href="https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/feed.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>从 Kubernetes Dashboard 到 Headlamp：理解过渡</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/</link>
      <pubDate>Mon, 01 Jun 2026 10:00:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/</guid>
      <description>
        
        
        &lt;!--
title: &#34;From Kubernetes Dashboard to Headlamp: Understanding the Transition&#34;
date: 2026-06-01T10:00:00-08:00
layout: blog
slug: dashboard-to-headlamp
author: &#34;Will Case (Headlamp)&#34;
---
--&gt;
&lt;!--
For many people, Kubernetes Dashboard was their first window into Kubernetes. It offered a simple visual way to see what was running in a cluster, inspect resources, and build confidence without relying on the command line. For years, it helped developers, students, and operators make sense of Kubernetes, and it served as an important onramp into the ecosystem.
--&gt;
&lt;p&gt;对许多人来说，Kubernetes Dashboard 是他们了解 Kubernetes 的第一个窗口。
它提供了一种简单的可视化方式来查看集群中运行的内容、检查资源，并在不依赖命令行的情况下建立信心。
多年来，它帮助开发者、学生和运维人员理解 Kubernetes，并作为进入生态系统的重要入口。&lt;/p&gt;
&lt;!--
The Kubernetes Dashboard project has now been archived. We deeply respect the work the team did and the role Dashboard played in making Kubernetes more approachable for so many users.
--&gt;
&lt;p&gt;Kubernetes Dashboard 项目现已归档。
我们深深尊重该团队所做的工作，以及 Dashboard 在让如此多用户更容易接触 Kubernetes 方面所发挥的作用。&lt;/p&gt;
&lt;!--
Headlamp builds on that foundation and carries it forward. It keeps the clarity of a visual interface while adding capabilities that match how Kubernetes is used today. This includes multi-cluster visibility, application-centric views, extensibility through plugins, and flexible deployment options that work both in-cluster and on the desktop.
--&gt;
&lt;p&gt;Headlamp 在此基础上构建并向前发展。
它保持了可视化界面的清晰性，同时添加了与当今 Kubernetes 使用方式相匹配的功能。
这包括多集群可见性、以应用为中心的视图、通过插件实现的可扩展性，以及在集群内和桌面上都能工作的灵活部署选项。&lt;/p&gt;
&lt;!--
This guide is meant to help you navigate that transition with confidence. Before diving into the mechanics of migration, we start with familiar ground by looking at how common Kubernetes Dashboard workflows map to Headlamp. We also cover what stays the same and what improves after the switch. The goal is not just to replace a tool, but to honor a user-centered legacy and help you land in a UI that can grow with you as your Kubernetes usage evolves.
--&gt;
&lt;p&gt;本指南旨在帮助你自信地完成这一过渡。
在深入探讨迁移机制之前，我们从熟悉的内容开始，
看看常见的 Kubernetes Dashboard 工作流程如何映射到 Headlamp。
我们还将介绍切换后保持不变的内容和改进的内容。
我们的目标不仅是替换工具，更是为了尊重以用户为中心的传统，
并帮助你找到一个能够随着 Kubernetes 使用方式演变而成长的 UI。&lt;/p&gt;
&lt;!--
## Mapping Kubernetes Dashboard workloads to Headlamp
--&gt;
&lt;h2 id=&#34;kubernetes-dashboard-工作负载映射到-headlamp&#34;&gt;Kubernetes Dashboard 工作负载映射到 Headlamp&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kubernetes-dashboard-%e5%b7%a5%e4%bd%9c%e8%b4%9f%e8%bd%bd%e6%98%a0%e5%b0%84%e5%88%b0-headlamp&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you have used Kubernetes Dashboard before, many workflows in Headlamp will feel familiar. Headlamp does not introduce a new way of thinking. Instead, it builds on workloads users already know and extends them in practical ways. The focus is continuity. What worked before still works, with more room to grow.
--&gt;
&lt;p&gt;如果你以前使用过 Kubernetes Dashboard，Headlamp 中的许多工作流程会让你感到熟悉。
Headlamp 并没有引入新的思维方式。
相反，它建立在用户已经熟悉的工作负载之上，并以实用的方式扩展它们。
重点是连续性。以前有效的方法仍然有效，同时有更多的发展空间。&lt;/p&gt;
&lt;!--
### Viewing workloads and resources
--&gt;
&lt;h3 id=&#34;查看工作负载和资源&#34;&gt;查看工作负载和资源&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%9f%a5%e7%9c%8b%e5%b7%a5%e4%bd%9c%e8%b4%9f%e8%bd%bd%e5%92%8c%e8%b5%84%e6%ba%90&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes Dashboard, most users started by browsing workloads like pods, deployments, services, and namespaces. Headlamp keeps this same starting point. Workloads are easy to find and inspect, and moving between namespaces and clusters is simpler. Resources are still organized in familiar ways, and navigation feels smoother, especially when you work across multiple environments.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/view-workloads-resources-2.png&#34;
         alt=&#34;Viewing Kubernetes workloads and resources in the Headlamp interface&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;在 Kubernetes Dashboard 中，大多数用户从浏览工作负载（如 Pod、Deployment、Service 和 Namespace）开始。
Headlamp 保持这个相同的起点。工作负载易于查找和检查，在命名空间和集群之间切换更加简单。
资源仍然以熟悉的方式组织，导航感觉更流畅，尤其是在跨多个环境工作时。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/view-workloads-resources-2.png&#34;
         alt=&#34;在 Headlamp 界面中查看 Kubernetes 工作负载和资源&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
### Editing and interacting with resources
--&gt;
&lt;h3 id=&#34;编辑和与资源交互&#34;&gt;编辑和与资源交互&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%bc%96%e8%be%91%e5%92%8c%e4%b8%8e%e8%b5%84%e6%ba%90%e4%ba%a4%e4%ba%92&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Like Kubernetes Dashboard, Headlamp lets you view and edit manifests directly in the UI based on your permissions. You can delete resources, scale workloads, or update configurations from the interface. All actions follow standard Kubernetes RBAC. If you could perform an action in Dashboard, you will find the same capability in Headlamp, with the same respect for access controls.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/editing-interacting-resources.png&#34;
         alt=&#34;Editing and interacting with Kubernetes resources in the Headlamp user interface&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;与 Kubernetes Dashboard 一样，Headlamp 允许你根据权限直接在 UI 中查看和编辑清单。
你可以从界面删除资源、缩放工作负载或更新配置。所有操作都遵循标准的 Kubernetes RBAC。
如果你能在 Dashboard 中执行某个操作，你将在 Headlamp 中找到相同的功能，并且同样尊重访问控制。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/editing-interacting-resources.png&#34;
         alt=&#34;在 Headlamp 用户界面中编辑和与 Kubernetes 资源交互&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
### Understanding relationships
--&gt;
&lt;h3 id=&#34;理解关系&#34;&gt;理解关系&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%90%86%e8%a7%a3%e5%85%b3%e7%b3%bb&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Where Headlamp begins to expand the experience is in how it presents relationships between resources. In addition to list views, Headlamp offers visual ways to see how workloads, services, and configurations connect. This helps provide context without changing the underlying workloads users already rely on.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/understanding-relationships.png&#34;
         alt=&#34;Visualizing relationships between Kubernetes workloads and services in Headlamp&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;Headlamp 开始扩展体验的地方在于它呈现资源之间关系的方式。
除了列表视图，Headlamp 还提供了可视化方式来查看工作负载、服务和配置之间的连接。
这有助于在不改变用户已经依赖的底层工作负载的情况下提供上下文。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/understanding-relationships.png&#34;
         alt=&#34;在 Headlamp 中可视化 Kubernetes 工作负载和服务之间的关系&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
At a high level, the tasks you performed in Kubernetes Dashboard are still there. Headlamp keeps familiar workflows while making it easier to scale as clusters, teams, and applications grow.
--&gt;
&lt;p&gt;从高层次来看，你在 Kubernetes Dashboard 中执行的任务仍然存在。
Headlamp 保留了熟悉的工作流程，同时随着集群、团队和应用的增长，使其更容易扩展。&lt;/p&gt;
&lt;!--
## Where Headlamp goes beyond Kubernetes Dashboard
--&gt;
&lt;h2 id=&#34;headlamp-超越-kubernetes-dashboard-的地方&#34;&gt;Headlamp 超越 Kubernetes Dashboard 的地方&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#headlamp-%e8%b6%85%e8%b6%8a-kubernetes-dashboard-%e7%9a%84%e5%9c%b0%e6%96%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Expanding from single cluster to multi-cluster workflows
--&gt;
&lt;h3 id=&#34;从单集群扩展到多集群工作流程&#34;&gt;从单集群扩展到多集群工作流程&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bb%8e%e5%8d%95%e9%9b%86%e7%be%a4%e6%89%a9%e5%b1%95%e5%88%b0%e5%a4%9a%e9%9b%86%e7%be%a4%e5%b7%a5%e4%bd%9c%e6%b5%81%e7%a8%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes Dashboard was designed to work with one cluster at a time. That model worked well for simple setups, but it became limiting as teams adopted multiple environments. Headlamp expands this view by letting you work with multiple clusters from a single interface without switching tools or losing context. This makes it easier to manage development, staging, and production environments side by side.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/expanding-multicluster.png&#34;
         alt=&#34;Expanding from single cluster to multi-cluster workflows using Headlamp&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;Kubernetes Dashboard 设计为一次只处理一个集群。
这种模式在简单设置中效果很好，但随着团队采用多个环境，它变得有限制。
Headlamp 通过允许你从单个界面处理多个集群而无需切换工具或丢失上下文，扩展了这个视图。
这使得并排管理开发、暂存和生产环境变得更容易。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/expanding-multicluster.png&#34;
         alt=&#34;使用 Headlamp 从单集群扩展到多集群工作流程&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
For teams running Kubernetes in more than one place, this shift reduces friction. You can stay oriented and move between clusters with confidence.
--&gt;
&lt;p&gt;对于在多个地方运行 Kubernetes 的团队来说，这种转变减少了摩擦。
你可以保持方向感，并自信地在集群之间移动。&lt;/p&gt;
&lt;!--
### From resource lists to application context with Projects
--&gt;
&lt;h3 id=&#34;通过-projects-从资源列表到应用上下文&#34;&gt;通过 Projects 从资源列表到应用上下文&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%80%9a%e8%bf%87-projects-%e4%bb%8e%e8%b5%84%e6%ba%90%e5%88%97%e8%a1%a8%e5%88%b0%e5%ba%94%e7%94%a8%e4%b8%8a%e4%b8%8b%e6%96%87&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Projects give you an application-centered way to view Kubernetes. Instead of jumping between lists, you can group related workloads, services, and supporting resources in one place. This makes applications easier to understand. You can see what belongs together, track changes in context, and troubleshoot without scanning the cluster piece by piece.
--&gt;
&lt;p&gt;Projects 为你提供了一种以应用为中心的方式来查看 Kubernetes。
你可以将相关的工作负载、服务和支持资源分组到一个地方，而不是在列表之间跳转。这使应用更容易理解。
你可以看到哪些资源属于一起，在上下文中跟踪更改，并在不逐个扫描集群的情况下进行故障排除。&lt;/p&gt;
&lt;!--
Projects are built on native Kubernetes concepts. Namespaces, labels, and RBAC continue to work the same way they always have. Headlamp adds a visual layer that brings related resources together.
--&gt;
&lt;p&gt;Projects 建立在原生 Kubernetes 概念之上。
Namespaces、labels 和 RBAC 继续以它们一贯的方式工作。
Headlamp 添加了一个视觉层，将相关资源聚集在一起。&lt;/p&gt;
&lt;!--
Projects are optional. You can still work at the individual resource level when that fits your task. When you need more context, Projects help you step back and see the bigger picture.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/application-projects.png&#34;
         alt=&#34;Application Projects view in Headlamp grouping related Kubernetes resources&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;Projects 是可选的。当适合你的任务时，你仍然可以在单个资源级别工作。
当你需要更多上下文时，Projects 帮助你退一步看到更大的图景。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/application-projects.png&#34;
         alt=&#34;Headlamp 中的应用 Projects 视图，将相关的 Kubernetes 资源分组&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
### Extend the Headlamp UI with plugins {#plugins}
--&gt;
&lt;h3 id=&#34;plugins&#34;&gt;使用插件扩展 Headlamp UI&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#plugins&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Headlamp can be extended through plugins that bring common workflows directly into the UI. Instead of switching tools, you work in one place with the same context.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/add-plugin-catalog.png&#34;
         alt=&#34;Adding plugins from the plugin catalog in the Headlamp interface&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;Headlamp 可以通过插件扩展，这些插件将常见工作流程直接带入 UI。
你可以在一个地方使用相同的上下文工作，而无需切换工具。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/add-plugin-catalog.png&#34;
         alt=&#34;在 Headlamp 界面中从插件目录添加插件&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
For example, the Flux plugin brings GitOps workflows into Headlamp. It allows teams to view application state alongside the Kubernetes resources that Flux manages, making it easier to understand how changes in Git relate to what is running in the cluster.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/add-gitops.png&#34;
         alt=&#34;Viewing and managing GitOps resources in Headlamp using the Flux plugin&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;例如，Flux 插件将 GitOps 工作流程带入 Headlamp。
它允许团队在 Flux 管理的 Kubernetes 资源旁边查看应用状态，
使理解 Git 中的更改如何与集群中运行的内容相关变得更容易。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/add-gitops.png&#34;
         alt=&#34;使用 Flux 插件在 Headlamp 中查看和管理 GitOps 资源&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
The AI Assistant follows a similar pattern. It adds a conversational layer to the UI that helps users understand what they are seeing, troubleshoot issues, or take action. All of this happens in the same screen where the problem appears.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/add-ai-assistant.png&#34;
         alt=&#34;Using the AI assistant in Headlamp to understand and troubleshoot Kubernetes resources&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;AI Assistant 遵循类似的模式。它在 UI 中添加了一个对话层，
帮助用户理解他们所看到的内容、排除问题或采取行动。
所有这些都发生在问题出现的同一个屏幕上。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/add-ai-assistant.png&#34;
         alt=&#34;在 Headlamp 中使用 AI 助手来理解和排除 Kubernetes 资源问题&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
### Building your own plugins
--&gt;
&lt;h3 id=&#34;构建自己的插件&#34;&gt;构建自己的插件&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%9e%84%e5%bb%ba%e8%87%aa%e5%b7%b1%e7%9a%84%e6%8f%92%e4%bb%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Plugins are optional and not limited to community-built extensions. Platform and project teams can also create their own plugins. This allows organizations to add custom integrations that match their specific workflows and internal tooling, while keeping the user experience consistent.
--&gt;
&lt;p&gt;插件是可选的，不限于社区构建的扩展。平台和项目团队也可以创建自己的插件。
这允许组织添加符合其特定工作流程和内部工具的自定义集成，同时保持用户体验的一致性。&lt;/p&gt;
&lt;!--
## Choosing how and where Headlamp runs
--&gt;
&lt;h2 id=&#34;选择-headlamp-的运行方式和位置&#34;&gt;选择 Headlamp 的运行方式和位置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%80%89%e6%8b%a9-headlamp-%e7%9a%84%e8%bf%90%e8%a1%8c%e6%96%b9%e5%bc%8f%e5%92%8c%e4%bd%8d%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Headlamp gives teams flexibility in how they use a Kubernetes UI. You can run it directly in a cluster, use it as a desktop application, or combine both approaches based on your needs.
--&gt;
&lt;p&gt;Headlamp 为团队提供了使用 Kubernetes UI 的灵活性。
你可以直接在集群中运行它，将其用作桌面应用，或根据需要结合两种方法。&lt;/p&gt;
&lt;!--
Running Headlamp in-cluster works well for shared environments. It provides a centrally managed UI with controlled access and fits naturally into Kubernetes setups, following the same authentication and RBAC rules as other in-cluster components.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/browser-app.png&#34;
         alt=&#34;Running Headlamp as an in-cluster browser-based application&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;在集群内运行 Headlamp 适用于共享环境。
它提供了一个集中管理的 UI，具有受控访问权限，并自然地融入 Kubernetes 设置，
遵循与其他集群内组件相同的认证和 RBAC 规则。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/browser-app.png&#34;
         alt=&#34;将 Headlamp 作为集群内基于浏览器的应用运行&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
The desktop application is often a better fit for local development and onboarding. It also works well when you need to manage multiple clusters from one place. Users can connect using their existing kubeconfig without deploying anything into the cluster.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/desktop-app.png&#34;
         alt=&#34;Using Headlamp as a desktop application to manage Kubernetes clusters locally&#34;/&gt; 
&lt;/figure&gt;
--&gt;
&lt;p&gt;桌面应用通常更适合本地开发和入职培训。
当你需要从一个地方管理多个集群时，它也很有效。
用户可以使用现有的 kubeconfig 连接，而无需在集群中部署任何东西。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/06/01/dashboard-to-headlamp/desktop-app.png&#34;
         alt=&#34;使用 Headlamp 作为桌面应用在本地管理 Kubernetes 集群&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
These options are not mutually exclusive. Many teams use the desktop app for day-to-day work, while relying on an in-cluster deployment for shared or production environments.
--&gt;
&lt;p&gt;这些选项不是相互排斥的。许多团队使用桌面应用进行日常工作，同时依赖集群内部署用于共享或生产环境。&lt;/p&gt;
&lt;!--
## Preparing for the Migration
--&gt;
&lt;h2 id=&#34;准备迁移&#34;&gt;准备迁移&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%87%86%e5%a4%87%e8%bf%81%e7%a7%bb&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Before moving from Kubernetes Dashboard to Headlamp, it can be helpful to pause and take stock of how you use the Dashboard today. A little reflection up front can go a long way toward making the transition feel smooth and familiar.
--&gt;
&lt;p&gt;在从 Kubernetes Dashboard 迁移到 Headlamp 之前，
停下来评估一下你今天如何使用 Dashboard 可能会有所帮助。
提前进行一些思考可以大大有助于使过渡感觉顺畅和熟悉。&lt;/p&gt;
&lt;!--
Start by noting which clusters and namespaces you access and how authentication works. Headlamp relies on standard Kubernetes authentication and RBAC. In most cases, existing access models carry over without change. If users already connect using kubeconfig files or service accounts, they will be able to access the same resources in Headlamp.
--&gt;
&lt;p&gt;首先记录你访问的集群和命名空间以及认证如何工作。
Headlamp 依赖标准的 Kubernetes 认证和 RBAC。
在大多数情况下，现有的访问模型无需更改即可延续。
如果用户已经使用 kubeconfig 文件或服务账户连接，他们将能够在 Headlamp 中访问相同的资源。&lt;/p&gt;
&lt;!--
It is also useful to think about the workflows that matter most to your team. Some users rely on Dashboard for quick inspection or troubleshooting, while others use it for lightweight edits or validation. Headlamp supports these same workflows and adds optional capabilities on top. Knowing what you rely on today helps the transition feel predictable and confidence building.
--&gt;
&lt;p&gt;思考对你的团队最重要的工作流程也很有用。
一些用户依赖 Dashboard 进行快速检查或故障排除，而另一些用户则用它进行轻量级编辑或验证。
Headlamp 支持这些相同的工作流程，并在此基础上添加可选功能。
了解你今天依赖什么有助于使过渡感觉可预测并建立信心。&lt;/p&gt;
&lt;!--
If you would like to explore Headlamp or try it out before migrating, you can learn more at [headlamp.dev](https://headlamp.dev).
--&gt;
&lt;p&gt;如果你想在迁移前探索 Headlamp 或试用它，可以在
&lt;a href=&#34;https://headlamp.dev&#34;&gt;headlamp.dev&lt;/a&gt; 了解更多信息。&lt;/p&gt;
&lt;!--
This blog focused on understanding the transition and what to expect. A step by step migration guide is coming soon and will walk through installation and migration in detail.
--&gt;
&lt;p&gt;这篇博客重点介绍了理解过渡和预期内容。分步迁移指南即将推出，将详细介绍安装和迁移过程。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>回顾既往：为未修复的 Kubernetes CVE 纠正记录</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/21/reconciling-unfixed-kubernetes-cves/</link>
      <pubDate>Thu, 21 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/21/reconciling-unfixed-kubernetes-cves/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Reconciling the Past: Correcting Records for Unfixed Kubernetes CVEs&#34;
draft: true
slug: reconciling-unfixed-kubernetes-cves
author: &gt;
  [Pushkar Joglekar](https://github.com/PushkarJ) (Broadcom / SIG Security),
  [Tabitha Sable](https://github.com/tabbysable) (Datadog / K8s Security Response Committee / SIG Security)
--&gt;
&lt;!--
The Kubernetes project relies on transparency to empower cluster administrators and security researchers. One important way we do that is by publishing CVE records into the Common Vulnerabilities and Exposures database. As part of our ongoing effort to mature the official [Kubernetes CVE Feed](/docs/reference/issues-security/official-cve-feed/), we have identified some discrepancies. CVE records for a few older, unfixed issues incorrectly include a _fixed version_ field.
--&gt;
&lt;p&gt;Kubernetes 项目依靠透明度来赋能集群管理员和安全研究人员。
我们做到这一点的重要方式之一是将 CVE 记录发布到通用漏洞披露数据库中。
作为我们持续完善官方
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/issues-security/official-cve-feed/&#34;&gt;Kubernetes CVE 动态订阅源&lt;/a&gt;的一部分，
我们发现了一些差异。
某些较早的未修复问题的 CVE 记录错误地包含了 &lt;strong&gt;已修复版本（fixed version）&lt;/strong&gt; 字段。&lt;/p&gt;
&lt;!--
The Kubernetes Security Response Committee (SRC) will correct the affected CVE records on June 1, 2026. This may result in vulnerability scanners identifying these vulnerabilities in places where they were previously not detected.
--&gt;
&lt;p&gt;Kubernetes 安全响应委员会（SRC）将于 2026 年 6 月 1 日纠正受影响的 CVE 记录。
这可能导致漏洞扫描器在这些漏洞之前未被检测到的地方识别出它们。&lt;/p&gt;
&lt;!--
To help reduce confusion, this post provides a technical update on three vulnerabilities that were disclosed in previous years but remain unfixed: **CVE-2020-8561**, **CVE-2020-8562**, and **CVE-2021-25740**.
--&gt;
&lt;p&gt;为帮助减少混淆，本文针对以下三个多年前披露但仍未修复的漏洞提供技术更新：
&lt;strong&gt;CVE-2020-8561&lt;/strong&gt;、&lt;strong&gt;CVE-2020-8562&lt;/strong&gt; 和 &lt;strong&gt;CVE-2021-25740&lt;/strong&gt;。&lt;/p&gt;
&lt;!--
## Why we are updating these records now
--&gt;
&lt;h2 id=&#34;为什么我们现在更新这些记录&#34;&gt;为什么我们现在更新这些记录&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e7%8e%b0%e5%9c%a8%e6%9b%b4%e6%96%b0%e8%bf%99%e4%ba%9b%e8%ae%b0%e5%bd%95&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
While these vulnerabilities have been public for several years, the recent work to generate official Open Source Vulnerabilities (OSV) files revealed that their corresponding CVE records did not accurately reflect their status. Specifically, some records suggested a _fixed_ version existed, when in reality, these issues are architectural design trade-offs that cannot be fully remediated through code without breaking fundamental Kubernetes functionality.
--&gt;
&lt;p&gt;虽然这些漏洞已经公开多年，但最近生成官方开源漏洞（OSV）文件的工作发现，
它们对应的 CVE 记录并未准确反映其状态。具体而言，某些记录表明存在&lt;strong&gt;已修复&lt;/strong&gt;版本，
而实际上这些问题属于架构设计上的权衡，无法在不破坏 Kubernetes 基础功能的情况下通过代码完全修复。&lt;/p&gt;
&lt;!--
Correcting these records is vital for the community for:
--&gt;
&lt;p&gt;纠正这些记录对社区至关重要，原因如下：&lt;/p&gt;
&lt;!--
- **Automation Fidelity**: Modern vulnerability scanners depend on precise version ranges. Inaccurate _fixed_ tags lead to false negatives, giving users a false sense of security.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;自动化保真度&lt;/strong&gt;：现代漏洞扫描器依赖于精确的版本范围。
不准确的&lt;strong&gt;已修复&lt;/strong&gt;标签会导致漏报，让用户产生虚假的安全感。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Risk Documentation**: By formalizing these as _unfixed_, we ensure that platform providers and administrators are aware of the persistent need for administrative mitigations.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;风险文档化&lt;/strong&gt;：通过将这些正式确定为&lt;strong&gt;未修复&lt;/strong&gt;，
我们确保平台提供商和管理员了解持续需要采取管理缓解措施的必要性。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
For completeness, we should also mention that [CVE-2020-8554](https://www.cve.org/cverecord?id=CVE-2020-8554) is an unfixed CVE with a correct CVE record stating that it affects all versions. That record will also be updated to use a more-standardized version number format.
--&gt;
&lt;p&gt;为完整性起见，我们还应提及 &lt;a href=&#34;https://www.cve.org/cverecord?id=CVE-2020-8554&#34;&gt;CVE-2020-8554&lt;/a&gt;
是一个未修复的 CVE，但其 CVE 记录正确地声明它影响所有版本。
该记录也将更新为使用更标准化的版本号格式。&lt;/p&gt;
&lt;!--
## Technical analysis of unfixed architectural risks
--&gt;
&lt;h2 id=&#34;未修复架构风险的技术分析&#34;&gt;未修复架构风险的技术分析&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%9c%aa%e4%bf%ae%e5%a4%8d%e6%9e%b6%e6%9e%84%e9%a3%8e%e9%99%a9%e7%9a%84%e6%8a%80%e6%9c%af%e5%88%86%e6%9e%90&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The following vulnerabilities will not be fixed by the Kubernetes project. GitHub issues remain the best reference for the technical mechanics of these flaws.
--&gt;
&lt;p&gt;以下漏洞将不会由 Kubernetes 项目修复。
GitHub 问题仍然是了解这些缺陷技术细节的最佳参考资料。&lt;/p&gt;
&lt;!--
### [CVE-2020-8561](https://github.com/kubernetes/kubernetes/issues/104720): Webhook redirect in kube-apiserver
--&gt;
&lt;h3 id=&#34;cve-2020-8561-kube-apiserver-中的-webhook-重定向&#34;&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/104720&#34;&gt;CVE-2020-8561&lt;/a&gt;：kube-apiserver 中的 Webhook 重定向&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#cve-2020-8561-kube-apiserver-%e4%b8%ad%e7%9a%84-webhook-%e9%87%8d%e5%ae%9a%e5%90%91&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
- **Severity**: Medium (4.1).
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;严重程度&lt;/strong&gt;：中（4.1）。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **The Issue**: The kube-apiserver follows HTTP redirects when communicating with admission webhooks. An actor capable of configuring an AdmissionWebhookConfiguration can redirect API server requests to internal, private networks.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;问题描述&lt;/strong&gt;：kube-apiserver 在与准入 webhook 通信时会遵循 HTTP 重定向。
能够配置 AdmissionWebhookConfiguration 的参与者可以将 API 服务器请求重定向到内部私有网络。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Why it remains unfixed**: Restricting this behavior would require breaking the standard HTTP client behavior that many legitimate integrations rely on.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;未修复原因&lt;/strong&gt;：限制此行为需要打破许多合法集成所依赖的标准 HTTP 客户端行为。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Mitigation**: Set the API server log level to less than 10 (to prevent logging response bodies) and disable dynamic profiling (`--profiling=false`) to prevent unauthorized log-level changes.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;缓解措施&lt;/strong&gt;：将 API 服务器日志级别设置为小于 10（以防止记录响应正文），
并禁用动态性能分析（&lt;code&gt;--profiling=false&lt;/code&gt;）以防止未经授权的日志级别更改。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### [CVE-2020-8562](https://github.com/kubernetes/kubernetes/issues/101493): Proxy bypass via DNS TOCTOU
--&gt;
&lt;h3 id=&#34;cve-2020-8562-通过-dns-toctou-绕过代理&#34;&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/101493&#34;&gt;CVE-2020-8562&lt;/a&gt;：通过 DNS TOCTOU 绕过代理&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#cve-2020-8562-%e9%80%9a%e8%bf%87-dns-toctou-%e7%bb%95%e8%bf%87%e4%bb%a3%e7%90%86&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
- **Severity**: Low (3.1).
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;严重程度&lt;/strong&gt;：低（3.1）。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **The Issue**: A Time-of-Check to Time-of-Use (TOCTOU) race condition in the API server proxy allows users to bypass IP restrictions. The system performs a DNS check to validate an IP, but then performs a second resolution for the actual connection, which an attacker can manipulate.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;问题描述&lt;/strong&gt;：API 服务器代理中的检查时间到使用时间（TOCTOU）竞争条件允许用户绕过 IP 限制。
系统执行 DNS 检查以验证 IP，但随后为实际连接执行第二次解析，攻击者可以操纵此过程。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Why it remains unfixed**: Fixing this requires pinning resolved IPs in a way that breaks complex split-horizon DNS or dynamic IP environments.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;未修复原因&lt;/strong&gt;：修复此问题需要固定已解析的 IP，但这会破坏复杂的分割视图 DNS 或动态 IP 环境。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Mitigation**: Use a local DNS caching server like dnsmasq for the API server and configure `min-cache-ttl` to enforce consistent responses between the check and the connection.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;缓解措施&lt;/strong&gt;：为 API 服务器使用本地 DNS 缓存服务器（如 dnsmasq），
并配置 &lt;code&gt;min-cache-ttl&lt;/code&gt; 以在检查和连接之间强制执行一致的响应。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### [CVE-2021-25740](https://github.com/kubernetes/kubernetes/issues/103675): Cross-namespace forwarding via Endpoints
--&gt;
&lt;h3 id=&#34;cve-2021-25740-通过-endpoints-的跨名字空间转发&#34;&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/103675&#34;&gt;CVE-2021-25740&lt;/a&gt;：通过 Endpoints 的跨名字空间转发&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#cve-2021-25740-%e9%80%9a%e8%bf%87-endpoints-%e7%9a%84%e8%b7%a8%e5%90%8d%e5%ad%97%e7%a9%ba%e9%97%b4%e8%bd%ac%e5%8f%91&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
- **Severity**: Low (3.1).
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;严重程度&lt;/strong&gt;：低（3.1）。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **The Issue**: A design flaw in the Endpoint and EndpointSlice API objects allows users to manually specify IP addresses, which can be used to point a LoadBalancer or Ingress toward backends in other namespaces.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;问题描述&lt;/strong&gt;：Endpoints 和 EndpointSlices API 对象中的设计缺陷允许用户手动指定 IP 地址，
这些地址可用于将 LoadBalancer 或 Ingress 指向其他名字空间中的后端。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Why it remains unfixed**: This is a fundamental feature of the Endpoints API used by many networking tools and operators.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;未修复原因&lt;/strong&gt;：这是许多网络工具和 operator 使用的 Endpoints API 的基础功能。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Mitigation**: Restrict write access to Endpoint (legacy) and EndpointSlices. Since Kubernetes 1.22, Kubernetes RBAC authorization mode no longer includes those permissions in the default _edit_ and _admin_ ClusterRoles. That removal applies to clusters created using Kubernetes v1.22; for clusters upgraded from older versions, administrators should manually audit and reconcile the `system:aggregate-to-edit` ClusterRole.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;缓解措施&lt;/strong&gt;：限制对 Endpoints（遗留）和 EndpointSlices 的写访问权限。
自 Kubernetes 1.22 起，Kubernetes RBAC 授权模式不再在默认
&lt;strong&gt;edit&lt;/strong&gt; 和 &lt;strong&gt;admin&lt;/strong&gt; ClusterRole 中包含这些权限。
该移除适用于使用 Kubernetes v1.22 创建的集群；对于从旧版本升级的集群，
管理员应手动审核并协调 &lt;code&gt;system:aggregate-to-edit&lt;/code&gt; ClusterRole。&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert alert-info&#34; role=&#34;note&#34;&gt;&lt;h4 class=&#34;alert-heading&#34;&gt;说明：&lt;/h4&gt;&lt;!--
On June 1, 2026, these CVE records will be updated to correctly reflect the fact that all versions are affected. You may see them begin to appear in vulnerability scanner results.
--&gt;
&lt;p&gt;2026 年 6 月 1 日，这些 CVE 记录将被更新以正确反映所有版本均受影响的事实。
你可能会看到它们开始出现在漏洞扫描器结果中。&lt;/p&gt;&lt;/div&gt;

&lt;!--
## Required actions for administrators
--&gt;
&lt;h2 id=&#34;管理员需要采取的操作&#34;&gt;管理员需要采取的操作&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%ae%a1%e7%90%86%e5%91%98%e9%9c%80%e8%a6%81%e9%87%87%e5%8f%96%e7%9a%84%e6%93%8d%e4%bd%9c&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The Kubernetes project recommends a _secure by configuration_ approach to manage these persistent risks:
--&gt;
&lt;p&gt;Kubernetes 项目推荐采用&lt;strong&gt;通过配置实现安全&lt;/strong&gt;的方法来管理这些持续风险：&lt;/p&gt;
&lt;!--
| Vulnerability | Action Item | Severity Score (Rating) | Command / Configuration |
| :---- | :---- | :---- | :---- |
| **CVE-2020-8561** | Restrict Log Verbosity | 4.1 (Medium) | Ensure `--v` is set to `&lt; 10` and `--profiling=false`. |
| **CVE-2020-8562** | Enforce DNS Consistency | 3.1 (Low) | Deploy dnsmasq or a similar caching resolver on control plane nodes. |
| **CVE-2021-25740** | Hardened RBAC | 3.1 (Low) | `kubectl auth reconcile` to remove Endpoint write access from broad roles. |
--&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;漏洞&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;操作项&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;严重程度评分（评级）&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;命令 / 配置&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;CVE-2020-8561&lt;/strong&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;限制日志详细程度&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;4.1（中）&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;确保 &lt;code&gt;--v&lt;/code&gt; 设置为 &lt;code&gt;&amp;lt; 10&lt;/code&gt; 且 &lt;code&gt;--profiling=false&lt;/code&gt;。&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;CVE-2020-8562&lt;/strong&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;强制 DNS 一致性&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;3.1（低）&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;在控制平面节点上部署 dnsmasq 或类似的缓存解析器。&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;strong&gt;CVE-2021-25740&lt;/strong&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;强化 RBAC&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;3.1（低）&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;使用 &lt;code&gt;kubectl auth reconcile&lt;/code&gt; 从广泛角色中移除 Endpoints 写访问权限。&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;!--
The RBAC action for CVE-2021-25740 applies when your cluster uses RBAC authorization mode, which is the default for clusters created with standard Kubernetes tooling. Administrators should independently test and validate these configurations in a non-production environment, assessing the architectural risks against their specific threat model and risk tolerance.
--&gt;
&lt;p&gt;CVE-2021-25740 的 RBAC 操作适用于使用 RBAC 授权模式的集群，
这是使用标准 Kubernetes 工具创建的集群的默认设置。
管理员应在非生产环境中独立测试和验证这些配置，
根据其特定的威胁模型和风险承受能力评估架构风险。&lt;/p&gt;
&lt;!--
## Conclusion: maturity through transparency
--&gt;
&lt;h2 id=&#34;结语-通过透明度走向成熟&#34;&gt;结语：通过透明度走向成熟&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%bb%93%e8%af%ad-%e9%80%9a%e8%bf%87%e9%80%8f%e6%98%8e%e5%ba%a6%e8%b5%b0%e5%90%91%e6%88%90%e7%86%9f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The effort to reconcile these records is a sign of a maturing security ecosystem. By moving away from the &#34;patch-only&#34; mindset and accurately documenting architectural debt, the Kubernetes project provides the community with the high-fidelity data needed to secure modern cloud native infrastructure.
--&gt;
&lt;p&gt;协调这些记录的努力是安全生态系统走向成熟的标志。
通过摒弃&lt;strong&gt;仅打补丁&lt;/strong&gt;的思维模式并准确记录架构债务，
Kubernetes 项目为社区提供了保护现代云原生基础设施所需的高保真数据。&lt;/p&gt;
&lt;!--
We would like to thank the security researchers—QiQi Xu, Javier Provecho, and others—who identified these risks, and the SIG Security Tooling contributors who continue to refine our official feeds. Special shoutout to Rory McCune for sharing information around these CVEs through his blog posts.
--&gt;
&lt;p&gt;我们要感谢发现这些风险的安全研究人员 —— QiQi Xu、Javier Provecho 等，
以及继续完善我们官方动态订阅源的 SIG Security Tooling 贡献者。
特别感谢 Rory McCune 通过他的博客文章分享了有关这些 CVE 的信息。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：云控制器管理器中的路由同步新指标</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/15/ccm-new-metric-route-sync-total/</link>
      <pubDate>Fri, 15 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/15/ccm-new-metric-route-sync-total/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: New Metric for Route Sync in the Cloud Controller Manager&#34;
date: 2026-05-15T10:35:00-08:00
slug: ccm-new-metric-route-sync-total
author: &gt;
  [Lukas Metzner](https://github.com/lukasmetzner) (Hetzner)
aliases:
  - /blog/2026/02/26/ccm-new-metric-route-sync-total
  - /blog/2026/02/26/ccm-new-metric-route-sync-total/
--&gt;
&lt;!--
_This article was originally published with the wrong date. It was later republished, dated the 15th of
May 2026._
--&gt;
&lt;p&gt;&lt;strong&gt;本文最初发布时日期有误。后来重新发布，日期为 2026 年 5 月 15 日。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
Kubernetes v1.36 introduces a new alpha counter metric `route_controller_route_sync_total`
to the Cloud Controller Manager (CCM) route controller implementation at
[`k8s.io/cloud-provider`](https://github.com/kubernetes/cloud-provider). This metric
increments each time routes are synced with the cloud provider.
--&gt;
&lt;p&gt;Kubernetes v1.36 在位于
&lt;a href=&#34;https://github.com/kubernetes/cloud-provider&#34;&gt;&lt;code&gt;k8s.io/cloud-provider&lt;/code&gt;&lt;/a&gt;
的云控制器管理器（CCM）路由控制器实现中引入了一个新的 Alpha 计数器指标
&lt;code&gt;route_controller_route_sync_total&lt;/code&gt;。此指标在每次与云提供商同步路由时递增。&lt;/p&gt;
&lt;!--
## A/B testing watch-based route reconciliation
--&gt;
&lt;h2 id=&#34;基于监视的路由调谐的-a-b-测试&#34;&gt;基于监视的路由调谐的 A/B 测试&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%9f%ba%e4%ba%8e%e7%9b%91%e8%a7%86%e7%9a%84%e8%b7%af%e7%94%b1%e8%b0%83%e8%b0%90%e7%9a%84-a-b-%e6%b5%8b%e8%af%95&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This metric was added to help operators validate the
`CloudControllerManagerWatchBasedRoutesReconciliation` feature gate introduced in
[Kubernetes v1.35](/blog/2025/12/30/kubernetes-v1-35-watch-based-route-reconciliation-in-ccm/).
That feature gate switches the route controller from a fixed-interval loop to a watch-based
approach that only reconciles when nodes actually change. This reduces unnecessary API calls
to the infrastructure provider, lowering pressure on rate-limited APIs and allowing operators
to make more efficient use of their available quota.
--&gt;
&lt;p&gt;添加此指标是为了帮助运维人员验证在
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/12/30/kubernetes-v1-35-watch-based-route-reconciliation-in-ccm/&#34;&gt;Kubernetes v1.35&lt;/a&gt;
中引入的 &lt;code&gt;CloudControllerManagerWatchBasedRoutesReconciliation&lt;/code&gt; 特性门控。
此特性门控将路由控制器从固定间隔循环切换为基于监视的方法，仅在节点实际发生变化时进行调谐。
这减少了对基础设施提供商的不必要 API 调用，降低了速率限制 API 的压力，
并允许运维人员更高效地使用其可用配额。&lt;/p&gt;
&lt;!--
To A/B test this, compare `route_controller_route_sync_total` with the feature gate
disabled (default) versus enabled. In clusters where node changes are infrequent, you should
see a significant drop in the sync rate with the feature gate turned on.
--&gt;
&lt;p&gt;要对此进行 A/B 测试，请比较特性门控禁用（默认）与启用时的 &lt;code&gt;route_controller_route_sync_total&lt;/code&gt;。
在节点变化不频繁的集群中，开启特性门控后，你应该会看到同步速率显著下降。&lt;/p&gt;
&lt;!--
### Example: expected behavior
--&gt;
&lt;h3 id=&#34;示例-预期行为&#34;&gt;示例：预期行为&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%a4%ba%e4%be%8b-%e9%a2%84%e6%9c%9f%e8%a1%8c%e4%b8%ba&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
**With the feature gate disabled** (the default fixed-interval loop), the counter increments
steadily regardless of whether any node changes occurred:
--&gt;
&lt;p&gt;&lt;strong&gt;特性门控禁用时&lt;/strong&gt;（默认的固定间隔循环），无论是否发生任何节点变化，计数器都会稳定递增：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# After 10 minutes with no node changes
route_controller_route_sync_total 60
# After 20 minutes, still no node changes
route_controller_route_sync_total 120
&lt;/code&gt;&lt;/pre&gt;&lt;!--
**With the feature gate enabled** (watch-based reconciliation), the counter only increments
when nodes are actually added, removed, or updated:
--&gt;
&lt;p&gt;&lt;strong&gt;特性门控启用时&lt;/strong&gt;（基于监视的调和），仅在节点实际被添加、移除或更新时，计数器才会递增：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# After 10 minutes with no node changes
route_controller_route_sync_total 1
# After 20 minutes, still no node changes — counter unchanged
route_controller_route_sync_total 1
# A new node joins the cluster — counter increments
route_controller_route_sync_total 2
&lt;/code&gt;&lt;/pre&gt;&lt;!--
The difference is especially visible in stable clusters where nodes rarely change.
--&gt;
&lt;p&gt;这种差异在节点很少变化的稳定集群中尤其明显。&lt;/p&gt;
&lt;!--
## Where can I give feedback?
--&gt;
&lt;h2 id=&#34;我在哪里可以提供反馈&#34;&gt;我在哪里可以提供反馈？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%88%91%e5%9c%a8%e5%93%aa%e9%87%8c%e5%8f%af%e4%bb%a5%e6%8f%90%e4%be%9b%e5%8f%8d%e9%a6%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you have feedback, feel free to reach out through any of the following channels:
- The [#sig-cloud-provider](https://kubernetes.slack.com/messages/sig-cloud-provider) channel on [Kubernetes Slack](https://slack.k8s.io/)
- The [KEP-5237 issue](https://kep.k8s.io/5237) on GitHub
- The [SIG Cloud Provider community page](https://github.com/kubernetes/community/tree/05223ecbd2d6f960edb40684dc83d053d49f8b68/sig-cloud-provider) for other communication channels
--&gt;
&lt;p&gt;如果你有反馈，欢迎通过以下任一渠道联系我们：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://slack.k8s.io/&#34;&gt;Kubernetes Slack&lt;/a&gt; 上的
&lt;a href=&#34;https://kubernetes.slack.com/messages/sig-cloud-provider&#34;&gt;#sig-cloud-provider&lt;/a&gt; 频道&lt;/li&gt;
&lt;li&gt;GitHub 上的 &lt;a href=&#34;https://kep.k8s.io/5237&#34;&gt;KEP-5237 Issue&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/community/tree/05223ecbd2d6f960edb40684dc83d053d49f8b68/sig-cloud-provider&#34;&gt;SIG Cloud Provider 社区页面&lt;/a&gt;了解其他沟通渠道&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## How can I learn more?
--&gt;
&lt;h2 id=&#34;我如何了解更多&#34;&gt;我如何了解更多？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%88%91%e5%a6%82%e4%bd%95%e4%ba%86%e8%a7%a3%e6%9b%b4%e5%a4%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
For more details, refer to [KEP-5237](https://kep.k8s.io/5237).
--&gt;
&lt;p&gt;有关更多详细信息，请参阅 &lt;a href=&#34;https://kep.k8s.io/5237&#34;&gt;KEP-5237&lt;/a&gt;。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：混合版本代理升级到 Beta</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/15/kubernetes-1-36-feature-mixed-version-proxy-beta/</link>
      <pubDate>Fri, 15 May 2026 10:00:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/15/kubernetes-1-36-feature-mixed-version-proxy-beta/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Mixed Version Proxy Graduates to Beta &#34;
date: 2026-05-15T10:00:00-08:00
slug: kubernetes-1-36-feature-mixed-version-proxy-beta
author: &gt;
  Richa Banker (Google)
---
--&gt;
&lt;!--
Back in Kubernetes 1.28, we introduced the `Mixed Version Proxy (MVP)` as an Alpha feature (under the feature gate `UnknownVersionInteroperabilityProxy`) in a [previous blog post](/blog/2023/08/28/kubernetes-1-28-feature-mixed-version-proxy-alpha/). The goal was simple but critical: make cluster upgrades safer by ensuring that requests for resources not yet known to an older API server are correctly routed to a newer peer API server, instead of returning an incorrect `404 Not Found`.
--&gt;
&lt;p&gt;早在 Kubernetes 1.28 中，
我们在&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2023/08/28/kubernetes-1-28-feature-mixed-version-proxy-alpha/&#34;&gt;之前的博客文章&lt;/a&gt;中引入了
&lt;code&gt;Mixed Version Proxy (MVP)&lt;/code&gt; 作为 Alpha 特性（在特性门控 &lt;code&gt;UnknownVersionInteroperabilityProxy&lt;/code&gt; 下）。
目标简单但关键：通过确保对旧版 API 服务器尚不了解的资源请求被正确路由到较新的对等 API 服务器，
而不是返回不正确的 &lt;code&gt;404 Not Found&lt;/code&gt;，从而使集群升级更安全。&lt;/p&gt;
&lt;!--
We are excited to announce that the Mixed Version Proxy is moving to Beta in Kubernetes 1.36 and will be enabled by default! The feature has evolved significantly since its initial release, addressing key gaps and modernizing its architecture.
--&gt;
&lt;p&gt;我们很高兴地宣布，Mixed Version Proxy 将在 Kubernetes 1.36 中升级到 Beta 版本，
并将默认启用！该特性自首次发布以来有了显著发展，解决了关键差距并实现了架构现代化。&lt;/p&gt;
&lt;!--
Here is a look at how the feature has evolved and what you need to know to leverage it in your clusters.
--&gt;
&lt;p&gt;以下介绍该特性的发展历程以及在集群中使用它需要了解的内容。&lt;/p&gt;
&lt;!--
## What problem are we solving?
--&gt;
&lt;h2 id=&#34;我们正在解决什么问题&#34;&gt;我们正在解决什么问题？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%88%91%e4%bb%ac%e6%ad%a3%e5%9c%a8%e8%a7%a3%e5%86%b3%e4%bb%80%e4%b9%88%e9%97%ae%e9%a2%98&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
In a highly available control plane undergoing an upgrade, you often have API servers running different versions. These servers might serve different sets of APIs (Groups, Versions, Resources).
Without MVP, if a client request lands on an API server that does not serve the requested resource (e.g., a new API version introduced in the upgrade), that server returns a `404 Not Found`. This is technically incorrect because the resource is available in the cluster, just not on that specific server. This can lead to serious side effects, such as mistaken garbage collection or blocked namespace deletions.
MVP solves this by proxying the request to a peer API server that can serve it.
--&gt;
&lt;p&gt;在正在升级的高可用控制平面中，你通常会有运行不同版本的 API 服务器。
这些服务器可能提供不同的 API 集（Groups、Versions、Resources）。
没有 MVP，如果客户端请求落在不提供所请求资源的 API 服务器上（例如，升级中引入的新 API 版本），
该服务器会返回 &lt;code&gt;404 Not Found&lt;/code&gt;。这在技术上是不正确的，因为资源在集群中是可用的，
只是不在该特定服务器上。这可能导致严重的副作用，例如错误的垃圾收集或命名空间删除被阻止。
MVP 通过将请求代理到能够提供该资源的对等 API 服务器来解决这个问题。&lt;/p&gt;


&lt;pre class=&#34;mermaid&#34;&gt;
sequenceDiagram
    participant Client
    participant API_Server_A as API Server A (Older/Different)
    participant API_Server_B as API Server B (Newer/Capable)
    
    Client-&gt;&gt;API_Server_A: 1. Request for Resource (e.g., v2)
    Note over API_Server_A: Determines it cannot serve locally
    API_Server_A-&gt;&gt;API_Server_A: 2. Looks up capable peer in Discovery Cache
    API_Server_A-&gt;&gt;API_Server_B: 3. Proxies request (adds x-kubernetes-peer-proxied header)
    API_Server_B-&gt;&gt;API_Server_B: 4. Processes request locally
    API_Server_B--&gt;&gt;API_Server_A: 5. Returns Response
    API_Server_A--&gt;&gt;Client: 6. Forwards Response
&lt;/pre&gt;

&lt;!--
## How has it evolved since 1.28
--&gt;
&lt;h2 id=&#34;自-1-28-以来的发展&#34;&gt;自 1.28 以来的发展&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%87%aa-1-28-%e4%bb%a5%e6%9d%a5%e7%9a%84%e5%8f%91%e5%b1%95&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The initial Alpha implementation was a great proof of concept, but it had some limitations and relied on older mechanisms. Here is how we have modernized it for Beta:
--&gt;
&lt;p&gt;最初的 Alpha 实现是一个很好的概念证明，但它有一些局限性并且依赖于旧机制。
以下是我们为 Beta 版本进行现代化改进的方式：&lt;/p&gt;
&lt;!--
1. From StorageVersion API to Aggregated Discovery
In the Alpha version, API servers relied on the `StorageVersion API` to figure out which peers served which resources. While functional, this approach had a significant limitation: the `StorageVersion API` is not yet supported for CRDs and aggregated APIs.
For Beta, we have replaced the reliance on `StorageVersion API` calls with the use of `Aggregated Discovery`. API servers now use the aggregated discovery data to dynamically understand the capabilities of their peers.
--&gt;
&lt;ol&gt;
&lt;li&gt;从 StorageVersion API 到聚合发现
在 Alpha 版本中，API 服务器依赖 &lt;code&gt;StorageVersion API&lt;/code&gt; 来确定哪些对等服务器提供哪些资源。
虽然功能正常，但这种方法有一个显著的局限性：&lt;code&gt;StorageVersion API&lt;/code&gt; 尚不支持 CRD 和聚合 API。
对于 Beta 版本，我们用 &lt;code&gt;Aggregated Discovery&lt;/code&gt; 取代了对 &lt;code&gt;StorageVersion API&lt;/code&gt; 调用的依赖。
API 服务器现在使用聚合发现数据来动态了解其对等服务器的能力。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
2. The Missing Piece: Peer-Aggregated Discovery
The [1.28 blog post](/blog/2023/08/28/kubernetes-1-28-feature-mixed-version-proxy-alpha/) noted a significant gap: while we could proxy resource requests, discovery requests still only showed what the local API server knew about.
In 1.36, we have added `Peer-Aggregated Discovery` support! Now, when a client performs discovery (e.g., listing available APIs), the API server merges its local view with the discovery data from all active peers. This provides clients with a complete, unified view of all APIs available across the entire cluster, regardless of which API server they connected to.
--&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;缺失的部分：对等聚合发现
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2023/08/28/kubernetes-1-28-feature-mixed-version-proxy-alpha/&#34;&gt;1.28 博客文章&lt;/a&gt;指出了一个显著的差距：
虽然我们可以代理资源请求，但发现请求仍然只显示本地 API 服务器知道的内容。
在 1.36 中，我们添加了 &lt;code&gt;Peer-Aggregated Discovery&lt;/code&gt; 支持！
现在，当客户端执行发现（例如，列出可用的 API）时，API 服务器会将其本地视图与所有活动对等服务器的发现数据合并。
这为客户端提供了整个集群中所有可用 API 的完整、统一视图，无论它们连接到哪个 API 服务器。&lt;/li&gt;
&lt;/ol&gt;


&lt;pre class=&#34;mermaid&#34;&gt;
sequenceDiagram
    participant Client
    participant API_Server_A as API Server A
    participant API_Server_B as API Server B
    
    Client-&gt;&gt;API_Server_A: 1. Request Discovery Document
    API_Server_A-&gt;&gt;API_Server_A: 2. Gets Local APIs
    API_Server_A-&gt;&gt;API_Server_B: 3. Gets Peer APIs (Cached or Direct)
    API_Server_A-&gt;&gt;API_Server_A: 4. Merges and sorts lists deterministically
    API_Server_A--&gt;&gt;Client: 5. Returns Unified Discovery Document
&lt;/pre&gt;

&lt;!--
While peer-aggregated discovery will be the default behavior (note that peer-aggregated discovery is enabled if the `--peer-ca-file` flag is set, otherwise the server will fallback to showing only its local APIs), there may be cases where you need to inspect only the resources served by the specific API server you are connected to. You can request this non-aggregated view by including the `profile=nopeer` parameter in your request&#39;s `Accept` header (e.g., `Accept: application/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList;profile=nopeer`).
--&gt;
&lt;p&gt;虽然对等聚合发现将是默认行为（请注意，如果设置了 &lt;code&gt;--peer-ca-file&lt;/code&gt; 标志，
则启用对等聚合发现，否则服务器将回退到仅显示其本地 API），但在某些情况下，
你可能需要只检查你连接的特定 API 服务器提供的资源。
你可以通过在请求的 &lt;code&gt;Accept&lt;/code&gt; 头中包含 &lt;code&gt;profile=nopeer&lt;/code&gt;
参数来请求此非聚合视图（例如，&lt;code&gt;Accept: application/json;g=apidiscovery.k8s.io;v=v2;as=APIGroupDiscoveryList;profile=nopeer&lt;/code&gt;）。&lt;/p&gt;
&lt;!--
## Required configuration 
--&gt;
&lt;h2 id=&#34;必需的配置&#34;&gt;必需的配置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bf%85%e9%9c%80%e7%9a%84%e9%85%8d%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
While the feature gate will be enabled by default, it requires certain flags to be set to allow for secure communication between peer API servers. To function correctly, make sure your API server is configured with the following flags:
--&gt;
&lt;p&gt;虽然特性门控将默认启用，但它需要设置某些标志以允许对等 API 服务器之间的安全通信。
要正常工作，请确保你的 API 服务器配置了以下标志：&lt;/p&gt;
&lt;!--
- `--feature-gates=UnknownVersionInteroperabilityProxy=true`: This will be default in 1.36, but it is good to verify
- `--peer-ca-file=&lt;path-to-ca&gt;`: [CRITICAL] This is a required flag. You must provide the CA bundle that the source API server will use to authenticate the serving certificates of destination peer API servers. Without this, proxying will fail due to TLS verification errors.
- `--peer-advertise-ip` and `--peer-advertise-port`: These flags are used to set the network address that peers should use to reach this API server. If unset, the values from `--advertise-address` or `--bind-address` are used. If you have complex network topologies where API servers communicate over a specific internal interface, setting these flags explicitly is highly recommended.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--feature-gates=UnknownVersionInteroperabilityProxy=true&lt;/code&gt;：这在 1.36 中将是默认值，但最好进行验证&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--peer-ca-file=&amp;lt;path-to-ca&amp;gt;&lt;/code&gt;：[CRITICAL] 这是必需的标志。
你必须提供源 API 服务器将用于验证目标对等 API 服务器服务证书的 CA 包。没有这个，代理将因 TLS 验证错误而失败。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--peer-advertise-ip&lt;/code&gt; 和 &lt;code&gt;--peer-advertise-port&lt;/code&gt;：这些标志用于设置对等服务器应使用的网络地址来访问此 API 服务器。
如果未设置，则使用 &lt;code&gt;--advertise-address&lt;/code&gt; 或 &lt;code&gt;--bind-address&lt;/code&gt; 的值。
如果你的网络拓扑复杂，API 服务器通过特定内部接口通信，强烈建议显式设置这些标志。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Configuring with `kubeadm`
--&gt;
&lt;h3 id=&#34;使用-kubeadm-配置&#34;&gt;使用 &lt;code&gt;kubeadm&lt;/code&gt; 配置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bd%bf%e7%94%a8-kubeadm-%e9%85%8d%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
If you manage your cluster with `kubeadm`, you can configure these flags in your `ClusterConfiguration` file:
--&gt;
&lt;p&gt;如果你使用 &lt;code&gt;kubeadm&lt;/code&gt; 管理集群，可以在 &lt;code&gt;ClusterConfiguration&lt;/code&gt; 文件中配置这些标志：&lt;/p&gt;
&lt;!--
peer-advertise-ip and port if needed
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubeadm.k8s.io/v1beta4&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterConfiguration&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiServer&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;extraArgs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;peer-ca-file&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/etc/kubernetes/pki/ca.crt&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# `eer-advertise-ip 和端口（如果需要）&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Call to action
--&gt;
&lt;h2 id=&#34;行动号召&#34;&gt;行动号召&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%a1%8c%e5%8a%a8%e5%8f%b7%e5%8f%ac&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you are running multi-master clusters and upgrading them regularly, the Mixed Version Proxy is a major safety improvement. With it becoming default in 1.36, we encourage you to:
--&gt;
&lt;p&gt;如果你运行多主集群并定期升级它们，Mixed Version Proxy 是一项重大的安全改进。
随着它在 1.36 中成为默认功能，我们鼓励你：&lt;/p&gt;
&lt;!--
1. Review your API server flags to ensure `--peer-ca-file` is set properly.
2. Test the feature in your staging environments as you prepare for the 1.36 upgrade.
3. Provide feedback to SIG API Machinery ([Slack](https://kubernetes.slack.com/messages/sig-api-machinery/), [mailing list](https://groups.google.com/g/kubernetes-sig-api-machinery), or by [attending SIG API Machinery meetings](https://github.com/kubernetes/community/tree/master/sig-api-machinery#meetings)) on your experience.
--&gt;
&lt;ol&gt;
&lt;li&gt;检查你的 API 服务器标志，确保 &lt;code&gt;--peer-ca-file&lt;/code&gt; 已正确设置。&lt;/li&gt;
&lt;li&gt;在准备 1.36 升级时，在你的暂存环境中测试此功能。&lt;/li&gt;
&lt;li&gt;向 SIG API Machinery 提供反馈（&lt;a href=&#34;https://kubernetes.slack.com/messages/sig-api-machinery/&#34;&gt;Slack&lt;/a&gt;、
&lt;a href=&#34;https://groups.google.com/g/kubernetes-sig-api-machinery&#34;&gt;邮件列表&lt;/a&gt;，
或通过&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-api-machinery#meetings&#34;&gt;参加 SIG API Machinery 会议&lt;/a&gt;）
分享你的体验。&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：Service ExternalIPs 的弃用和移除</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/14/kubernetes-v1-36-deprecation-and-removal-of-service-externalips/</link>
      <pubDate>Thu, 14 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/14/kubernetes-v1-36-deprecation-and-removal-of-service-externalips/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Deprecation and removal of Service ExternalIPs&#34;
date: 2026-05-14T10:35:00-08:00
slug: kubernetes-v1-36-deprecation-and-removal-of-service-externalips # optional
author: &gt;
  Adrian Moisey (independent),
  Dan Winship (Red Hat),
--&gt;
&lt;!--
The `.spec.externalIPs` field for [Service](/docs/concepts/services-networking/service/) was an early attempt to provide
cloud-load-balancer-like functionality for non-cloud clusters.
Unfortunately, the API assumes that every user in the cluster is fully
trusted, and in any situation where that is not the case, it enables
various security exploits, as described in
[CVE-2020-8554](https://www.cvedetails.com/cve/CVE-2020-8554/).
--&gt;
&lt;p&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/services-networking/service/&#34;&gt;Service&lt;/a&gt; 的
&lt;code&gt;.spec.externalIPs&lt;/code&gt; 字段是为非云集群提供类似云负载均衡器功能的早期尝试。
不幸的是，该 API 假设集群中的每个用户都是完全可信的，
而在任何不满足此条件的情况下，它会导致各种安全漏洞，
如 &lt;a href=&#34;https://www.cvedetails.com/cve/CVE-2020-8554/&#34;&gt;CVE-2020-8554&lt;/a&gt; 中所述。&lt;/p&gt;
&lt;!--
Since Kubernetes 1.21, the Kubernetes project has recommended that all users disable
`.spec.externalIPs`. To make that easier, Kubernetes also added an admission controller
(`DenyServiceExternalIPs`) that can be enabled to do this. At the time,
SIG Network felt that blocking the functionality by default was too large a
breaking change to consider.
--&gt;
&lt;p&gt;自 Kubernetes 1.21 起，Kubernetes 项目建议所有用户禁用 &lt;code&gt;.spec.externalIPs&lt;/code&gt;。
为了简化这一过程，Kubernetes 还添加了一个准入控制器（&lt;code&gt;DenyServiceExternalIPs&lt;/code&gt;），
可以启用它来实现此目的。当时，SIG Network 认为默认阻止该特性是一个太大的破坏性变更，不予考虑。&lt;/p&gt;
&lt;!--
However, the security problems are still there, and as a project we&#39;re increasingly
unhappy with the &#34;insecure by default&#34; state of the feature.
Additionally, there are now several better alternatives for non-cloud
clusters wanting load-balancer-like functionality.
--&gt;
&lt;p&gt;然而，安全问题仍然存在，作为一个项目，我们对该特性&amp;quot;默认不安全&amp;quot;的状态越来越不满意。
此外，对于想要类似负载均衡器功能的非云集群，现在有几种更好的替代方案。&lt;/p&gt;
&lt;!--
As a result, the `.spec.externalIPs` field for Service is now formally deprecated in Kubernetes 1.36.
We expect that a future minor release of Kubernetes will drop
implementation of the behavior from `kube-proxy`, and will update the
Kubernetes [conformance](https://www.cncf.io/training/certification/software-conformance/) criteria to require that conforming implementations
**do not** provide support.
--&gt;
&lt;p&gt;因此，Service 的 &lt;code&gt;.spec.externalIPs&lt;/code&gt; 字段现在在 Kubernetes 1.36 中正式弃用。
我们预计 Kubernetes 的未来次要版本将从 &lt;code&gt;kube-proxy&lt;/code&gt; 中删除该行为的实现，
并更新 Kubernetes &lt;a href=&#34;https://www.cncf.io/training/certification/software-conformance/&#34;&gt;一致性&lt;/a&gt;标准，
要求一致性实现&lt;strong&gt;不&lt;/strong&gt;提供支持。&lt;/p&gt;
&lt;!--
## A note on terminology, and what hasn&#39;t been deprecated {#terminology}
--&gt;
&lt;h2 id=&#34;terminology&#34;&gt;关于术语的说明，以及未被弃用的内容  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#terminology&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The phrase _external IP_ is somewhat overloaded in Kubernetes:
--&gt;
&lt;p&gt;短语 &lt;strong&gt;external IP&lt;/strong&gt; 在 Kubernetes 中有些过度使用：&lt;/p&gt;
&lt;!--
  - The Service API has a field `.spec.externalIPs` that can be used
    to add additional IP addresses that a Service will respond on.
--&gt;
&lt;ul&gt;
&lt;li&gt;Service API 有一个字段 &lt;code&gt;.spec.externalIPs&lt;/code&gt;，可用于添加 Service 将响应的额外 IP 地址。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
  - The Node API&#39;s `.status.addresses` field can list addresses of
    several different types, one of which is called `ExternalIP`.
--&gt;
&lt;ul&gt;
&lt;li&gt;Node API 的 &lt;code&gt;.status.addresses&lt;/code&gt; 字段可以列出几种不同类型的地址，其中一种称为 &lt;code&gt;ExternalIP&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
  - The `kubectl` tool, when displaying information about a Service of type
    LoadBalancer in the default output format, will show the load
    balancer IP address under the column heading `EXTERNAL-IP`.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kubectl&lt;/code&gt; 工具在以默认输出格式显示 LoadBalancer 类型的 Service 信息时，
会在列标题 &lt;code&gt;EXTERNAL-IP&lt;/code&gt; 下显示负载均衡器 IP 地址。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
This deprecation is about the first of those. If you are not setting
the field `externalIPs` in any of your Services, then it does not
apply to you.
--&gt;
&lt;p&gt;此弃用是关于第一项的。如果你没有在任何 Service 中设置 &lt;code&gt;externalIPs&lt;/code&gt; 字段，则这不适用于你。&lt;/p&gt;
&lt;!--
That said, as a precaution, you may still want to enable the [DenyServiceExternalIPs](/docs/reference/access-authn-authz/admission-controllers/#denyserviceexternalips) admission controller to
block any future use of the `externalIPs` field.
--&gt;
&lt;p&gt;话虽如此，作为预防措施，你可能仍希望启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/access-authn-authz/admission-controllers/#denyserviceexternalips&#34;&gt;DenyServiceExternalIPs&lt;/a&gt;
准入控制器来阻止将来对 &lt;code&gt;externalIPs&lt;/code&gt; 字段的任何使用。&lt;/p&gt;
&lt;!--
## Alternatives to `externalIPs` {#alternatives}
--&gt;
&lt;h2 id=&#34;alternatives&#34;&gt;&lt;code&gt;externalIPs&lt;/code&gt; 的替代方案&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#alternatives&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you are using `.spec.externalIPs`, then there are several alternatives.
--&gt;
&lt;p&gt;如果你正在使用 &lt;code&gt;.spec.externalIPs&lt;/code&gt;，那么有几种替代方案。&lt;/p&gt;
&lt;!--
Consider a Service like the following:
--&gt;
&lt;p&gt;考虑如下的 Service：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-example-service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterIP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;selector&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-example-app&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;ports&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;protocol&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;TCP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;targetPort&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;8080&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;externalIPs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;192.0.2.4&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Using manually-managed LoadBalancer Services instead of `externalIPs` {#alternative-LoadBalancer}
--&gt;
&lt;h3 id=&#34;alternative-LoadBalancer&#34;&gt;使用手动管理的 LoadBalancer Service 代替 &lt;code&gt;externalIPs&lt;/code&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#alternative-LoadBalancer&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The easiest (but also worst) option is to just switch from using
`externalIPs` to using a `type: LoadBalancer` service, and assigning a
load balancer IP by hand. This is, essentially, exactly the same as
`externalIPs`, with one important difference: the load balancer IP is
part of the Service&#39;s `.status`, not its `.spec`, and in a cluster
with RBAC enabled, it can&#39;t be edited by ordinary users by default.
Thus, this replacement for `externalIPs` would only be available to
users who were given permission by the admins (although those users
would then be fully empowered to replicate CVE-2020-8554; there would
still not be any further checks to ensure that one user wasn&#39;t
stealing another user&#39;s IPs, etc.)
--&gt;
&lt;p&gt;最简单（但也最糟糕）的选择是从使用 &lt;code&gt;externalIPs&lt;/code&gt; 切换到使用 &lt;code&gt;type: LoadBalancer&lt;/code&gt; 服务，
并手动分配负载均衡器 IP。这本质上与 &lt;code&gt;externalIPs&lt;/code&gt; 完全相同，
但有一个重要区别：负载均衡器 IP 是 Service 的 &lt;code&gt;.status&lt;/code&gt; 的一部分，
而不是 &lt;code&gt;.spec&lt;/code&gt;，在启用 RBAC 的集群中，默认情况下普通用户无法编辑它。
因此，这种 &lt;code&gt;externalIPs&lt;/code&gt; 的替代方案仅对管理员授予权限的用户可用
（尽管这些用户随后将完全有能力复制 CVE-2020-8554；
仍然不会有任何进一步的检查来确保一个用户没有窃取另一个用户的 IP 等）。&lt;/p&gt;
&lt;!--
Because of the way that `.status` works in Kubernetes, you must create the
Service without a load balancer IP, and then add the IP as a second step:
--&gt;
&lt;p&gt;由于 &lt;code&gt;.status&lt;/code&gt; 在 Kubernetes 中的工作方式，你必须创建不带负载均衡器 IP 的 Service，
然后在第二步添加 IP：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000080;font-weight:bold&#34;&gt;$&lt;/span&gt; cat loadbalancer-service.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;apiVersion: v1
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;kind: Service
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;metadata:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;  name: my-example-service
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;spec:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;  # prevent any real load balancer controllers from managing this service
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;  # by using a non-existent loadBalancerClass
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;  loadBalancerClass: non-existent-class
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;  type: LoadBalancer
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;  selector:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;    app.kubernetes.io/name: my-example-app
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;  ports:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;    - protocol: TCP
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;      port: 80
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;      targetPort: 8080
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#000080;font-weight:bold&#34;&gt;$&lt;/span&gt; kubectl apply -f loadbalancer-service.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;service/my-example-service created
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#000080;font-weight:bold&#34;&gt;$&lt;/span&gt; kubectl patch service my-example-service --subresource&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;status --type&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;merge -p &lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;{&amp;#34;status&amp;#34;:{&amp;#34;loadBalancer&amp;#34;:{&amp;#34;ingress&amp;#34;:[{&amp;#34;ip&amp;#34;:&amp;#34;192.0.2.4&amp;#34;}]}}}&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Using a non-cloud based load balancer controller {#alternative-load-balancer-controller}
--&gt;
&lt;h3 id=&#34;alternative-load-balancer-controller&#34;&gt;使用非云负载均衡器控制器&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#alternative-load-balancer-controller&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Although `LoadBalancer` services were originally designed to be backed by
cloud load balancers, Kubernetes can also support them on non-cloud platforms
by using a third-party load balancer controller such as [MetalLB](https://metallb.io/).
This solves the security problems associated with `externalIPs` because the
administrator can configure what ranges of IP addresses the controller will assign
to services, and the controller will ensure that two services can&#39;t both use the same
IP.
--&gt;
&lt;p&gt;虽然 &lt;code&gt;LoadBalancer&lt;/code&gt; 服务最初设计为由云负载均衡器支持，
但 Kubernetes 也可以通过使用第三方负载均衡器控制器（如 &lt;a href=&#34;https://metallb.io/&#34;&gt;MetalLB&lt;/a&gt;）
在非云平台上支持它们。
这解决了与 &lt;code&gt;externalIPs&lt;/code&gt; 相关的安全问题，因为管理员可以配置控制器将分配给服务的 IP 地址范围，
并且控制器将确保两个服务不能同时使用同一个 IP。&lt;/p&gt;
&lt;!--
So, for example, after [installing](https://metallb.io/installation/) and
[configuring](https://metallb.io/configuration/) MetalLB, a cluster administrator
could configure a pool of IP addresses for use in the cluster:
--&gt;
&lt;p&gt;因此，例如，在&lt;a href=&#34;https://metallb.io/installation/&#34;&gt;安装&lt;/a&gt;和
&lt;a href=&#34;https://metallb.io/configuration/&#34;&gt;配置&lt;/a&gt; MetalLB 后，
集群管理员可以配置集群中使用的 IP 地址池：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;metallb.io/v1beta1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;IPAddressPool&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;production&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;metallb-system&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;addresses&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#666&#34;&gt;192.0.2.0&lt;/span&gt;/24&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;autoAssign&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;avoidBuggyIPs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
After which a user can create a `type: LoadBalancer` Service and MetalLB will handle the
assignment of the IP address. MetalLB even supports the deprecated `loadBalancerIP`
field in Service, so the end user can request a specific IP (assuming it is available)
for backward-compatibility with the `externalIPs` approach, rather than being
assigned one at random:
--&gt;
&lt;p&gt;之后，用户可以创建 &lt;code&gt;type: LoadBalancer&lt;/code&gt; Service，MetalLB 将处理 IP 地址的分配。
MetalLB 甚至支持 Service 中已弃用的 &lt;code&gt;loadBalancerIP&lt;/code&gt; 字段，
因此最终用户可以请求特定的 IP（假设可用）以实现与 &lt;code&gt;externalIPs&lt;/code&gt; 方法的向后兼容性，
而不是随机分配一个：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-example-service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;LoadBalancer&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;selector&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-example-app&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;ports&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;protocol&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;TCP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;targetPort&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;8080&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;loadBalancerIP&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;192.0.2.4&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Similar approaches would work with other load balancer controllers.
This approach can allow cluster administrators to have control over which IP addresses are assigned,
rather than users.
--&gt;
&lt;p&gt;类似的方法也适用于其他负载均衡器控制器。
这种方法允许集群管理员控制分配哪些 IP 地址，而不是由用户控制。&lt;/p&gt;
&lt;!--
### Using Gateway API {#alternative-gateway-api}
--&gt;
&lt;h3 id=&#34;alternative-gateway-api&#34;&gt;使用 Gateway API&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#alternative-gateway-api&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Another potential solution is to use an implementation of the
[Gateway API](https://gateway-api.sigs.k8s.io/).
--&gt;
&lt;p&gt;另一个可能的解决方案是使用
&lt;a href=&#34;https://gateway-api.sigs.k8s.io/&#34;&gt;Gateway API&lt;/a&gt; 的实现。&lt;/p&gt;
&lt;!--
Gateway API allows cluster administrators to define a Gateway resource, which can have an IP address
attached to it via the `.spec.addresses` field. Since Gateway resources are designed to be managed by
[cluster administrators](https://gateway-api.sigs.k8s.io/concepts/security/), RBAC rules can be put in place to only allow privileged users to manage them.
--&gt;
&lt;p&gt;Gateway API 允许集群管理员定义 Gateway 资源，
该资源可以通过 &lt;code&gt;.spec.addresses&lt;/code&gt; 字段附加 IP 地址。
由于 Gateway 资源设计为由&lt;a href=&#34;https://gateway-api.sigs.k8s.io/concepts/security/&#34;&gt;集群管理员&lt;/a&gt;管理，
因此可以设置 RBAC 规则，仅允许特权用户管理它们。&lt;/p&gt;
&lt;!--
An example of how this could look is:
--&gt;
&lt;p&gt;示例如下：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Gateway&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-gateway&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gatewayClassName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-gateway-class&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;addresses&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;IPAddress&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;192.0.2.4&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTPRoute&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-route&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;parentRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-gateway&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;backendRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-svc&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-svc&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterIP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;selector&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-app&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;ports&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;protocol&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;TCP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;targetPort&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;8080&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
The Gateway API project is the next generation of Kubernetes Ingress, Load Balancing, and Service Mesh APIs within Kubernetes.
Gateway API was designed to fix the shortcomings of the Service and Ingress resource, making it a very reliable robust solution
that is under active development.
--&gt;
&lt;p&gt;Gateway API 项目是 Kubernetes 中 Kubernetes Ingress、负载均衡和服务网格 API 的下一代。
Gateway API 旨在修复 Service 和 Ingress 资源的缺点，
使其成为正在积极开发的非常可靠的稳健解决方案。&lt;/p&gt;
&lt;!--
## Timeline for `externalIPs` deprecation
--&gt;
&lt;h2 id=&#34;externalips-弃用时间表&#34;&gt;&lt;code&gt;externalIPs&lt;/code&gt; 弃用时间表&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#externalips-%e5%bc%83%e7%94%a8%e6%97%b6%e9%97%b4%e8%a1%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The rough timeline for this deprecation is as follows:
--&gt;
&lt;p&gt;此弃用的粗略时间表如下：&lt;/p&gt;
&lt;!--
1. With the release of Kubernetes 1.36, the field was deprecated;
   Kubernetes now emits [warnings](/blog/2020/09/03/warnings/) when a user uses this field
2. About a year later (v1.40 at the earliest) support for `.spec.externalIPs` will be disabled in kube-proxy, but users will have a way to opt back in should they require more time to migrate away
3. About another year later - (v1.43 at the earliest) support will be disabled completely; users won&#39;t have a way to opt back in
--&gt;
&lt;ol&gt;
&lt;li&gt;随着 Kubernetes 1.36 的发布，该字段被弃用；
当用户使用此字段时，Kubernetes 现在会发出&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2020/09/03/warnings/&#34;&gt;警告&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;大约一年后（最早为 v1.40），对 &lt;code&gt;.spec.externalIPs&lt;/code&gt; 的支持将在 kube-proxy 中被禁用，
但用户将有一种方法可以选择重新启用，以便他们需要更多时间进行迁移&lt;/li&gt;
&lt;li&gt;大约再过一年后（最早为 v1.43），支持将被完全禁用；用户将无法选择重新启用&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：工作负载感知调度再进一步</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/13/kubernetes-v1-36-advancing-workload-aware-scheduling/</link>
      <pubDate>Wed, 13 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/13/kubernetes-v1-36-advancing-workload-aware-scheduling/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Advancing Workload-Aware Scheduling&#34;
date: 2026-05-13T10:35:00-08:00
slug: kubernetes-v1-36-advancing-workload-aware-scheduling
author: &gt;
  Maciej Skoczeń (Google),
  Antoni Zawodny (Google),
  Matt Matejczyk (Google),
  Bartosz Rejman (Google),
  Jon Huhn (Microsoft),
  Maciej Wyrzuc (Google),
  Heba Elayoty (Microsoft)
--&gt;
&lt;!--
AI/ML and batch workloads introduce unique scheduling challenges that go beyond simple Pod-by-Pod scheduling.
In Kubernetes v1.35, we introduced the first tranche of *workload-aware scheduling* improvements,
featuring the foundational Workload API alongside basic *gang scheduling* support built on a Pod-based framework,
and an *opportunistic batching* feature to efficiently process identical Pods.
--&gt;
&lt;p&gt;AI/ML 和批处理工作负载带来了独特的调度挑战，已经超出了简单逐个 Pod 调度的范畴。
在 Kubernetes v1.35 中，我们引入了首批&lt;strong&gt;工作负载感知调度&lt;/strong&gt;改进，
其中包括基础性的 Workload API、基于 Pod 框架构建的基本&lt;strong&gt;编组调度&lt;/strong&gt;支持，
以及用于高效处理相同 Pod 的&lt;strong&gt;机会性批处理&lt;/strong&gt;特性。&lt;/p&gt;
&lt;!--
Kubernetes v1.36 introduces a significant architectural evolution by cleanly separating API concerns:
the Workload API acts as a static template, while the new PodGroup API handles the runtime state.
To support this, the `kube-scheduler` features a new *PodGroup scheduling cycle* that enables atomic workload processing
and paves the way for future enhancements. This release also debuts the first iterations of *topology-aware scheduling*
and *workload-aware preemption* to advance scheduling capabilities. Additionally,
*ResourceClaim support for workloads* unlocks *Dynamic Resource Allocation
([DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/))* for PodGroups. Finally,
to demonstrate real-world readiness, v1.36 delivers the first phase of integration between the Job controller and the new API.
--&gt;
&lt;p&gt;Kubernetes v1.36 通过清晰分离 API 关注点，引入了一项重要的架构演进：
Workload API 充当静态模板，而新的 PodGroup API 负责处理运行时状态。
为了支持这一点，&lt;code&gt;kube-scheduler&lt;/code&gt; 提供了新的 &lt;strong&gt;PodGroup 调度周期&lt;/strong&gt;，
支持以原子方式处理工作负载，并为未来增强铺平道路。
此版本还首次推出了&lt;strong&gt;拓扑感知调度&lt;/strong&gt;和&lt;strong&gt;工作负载感知抢占&lt;/strong&gt;的初始迭代，以推进调度能力。
此外，&lt;strong&gt;工作负载的 ResourceClaim 支持&lt;/strong&gt;为 PodGroup 解锁了&lt;strong&gt;动态资源分配
（&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/&#34;&gt;DRA&lt;/a&gt;）&lt;/strong&gt;。
最后，为了展示其面向真实场景的就绪程度，v1.36 交付了 Job 控制器与新 API 集成的第一阶段。&lt;/p&gt;
&lt;!--
## Workload and PodGroup API updates
--&gt;
&lt;h2 id=&#34;workload-和-podgroup-api-更新&#34;&gt;Workload 和 PodGroup API 更新&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#workload-%e5%92%8c-podgroup-api-%e6%9b%b4%e6%96%b0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The Workload API now serves as a static template, while the new PodGroup API describes the runtime object.
Kubernetes v1.36 introduces the Workload and PodGroup APIs as part of the
`scheduling.k8s.io/v1alpha2` &lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes API 中的一组相关路径。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning&#39; target=&#39;_blank&#39; aria-label=&#39;API group&#39;&gt;API group&lt;/a&gt;,
completely replacing the previous `v1alpha1` API version.
--&gt;
&lt;p&gt;Workload API 现在用作静态模板，而新的 PodGroup API 描述运行时对象。
Kubernetes v1.36 将 Workload 和 PodGroup API 作为
&lt;code&gt;scheduling.k8s.io/v1alpha2&lt;/code&gt; &lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes API 中的一组相关路径。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning&#39; target=&#39;_blank&#39; aria-label=&#39;API 组&#39;&gt;API 组&lt;/a&gt;的一部分引入，
完全替代此前的 &lt;code&gt;v1alpha1&lt;/code&gt; API 版本。&lt;/p&gt;
&lt;!--
In v1.35, Pod groups and their runtime states were embedded within the Workload resource.
The new model decouples these concepts: the Workload now serves as a static template object,
while the PodGroup manages the runtime state. This separation also improves performance and scalability
as the PodGroup API allows per-replica sharding of status updates.
--&gt;
&lt;p&gt;在 v1.35 中，Pod 组及其运行时状态嵌入在 Workload 资源中。
新模型解耦了这些概念：Workload 现在充当静态模板对象，
而 PodGroup 负责管理运行时状态。
这种分离也提升了性能和可扩缩性，因为 PodGroup API 允许按副本对状态更新进行分片。&lt;/p&gt;
&lt;!--
Because the Workload API acts merely as a template, the `kube-scheduler`&#39;s logic is streamlined.
The scheduler can directly read the PodGroup, which contains all the information required by the scheduler,
without needing to watch or parse the Workload object itself.
--&gt;
&lt;p&gt;由于 Workload API 仅作为模板存在，&lt;code&gt;kube-scheduler&lt;/code&gt; 的逻辑得以简化。
调度器可以直接读取 PodGroup；PodGroup 包含调度器所需的全部信息，
因此调度器无需监视或解析 Workload 对象本身。&lt;/p&gt;
&lt;!--
Here is what the updated configuration looks like. Workload controllers (such as the Job controller)
define the Workload object, which now acts as a static template for your Pod groups:
--&gt;
&lt;p&gt;更新后的配置如下所示。工作负载控制器（例如 Job 控制器）
定义 Workload 对象，而这个对象现在充当 Pod 组的静态模板：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;scheduling.k8s.io/v1alpha2&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Workload&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workload&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;some-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# Pod 组现在定义为模板，&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 其中包含 PodGroup 对象的 spec 字段。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;podGroupTemplates&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;workers&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;schedulingPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gang&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 仅当 4 个 Pod 可以同时运行时，此 gang 才可调度&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;minCount&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Controllers then stamp out runtime PodGroup instances based on those templates.
The PodGroup runtime object holds the actual scheduling policy and references the template from which it was created.
It also has a status containing conditions that mirror the states of individual Pods,
reflecting the overall scheduling state of the group:
--&gt;
&lt;p&gt;随后，控制器基于这些模板生成运行时 PodGroup 实例。
PodGroup 运行时对象保存实际的调度策略，并引用创建它所用的模板。
它还包含一个状态字段，其中的状况会映射各个 Pod 的状态，
反映这个组的整体调度状态：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;scheduling.k8s.io/v1alpha2&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PodGroup&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workers-pg&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;some-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# PodGroup 引用其来源 Workload 模板。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 相比之下，.metadata.ownerReferences 指向“真正的”工作负载对象，&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 例如 Job。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;podGroupTemplateRef&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;workload&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;workloadName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workload&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;podGroupTemplateName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;workers&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 实际的调度策略放在运行时 PodGroup 中&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;schedulingPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gang&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;minCount&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;status&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# status 包含映射各个 Pod 状况的状况信息。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;conditions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PodGroupScheduled&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;status&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;True&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;lastTransitionTime&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;2026-04-03T00:00:00Z&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Finally, to bridge this new architecture with individual Pods, the `workloadRef` field in the Pod API has been replaced
with the `schedulingGroup` field. When creating Pods, you link them directly to the runtime PodGroup:
--&gt;
&lt;p&gt;最后，为了将这一新架构与各个 Pod 衔接起来，Pod API 中的 &lt;code&gt;workloadRef&lt;/code&gt; 字段已被
&lt;code&gt;schedulingGroup&lt;/code&gt; 字段替代。创建 Pod 时，你可以将它们直接关联到运行时 PodGroup：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;worker-0&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;some-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# workloadRef 字段已被 schedulingGroup 替代&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;schedulingGroup&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;podGroupName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workers-pg&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;...&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
By keeping the Workload as a static template and elevating the PodGroup to a first-class, standalone API,
we establish a robust foundation for building advanced workload scheduling capabilities in future Kubernetes releases.
--&gt;
&lt;p&gt;通过将 Workload 保持为静态模板，并将 PodGroup 提升为一等、独立的 API，
我们为在未来 Kubernetes 版本中构建高级工作负载调度能力奠定了坚实基础。&lt;/p&gt;
&lt;!--
## PodGroup scheduling cycle and gang scheduling
--&gt;
&lt;h2 id=&#34;podgroup-调度周期和编组调度&#34;&gt;PodGroup 调度周期和编组调度&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#podgroup-%e8%b0%83%e5%ba%a6%e5%91%a8%e6%9c%9f%e5%92%8c%e7%bc%96%e7%bb%84%e8%b0%83%e5%ba%a6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To efficiently manage these workloads, the kube-scheduler now features a dedicated *PodGroup scheduling cycle*.
Instead of evaluating and reserving resources sequentially Pod-by-Pod, which risks scheduling deadlocks,
the scheduler evaluates the group as a unified operation.
--&gt;
&lt;p&gt;为了高效管理这些工作负载，kube-scheduler 现在提供了专用的 &lt;strong&gt;PodGroup 调度周期&lt;/strong&gt;。
调度器不再逐个 Pod 顺序评估和预留资源，因为这种方式存在调度死锁风险；
它会把整个组作为一个统一操作来评估。&lt;/p&gt;
&lt;!--
When the scheduler pops a PodGroup member from the scheduling queue, regardless of the group&#39;s specific policy,
it fetches the rest of the queued Pods for that group, sorts them deterministically,
and executes an atomic scheduling cycle as follows:
--&gt;
&lt;p&gt;当调度器从调度队列中弹出某个 PodGroup 成员时，无论该组使用哪种具体策略，
它都会获取该组中其余已排队的 Pod，以确定性方式对它们排序，
并按如下方式执行一个原子的调度周期：&lt;/p&gt;
&lt;!--
1. The scheduler takes a single snapshot of the cluster state to prevent race conditions and ensure consistency
   while evaluating the entire group.

2. It then attempts to find valid Node placements for all Pods in the group using a PodGroup scheduling algorithm,
   which leverages the standard Pod-based filtering and scoring phases.

3. Based on the algorithm&#39;s outcome, the scheduling decision is applied atomically for the entire PodGroup.

   * Success: If the placement is found and group constraints are met, the schedulable member Pods
     are moved directly to the binding phase together. Any remaining unschedulable Pods are returned
     to the scheduling queue to wait for available resources so they can join the already scheduled Pods.

     (Note: If new Pods are added to a PodGroup after others are already scheduled,
     the cycle evaluates the new Pods while accounting for the existing ones.
     Crucially, Pods already assigned to Nodes remain running. The scheduler will not unassign
     or evict them, even if the group fails to meet its requirements in subsequent cycles.)

   * Failure: If the group fails to meet its requirements, the entire group is considered unschedulable.
     None of the Pods are bound, and they are returned to the scheduling queue to retry later after a backoff period.
--&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;调度器对集群状态获取一次快照，以避免竞态条件，并确保在评估整个组时保持一致性。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;随后，调度器尝试使用 PodGroup 调度算法为组内所有 Pod 找到有效的 Node 放置方案；
该算法会利用标准的基于 Pod 的过滤和评分阶段。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;根据算法结果，调度决策会以原子方式应用到整个 PodGroup。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;成功：如果找到了放置方案且满足组约束，可调度的成员 Pod 会一起直接进入绑定阶段。
其余仍不可调度的 Pod 会返回调度队列，等待可用资源，以便之后加入已调度的 Pod。&lt;/p&gt;
&lt;p&gt;（注意：如果在某些 Pod 已经调度后，又有新的 Pod 添加到 PodGroup，
这个周期会在考虑已有 Pod 的同时评估新 Pod。
关键在于，已经分配到 Node 的 Pod 会继续运行。
即使该组在后续周期中未能满足其要求，调度器也不会取消分配或驱逐这些 Pod。）&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;失败：如果该组未能满足其要求，整个组会被视为不可调度。
不会绑定任何 Pod，这些 Pod 会返回调度队列，并在退避期之后稍后重试。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
This cycle acts as the foundation for *gang scheduling*. When your workload requires strict *all-or-nothing* placement,
the `gang` policy leverages this cycle to prevent partial deployments that lead to resource wastage and potential deadlocks.
--&gt;
&lt;p&gt;这个周期是&lt;strong&gt;编组调度&lt;/strong&gt;的基础。
当你的工作负载需要严格的&lt;strong&gt;全有或全无&lt;/strong&gt;放置时，
&lt;code&gt;gang&lt;/code&gt; 策略会利用这个周期，防止部分部署造成资源浪费和潜在死锁。&lt;/p&gt;
&lt;!--
While the scheduler still holds the Pods in the `PreEnqueue` until the `minCount` requirement is met, the actual scheduling phase now relies entirely
on the new PodGroup cycle. Specifically, during the algorithm&#39;s execution, the scheduler verifies
that the number of schedulable Pods satisfies the `minCount`. If the cluster cannot accommodate the required minimum,
none of the pods are bound. The group fails and waits for sufficient resources to free up.
--&gt;
&lt;p&gt;虽然调度器仍会在满足 &lt;code&gt;minCount&lt;/code&gt; 要求之前将 Pod 保留在 &lt;code&gt;PreEnqueue&lt;/code&gt; 中，
但实际调度阶段现在完全依赖新的 PodGroup 周期。
具体而言，在算法执行期间，调度器会验证可调度 Pod 的数量是否满足 &lt;code&gt;minCount&lt;/code&gt;。
如果集群无法容纳所需的最小数量，则不会绑定任何 Pod。
该组调度失败，并等待释放出足够资源。&lt;/p&gt;
&lt;!--
### Limitations
--&gt;
&lt;h3 id=&#34;局限性&#34;&gt;局限性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b1%80%e9%99%90%e6%80%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The first version of the PodGroup scheduling cycle comes with certain limitations:
--&gt;
&lt;p&gt;PodGroup 调度周期的首个版本存在一些局限性：&lt;/p&gt;
&lt;!--
* For basic *homogeneous* Pod groups (i.e., those where all Pods have identical scheduling requirements
  and lack inter-Pod dependencies like affinity, anti-affinity, or topology spread constraints),
  the algorithm is expected to find a placement if one exists.

* For *heterogeneous* Pod groups, finding a valid placement if one exists is not guaranteed,
  even when the solution might seem trivial.

* For Pod groups with *inter-Pod dependencies*, finding a valid placement if one exists is not guaranteed.
--&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;对于基本的&lt;strong&gt;同构&lt;/strong&gt; Pod 组（即所有 Pod 具有相同调度要求，
且不存在亲和性、反亲和性或拓扑分布约束等 Pod 间依赖的 Pod 组），
如果存在可行的放置方案，算法预计能够找到它。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;对于&lt;strong&gt;异构&lt;/strong&gt; Pod 组，即使存在有效的放置方案，也不保证一定能找到，
哪怕这个方案看起来很简单。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;对于存在 &lt;strong&gt;Pod 间依赖&lt;/strong&gt;的 Pod 组，即使存在有效的放置方案，也不保证一定能找到。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
In addition to the above, for cases involving *intra-group dependencies*
(e.g., when the schedulability of one Pod depends on another group member via inter-Pod affinity),
this algorithm may fail to find a placement regardless of cluster state due to its deterministic processing order.
--&gt;
&lt;p&gt;除上述情况外，对于涉及&lt;strong&gt;组内依赖&lt;/strong&gt;的场景
（例如某个 Pod 的可调度性通过 Pod 间亲和性依赖于另一个组成员），
由于该算法采用确定性的处理顺序，无论集群状态如何，都可能无法找到放置方案。&lt;/p&gt;
&lt;!--
## Topology-aware scheduling
--&gt;
&lt;h2 id=&#34;拓扑感知调度&#34;&gt;拓扑感知调度&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%8b%93%e6%89%91%e6%84%9f%e7%9f%a5%e8%b0%83%e5%ba%a6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
For complex distributed workloads like AI/ML training or batch processing, placing Pods randomly across a cluster
can introduce significant network latency and bottleneck overall performance.
--&gt;
&lt;p&gt;对于 AI/ML 训练或批处理这类复杂分布式工作负载，将 Pod 随机放置到整个集群中
可能引入显著的网络延迟，并成为整体性能瓶颈。&lt;/p&gt;
&lt;!--
Topology-aware scheduling addresses this problem by allowing you to define topology constraints directly on a PodGroup,
ensuring its Pods are co-located within specific physical or logical domains:
--&gt;
&lt;p&gt;拓扑感知调度通过允许你直接在 PodGroup 上定义拓扑约束来解决这个问题，
确保其 Pod 被共同放置在特定的物理或逻辑域内：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;scheduling.k8s.io/v1alpha2&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PodGroup&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;topology-aware-workers-pg&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;schedulingPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gang&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;minCount&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 强制 Pod 根据机架拓扑共同放置&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;schedulingConstraints&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;topology&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;topology.kubernetes.io/rack&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
In this example, the `kube-scheduler` attempts to schedule the Pods across various combinations of Nodes
that match the `rack` topology constraint. It then selects the optimal placement based on how efficiently
the PodGroup utilizes resources and how many Pods can successfully be scheduled within that domain.
--&gt;
&lt;p&gt;在这个示例中，&lt;code&gt;kube-scheduler&lt;/code&gt; 会尝试将 Pod 调度到符合 &lt;code&gt;rack&lt;/code&gt; 拓扑约束的多种 Node 组合上。
随后，它会根据 PodGroup 利用资源的效率，以及在该域内可以成功调度多少 Pod，
选择最优放置方案。&lt;/p&gt;
&lt;!--
To achieve this, the scheduler extends the PodGroup scheduling cycle with a dedicated placement-based algorithm
consisting of three phases:
--&gt;
&lt;p&gt;为实现这一点，调度器用一个专用的、基于放置方案的算法扩展了 PodGroup 调度周期；
该算法包含三个阶段：&lt;/p&gt;
&lt;!--
1. Generate candidate placements (subsets of Nodes that are theoretically feasible for the PodGroup&#39;s assignment)
   based on the group&#39;s scheduling constraints. The topology-aware scheduling plugin uses the new `PlacementGenerate`
   extension point to create these placements.

2. Evaluate each proposed placement to confirm whether the entire PodGroup can actually fit there.

3. Score all feasible placements to select the best fit for the PodGroup. The topology-aware scheduling plugins
   use the new `PlacementScore` extension point to score these placements.
--&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;根据组的调度约束生成候选放置方案
（理论上适合分配给 PodGroup 的 Node 子集）。
拓扑感知调度插件使用新的 &lt;code&gt;PlacementGenerate&lt;/code&gt; 扩展点创建这些放置方案。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;评估每个候选放置方案，确认整个 PodGroup 是否实际能够放入其中。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;对所有可行的放置方案打分，为 PodGroup 选择最合适的方案。
拓扑感知调度插件使用新的 &lt;code&gt;PlacementScore&lt;/code&gt; 扩展点对这些放置方案进行打分。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
Currently, topology-aware scheduling does not trigger Pod preemption to satisfy constraints.
However, we plan to integrate workload-aware preemption with topology constraints in the upcoming release.
--&gt;
&lt;p&gt;目前，拓扑感知调度不会触发 Pod 抢占来满足约束。
不过，我们计划在即将到来的版本中，将工作负载感知抢占与拓扑约束集成起来。&lt;/p&gt;
&lt;!--
While Kubernetes v1.36 delivers this foundational topology-aware scheduling, the Kubernetes project is planning
expand its capabilities soon. Future updates will introduce support for multiple topology levels,
soft constraints (preferences), deeper integration with Dynamic Resource Allocation (DRA),
and more robust behavior when paired with the `basic` scheduling policy.
--&gt;
&lt;p&gt;虽然 Kubernetes v1.36 交付了这一基础性的拓扑感知调度能力，
Kubernetes 项目计划很快扩展其能力。
未来更新将引入对多级拓扑、软约束（偏好）的支持，
与动态资源分配（DRA）的更深度集成，
以及在与 &lt;code&gt;basic&lt;/code&gt; 调度策略配合使用时更稳健的行为。&lt;/p&gt;
&lt;!--
## Workload-aware preemption
--&gt;
&lt;h2 id=&#34;工作负载感知抢占&#34;&gt;工作负载感知抢占&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b7%a5%e4%bd%9c%e8%b4%9f%e8%bd%bd%e6%84%9f%e7%9f%a5%e6%8a%a2%e5%8d%a0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To support the new PodGroup scheduling cycle, Kubernetes v1.36 introduces a new type of preemption mechanism
called *workload-aware preemption*. When a PodGroup cannot be scheduled, the scheduler utilizes this mechanism
to try making a scheduling of this PodGroup possible.
--&gt;
&lt;p&gt;为了支持新的 PodGroup 调度周期，Kubernetes v1.36 引入了一种新的抢占机制，
称为&lt;strong&gt;工作负载感知抢占&lt;/strong&gt;。
当某个 PodGroup 无法调度时，调度器会利用这一机制尝试让该 PodGroup 的调度成为可能。&lt;/p&gt;
&lt;!--
Compared to the default preemption used in the standard Pod-by-Pod scheduling cycle, this new mechanism
treats the entire PodGroup as a single preemptor unit. Instead of evaluating preemption victims on each Node separately,
it searches across the entire cluster. This allows the scheduler to preempt Pods from multiple Nodes simultaneously,
making enough space to schedule the whole PodGroup afterwards.
--&gt;
&lt;p&gt;与标准逐个 Pod 调度周期中使用的默认抢占相比，这种新机制会将整个 PodGroup 视为单个抢占者单元。
它不会在每个 Node 上单独评估抢占牺牲者，而是在整个集群范围内搜索。
这允许调度器同时从多个 Node 抢占 Pod，
从而为随后调度整个 PodGroup 腾出足够空间。&lt;/p&gt;
&lt;!--
Workload-aware preemption also introduces two additional concepts directly to the PodGroup API:

* PodGroup `priority` that overrides the priority of the individual Pods forming the PodGroup.

* PodGroup `disruptionMode` that dictates whether the Pods within a PodGroup can be preempted independently,
  or if they have to be preempted together in an *all-or-nothing* fashion.
--&gt;
&lt;p&gt;工作负载感知抢占还直接向 PodGroup API 引入了两个额外概念：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;PodGroup &lt;code&gt;priority&lt;/code&gt;：覆盖构成 PodGroup 的各个 Pod 的优先级。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;PodGroup &lt;code&gt;disruptionMode&lt;/code&gt;：指定 PodGroup 中的 Pod 是否可以独立被抢占，
或者是否必须以&lt;strong&gt;全有或全无&lt;/strong&gt;的方式一起被抢占。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
In Kubernetes v1.36, these fields are only respected by the workload-aware preemption mechanism.
The people working on this set of features are hoping to extend support for these fields
to other disruption sources, including default preemption used in the Pod-by-Pod scheduling cycle, in future releases.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，只有工作负载感知抢占机制会遵从这些字段。
负责这组特性的人员希望在未来版本中，
将这些字段的支持扩展到其他中断来源，
包括逐个 Pod 调度周期中使用的默认抢占。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;scheduling.k8s.io/v1alpha2&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PodGroup&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;victim-pg&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;priorityClassName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;high-priority&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;priority&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;1000&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;disruptionMode&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PodGroup&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
In this example, when the scheduler evaluates `victim-pg` as a potential preemption victim
during a workload-aware preemption cycle, it will use 1000 as its priority and preempt the PodGroup
in a strictly *all-or-nothing* fashion.
--&gt;
&lt;p&gt;在这个示例中，当调度器在工作负载感知抢占周期中将 &lt;code&gt;victim-pg&lt;/code&gt;
作为潜在抢占牺牲者进行评估时，
它会使用 1000 作为其优先级，并以严格的&lt;strong&gt;全有或全无&lt;/strong&gt;方式抢占该 PodGroup。&lt;/p&gt;
&lt;!--
## DRA ResourceClaim support for workloads
--&gt;
&lt;h2 id=&#34;工作负载的-dra-resourceclaim-支持&#34;&gt;工作负载的 DRA ResourceClaim 支持&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b7%a5%e4%bd%9c%e8%b4%9f%e8%bd%bd%e7%9a%84-dra-resourceclaim-%e6%94%af%e6%8c%81&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Since its general availability in Kubernetes v1.34, &lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes 提供的一项特性，用于在 Pod 之间请求和共享资源，例如硬件加速器。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/&#39; target=&#39;_blank&#39; aria-label=&#39;DRA&#39;&gt;DRA&lt;/a&gt;
has enabled Pods to make detailed requests for &lt;a class=&#39;glossary-tooltip&#39; title=&#39;直接或间接挂接到集群节点上的所有资源，例如 GPU 或电路板。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/glossary/?all=true#term-device&#39; target=&#39;_blank&#39; aria-label=&#39;devices&#39;&gt;devices&lt;/a&gt;
like GPUs, TPUs, and NICs. Requested devices can be shared by multiple Pods
requesting the same &lt;a class=&#39;glossary-tooltip&#39; title=&#39;描述工作负载所需的资源，例如设备。ResourceClaim 可以针对某些 DeviceClass 请求设备。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#resourceclaims-templates&#39; target=&#39;_blank&#39; aria-label=&#39;ResourceClaim&#39;&gt;ResourceClaim&lt;/a&gt;
by name. Other requests can be replicated through a &lt;a class=&#39;glossary-tooltip&#39; title=&#39;定义一个模板，Kubernetes 据此创建 ResourceClaim。此模板用于为每个 Pod 提供对一些独立、相似的资源的访问权限。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#resourceclaims-templates&#39; target=&#39;_blank&#39; aria-label=&#39;ResourceClaimTemplate&#39;&gt;ResourceClaimTemplate&lt;/a&gt;,
in which Kubernetes generates one ResourceClaim with a non-deterministic name
for each Pod referencing the template. However, large-scale workloads that require
certain Pods to share certain devices are currently left to manage creating
individual ResourceClaims themselves.
--&gt;
&lt;p&gt;自 Kubernetes v1.34 正式可用以来，&lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes 提供的一项特性，用于在 Pod 之间请求和共享资源，例如硬件加速器。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/&#39; target=&#39;_blank&#39; aria-label=&#39;DRA&#39;&gt;DRA&lt;/a&gt;
已经让 Pod 能够对 GPU、TPU 和 NIC 等&lt;a class=&#39;glossary-tooltip&#39; title=&#39;直接或间接挂接到集群节点上的所有资源，例如 GPU 或电路板。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/glossary/?all=true#term-device&#39; target=&#39;_blank&#39; aria-label=&#39;设备&#39;&gt;设备&lt;/a&gt;
提出详细请求。所请求的设备可以由多个按名称请求同一个
&lt;a class=&#39;glossary-tooltip&#39; title=&#39;描述工作负载所需的资源，例如设备。ResourceClaim 可以针对某些 DeviceClass 请求设备。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#resourceclaims-templates&#39; target=&#39;_blank&#39; aria-label=&#39;ResourceClaim&#39;&gt;ResourceClaim&lt;/a&gt; 的 Pod 共享。
其他请求可以通过 &lt;a class=&#39;glossary-tooltip&#39; title=&#39;定义一个模板，Kubernetes 据此创建 ResourceClaim。此模板用于为每个 Pod 提供对一些独立、相似的资源的访问权限。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#resourceclaims-templates&#39; target=&#39;_blank&#39; aria-label=&#39;ResourceClaimTemplate&#39;&gt;ResourceClaimTemplate&lt;/a&gt; 进行复制；
在这种情况下，Kubernetes 会为每个引用该模板的 Pod 生成一个名称非确定性的 ResourceClaim。
然而，对于需要让某些 Pod 共享某些设备的大规模工作负载，
目前仍需要自行管理各个 ResourceClaim 的创建。&lt;/p&gt;
&lt;!--
Now, in addition to Pods, PodGroups can represent the replicable unit for a
ResourceClaimTemplate. For ResourceClaimTemplates referenced by one of a
PodGroup&#39;s `spec.resourceClaims`, Kubernetes generates one ResourceClaim for the
entire PodGroup, no matter how many Pods are in the group. When one of a Pod&#39;s
`spec.resourceClaims` for a ResourceClaimTemplate matches one of its PodGroup&#39;s
`spec.resourceClaims`, the Pod&#39;s claim resolves to the ResourceClaim generated
for the PodGroup and a ResourceClaim will not be generated for that individual
Pod. A single PodGroupTemplate in a Workload object can express resource
requests which are both copied for each distinct PodGroup and shareable by the
Pods within each group.
--&gt;
&lt;p&gt;现在，除了 Pod 之外，PodGroup 也可以表示 ResourceClaimTemplate 的可复制单元。
对于 PodGroup 的某个 &lt;code&gt;spec.resourceClaims&lt;/code&gt; 所引用的 ResourceClaimTemplate，
无论组内有多少 Pod，Kubernetes 都会为整个 PodGroup 生成一个 ResourceClaim。
当 Pod 中用于 ResourceClaimTemplate 的某个 &lt;code&gt;spec.resourceClaims&lt;/code&gt;
与其 PodGroup 中的某个 &lt;code&gt;spec.resourceClaims&lt;/code&gt; 匹配时，
该 Pod 的申领会解析为为 PodGroup 生成的 ResourceClaim，
并且不会为这个单独的 Pod 生成 ResourceClaim。
Workload 对象中的单个 PodGroupTemplate 可以表达一种资源请求：
这种请求既会为每个不同的 PodGroup 复制，
又可由每个组内的 Pod 共享。&lt;/p&gt;
&lt;!--
The following example shows two Pods requesting the same ResourceClaim generated
from a ResourceClaimTemplate for their PodGroup:
--&gt;
&lt;p&gt;下面的示例展示了两个 Pod 请求同一个 ResourceClaim；
这个 ResourceClaim 是从其 PodGroup 的 ResourceClaimTemplate 生成的：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;scheduling.k8s.io/v1alpha2&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PodGroup&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workers-pg&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;...&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceClaims&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;pg-claim&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceClaimTemplateName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-claim-template&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;topology-aware-workers-pg-pod-1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;...&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;schedulingGroup&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;podGroupName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workers-pg&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceClaims&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;pg-claim&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceClaimTemplateName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-claim-template&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;topology-aware-workers-pg-pod-2&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;...&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;schedulingGroup&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;podGroupName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workers-pg&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceClaims&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;pg-claim&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceClaimTemplateName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-claim-template&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
In addition, ResourceClaims referenced by PodGroups, either through
`resourceClaimName` or the claim generated from `resourceClaimTemplateName`,
become reserved for the entire PodGroup. Previously, kube-scheduler could only
list individual Pods in a ResourceClaim&#39;s `status.reservedFor` field which is
limited to 256 items. Now, a single PodGroup reference in `status.reservedFor`
can represent many more than 256 Pods, allowing high-cardinality sharing of
devices.
--&gt;
&lt;p&gt;此外，PodGroup 通过 &lt;code&gt;resourceClaimName&lt;/code&gt; 引用的 ResourceClaim，
或通过 &lt;code&gt;resourceClaimTemplateName&lt;/code&gt; 生成的申领，
都会为整个 PodGroup 预留。
此前，kube-scheduler 只能在 ResourceClaim 的 &lt;code&gt;status.reservedFor&lt;/code&gt; 字段中
列出各个 Pod，而该字段限制为 256 个条目。
现在，&lt;code&gt;status.reservedFor&lt;/code&gt; 中的单个 PodGroup 引用可以表示远多于 256 个 Pod，
从而允许设备的高基数共享。&lt;/p&gt;
&lt;!--
Together, these changes enable massive workloads with complex topologies to
utilize DRA for scalable device management.
--&gt;
&lt;p&gt;这些变更结合起来，使具有复杂拓扑的大规模工作负载能够利用 DRA
实现可扩缩的设备管理。&lt;/p&gt;
&lt;!--
## Integration with the Job controller
--&gt;
&lt;h2 id=&#34;与-job-控制器集成&#34;&gt;与 Job 控制器集成&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%8e-job-%e6%8e%a7%e5%88%b6%e5%99%a8%e9%9b%86%e6%88%90&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
In Kubernetes v1.36, the Job controller can create and manage Workload and PodGroup objects on your behalf,
so that Jobs representing a tightly coupled parallel application, such as distributed AI training,
are gang-scheduled without any additional tooling. Without this integration, you would have to
create the Workload and PodGroup yourself and wire their references into the Pod template.
Now, the Job controller automates this process natively.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，Job 控制器可以代表你创建和管理 Workload 与 PodGroup 对象，
因此表示紧耦合并行应用（例如分布式 AI 训练）的 Job
无需任何额外工具即可进行编组调度。
如果没有这种集成，你需要自行创建 Workload 和 PodGroup，
并将它们的引用连接到 Pod 模板中。
现在，Job 控制器以原生方式自动化了这一过程。&lt;/p&gt;
&lt;!--
When the [`WorkloadWithJob`](/docs/reference/command-line-tools-reference/feature-gates/#WorkloadWithJob)
feature gate is enabled, the Job controller automatically:
--&gt;
&lt;p&gt;启用 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#EnableWorkloadWithJob&#34;&gt;&lt;code&gt;EnableWorkloadWithJob&lt;/code&gt;&lt;/a&gt;
特性门控后，Job 控制器会自动：&lt;/p&gt;
&lt;!--
* creates a Workload and a corresponding runtime PodGroup for each qualifying Job,

* sets `.spec.schedulingGroup` onto every Pod the Job creates
  so the scheduler treats them as a single gang, and

* sets the Job as the owner of the generated objects,
  so they are garbage-collected when the Job is deleted.
--&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;为每个符合条件的 Job 创建一个 Workload 和对应的运行时 PodGroup；&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;在 Job 创建的每个 Pod 上设置 &lt;code&gt;.spec.schedulingGroup&lt;/code&gt;，
使调度器将它们视为一个 gang；&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;将 Job 设置为所生成对象的属主，
因此这些对象会在 Job 被删除时被垃圾收集。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### When does the integration kick in?
--&gt;
&lt;h3 id=&#34;什么时候会触发集成&#34;&gt;什么时候会触发集成？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bb%80%e4%b9%88%e6%97%b6%e5%80%99%e4%bc%9a%e8%a7%a6%e5%8f%91%e9%9b%86%e6%88%90&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
To keep the first feature iteration predictable, the Job controller only creates a
Workload and PodGroup when the Job has a well-defined, fixed shape:
--&gt;
&lt;p&gt;为了让首个特性迭代保持可预测，只有当 Job 具有定义明确且固定的形态时，
Job 控制器才会创建 Workload 和 PodGroup：&lt;/p&gt;
&lt;!--
* `.spec.parallelism` is greater than 1

* [`.spec.completionMode`](/docs/concepts/workloads/controllers/job/#completion-mode) is set to `Indexed`

* `.spec.completions` is equal to `.spec.parallelism`

* The `schedulingGroup` is not already set on the Pod template.
--&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;.spec.parallelism&lt;/code&gt; 大于 1&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/controllers/job/#completion-mode&#34;&gt;&lt;code&gt;.spec.completionMode&lt;/code&gt;&lt;/a&gt; 设置为 &lt;code&gt;Indexed&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;.spec.completions&lt;/code&gt; 等于 &lt;code&gt;.spec.parallelism&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Pod 模板上尚未设置 &lt;code&gt;schedulingGroup&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
These conditions describe the class of Jobs that gang scheduling can reason about:
each Pod has a stable identity (`Indexed`), the gang size is known and fixed at admission time
(`parallelism` == `completions`), and no other controller has already claimed scheduling responsibility
(`schedulingGroup` field is unset). Jobs that do not meet these conditions are scheduled Pod-by-Pod,
exactly as before.
--&gt;
&lt;p&gt;这些条件描述了编组调度可以推理的一类 Job：
每个 Pod 都具有稳定身份（&lt;code&gt;Indexed&lt;/code&gt;），gang 的规模在准入时已知且固定
（&lt;code&gt;parallelism&lt;/code&gt; == &lt;code&gt;completions&lt;/code&gt;），并且没有其他控制器已经声明调度责任
（&lt;code&gt;schedulingGroup&lt;/code&gt; 字段未设置）。
不满足这些条件的 Job 会像以前一样逐个 Pod 调度。&lt;/p&gt;
&lt;!--
If you set `schedulingGroup` on the Pod template yourself (for example,
because a higher-level controller is managing the workload), the Job controller leaves
the Pod template alone and does not create its own Workload or PodGroup. This makes the feature
safe to enable in clusters that already use an external batch system.
--&gt;
&lt;p&gt;如果你自行在 Pod 模板上设置 &lt;code&gt;schedulingGroup&lt;/code&gt;
（例如因为有更高层的控制器正在管理该工作负载），
Job 控制器会保持 Pod 模板不变，
并且不会创建自己的 Workload 或 PodGroup。
这使得该特性可以安全地在已经使用外部批处理系统的集群中启用。&lt;/p&gt;
&lt;!--
Here is an example of a Job that qualifies for gang scheduling:
--&gt;
&lt;p&gt;下面是一个符合编组调度条件的 Job 示例：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;batch/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Job&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;job-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;completionMode&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Indexed&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;parallelism&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;completions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;template&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;restartPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Never&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;worker&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;registry.example/trainer:latest&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
The Job controller creates a Workload and a PodGroup owned by this Job,
and every Pod it creates carries a `.spec.schedulingGroup` that points at the generated PodGroup.
The Pods are then scheduled together once all four can be placed at the same time using
the PodGroup scheduling cycle described earlier in this post.
--&gt;
&lt;p&gt;Job 控制器会创建归此 Job 所有的 Workload 和 PodGroup，
并且它创建的每个 Pod 都会携带指向所生成 PodGroup 的 &lt;code&gt;.spec.schedulingGroup&lt;/code&gt;。
随后，一旦可以使用本文前面描述的 PodGroup 调度周期同时放置全部四个 Pod，
这些 Pod 就会一起调度。&lt;/p&gt;
&lt;!--
### What&#39;s not covered yet
--&gt;
&lt;h3 id=&#34;尚未覆盖的内容&#34;&gt;尚未覆盖的内容&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b0%9a%e6%9c%aa%e8%a6%86%e7%9b%96%e7%9a%84%e5%86%85%e5%ae%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The current constraints limit this integration to static, indexed, fully-parallel Jobs.
Support for additional workload shapes, including elastic Jobs and other built-in controllers,
is tracked in [KEP-5547](https://kep.k8s.io/5547).
--&gt;
&lt;p&gt;当前约束将这一集成限制在静态、索引化、完全并行的 Job 上。
对其他工作负载形态的支持，包括弹性 Job 和其他内置控制器，
由 &lt;a href=&#34;https://kep.k8s.io/5547&#34;&gt;KEP-5547&lt;/a&gt; 跟踪。&lt;/p&gt;
&lt;!--
In future Kubernetes releases, this integration will expand to support additional workload controllers,
and the current constraints for Jobs may be relaxed.
--&gt;
&lt;p&gt;在未来 Kubernetes 版本中，这一集成将扩展为支持更多工作负载控制器，
而当前针对 Job 的约束也可能放宽。&lt;/p&gt;
&lt;!--
## What&#39;s next?
--&gt;
&lt;h2 id=&#34;后续计划&#34;&gt;后续计划&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%90%8e%e7%bb%ad%e8%ae%a1%e5%88%92&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The journey for workload-aware scheduling doesn&#39;t stop here.
For v1.37, the community is actively working on:
--&gt;
&lt;p&gt;工作负载感知调度的旅程并不会止步于此。
面向 v1.37，社区正在积极推进：&lt;/p&gt;
&lt;!--
* **Graduating Workload and PodGroup APIs to Beta:** Our primary goal is to mature the Workload and PodGroup APIs to the Beta stage,
  solidifying their foundational role in the Kubernetes ecosystem. As part of this graduation process, we also plan to introduce `minCount` mutability
  to unlock elastic jobs and allow dynamic workloads to scale efficiently.

* **Multi-level Workload hierarchies:** To support complex modern AI workloads like JobSet or Disaggregated Inference via LeaderWorkerSet (LWS),
  we are working on expanding the architecture to support multi-level hierarchies. We aim to introduce a new API
  that allows grouping multiple PodGroups into hierarchical structures, directly reflecting the organization of real-world workload controllers.

* **Graduating advanced scheduling features:** We are focused on driving the maturity of the broader workload-aware scheduling ecosystem.
  This includes bringing existing features, such as topology-aware scheduling and workload-aware preemption, to the Beta stage.

* **Unified controller integration API:** To streamline adoption, we’re working on a controller integration API.
  This will provide real-world workload controllers with a unified, standardized method for consuming workload-aware scheduling capabilities.
--&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;将 Workload 和 PodGroup API 晋升到 Beta：&lt;/strong&gt; 我们的主要目标是让 Workload 和 PodGroup API 成熟到 Beta 阶段，
巩固它们在 Kubernetes 生态系统中的基础地位。
作为晋升过程的一部分，我们还计划引入 &lt;code&gt;minCount&lt;/code&gt; 可变性，
以解锁弹性 Job，并允许动态工作负载高效扩缩。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;多级 Workload 层次结构：&lt;/strong&gt; 为了支持 JobSet 或通过 LeaderWorkerSet（LWS）实现的解聚推理等复杂现代 AI 工作负载，
我们正在扩展架构以支持多级层次结构。
我们计划引入一个新的 API，
允许将多个 PodGroup 组织成层次结构，
直接反映真实工作负载控制器的组织方式。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;推进高级调度特性进阶：&lt;/strong&gt; 我们专注于推动更广泛的工作负载感知调度生态系统走向成熟。
这包括将拓扑感知调度和工作负载感知抢占等现有特性推进到 Beta 阶段。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;统一的控制器集成 API：&lt;/strong&gt; 为简化采用过程，我们正在开发控制器集成 API。
这将为真实世界中的工作负载控制器提供一种统一、标准化的方法，
用于消费工作负载感知调度能力。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
The priority and implementation order of these focus areas are subject to change. Stay tuned for further updates.
--&gt;
&lt;p&gt;这些重点领域的优先级和实现顺序可能会发生变化。敬请关注后续更新。&lt;/p&gt;
&lt;!--
## Getting started
--&gt;
&lt;h2 id=&#34;入门&#34;&gt;入门&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%85%a5%e9%97%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
All below workload-aware scheduling improvements are available as Alpha features in v1.36.
To try them out, you must configure the following:
--&gt;
&lt;p&gt;以下所有工作负载感知调度改进在 v1.36 中均作为 Alpha 特性提供。
要试用它们，你必须进行以下配置：&lt;/p&gt;
&lt;!--
* Prerequisite: Workload and PodGroup API support: Enable the
  [`GenericWorkload`](/docs/reference/command-line-tools-reference/feature-gates/#GenericWorkload)
  feature gate on both the `kube-apiserver` and `kube-scheduler`, and ensure the `scheduling.k8s.io/v1alpha2`
  &lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes API 中的一组相关路径。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning&#39; target=&#39;_blank&#39; aria-label=&#39;API group&#39;&gt;API group&lt;/a&gt; is enabled.
--&gt;
&lt;ul&gt;
&lt;li&gt;前提条件：Workload 和 PodGroup API 支持：
在 &lt;code&gt;kube-apiserver&lt;/code&gt; 和 &lt;code&gt;kube-scheduler&lt;/code&gt; 上启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#GenericWorkload&#34;&gt;&lt;code&gt;GenericWorkload&lt;/code&gt;&lt;/a&gt;
特性门控，并确保启用 &lt;code&gt;scheduling.k8s.io/v1alpha2&lt;/code&gt;
&lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes API 中的一组相关路径。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning&#39; target=&#39;_blank&#39; aria-label=&#39;API 组&#39;&gt;API 组&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Once the prerequisite is met, you can enable specific features:
--&gt;
&lt;p&gt;满足前提条件后，你可以启用具体特性：&lt;/p&gt;
&lt;!--
* Gang scheduling: Enable the
  [`GangScheduling`](/docs/reference/command-line-tools-reference/feature-gates/#GangScheduling)
  feature gate on the `kube-scheduler`.
* Topology-aware scheduling: Enable the
  [`TopologyAwareWorkloadScheduling`](/docs/reference/command-line-tools-reference/feature-gates/#TopologyAwareWorkloadScheduling)
  feature gate on the `kube-scheduler`.
* Workload-aware preemption: Enable the
  [`WorkloadAwarePreemption`](/docs/reference/command-line-tools-reference/feature-gates/#WorkloadAwarePreemption)
  feature gate on the `kube-scheduler` (requires `GangScheduling` to also be enabled).
* DRA ResourceClaim support for workloads: Enable the
  [`DRAWorkloadResourceClaims`](/docs/reference/command-line-tools-reference/feature-gates/#DRAWorkloadResourceClaims)
  feature gate on the `kube-apiserver`, `kube-controller-manager`, `kube-scheduler` and `kubelet`.
* Workload API integration with the Job controller: Enable the
  [`WorkloadWithJob`](/docs/reference/command-line-tools-reference/feature-gates/#EnableWorkloadWithJob)
  feature gate on the `kube-apiserver` and `kube-controller-manager`.
--&gt;
&lt;ul&gt;
&lt;li&gt;编组调度：在 &lt;code&gt;kube-scheduler&lt;/code&gt; 上启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#GangScheduling&#34;&gt;&lt;code&gt;GangScheduling&lt;/code&gt;&lt;/a&gt;
特性门控。&lt;/li&gt;
&lt;li&gt;拓扑感知调度：在 &lt;code&gt;kube-scheduler&lt;/code&gt; 上启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#TopologyAwareWorkloadScheduling&#34;&gt;&lt;code&gt;TopologyAwareWorkloadScheduling&lt;/code&gt;&lt;/a&gt;
特性门控。&lt;/li&gt;
&lt;li&gt;工作负载感知抢占：在 &lt;code&gt;kube-scheduler&lt;/code&gt; 上启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#WorkloadAwarePreemption&#34;&gt;&lt;code&gt;WorkloadAwarePreemption&lt;/code&gt;&lt;/a&gt;
特性门控（还需要启用 &lt;code&gt;GangScheduling&lt;/code&gt;）。&lt;/li&gt;
&lt;li&gt;工作负载的 DRA ResourceClaim 支持：在 &lt;code&gt;kube-apiserver&lt;/code&gt;、&lt;code&gt;kube-controller-manager&lt;/code&gt;、&lt;code&gt;kube-scheduler&lt;/code&gt; 和 &lt;code&gt;kubelet&lt;/code&gt;
上启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#DRAWorkloadResourceClaims&#34;&gt;&lt;code&gt;DRAWorkloadResourceClaims&lt;/code&gt;&lt;/a&gt;
特性门控。&lt;/li&gt;
&lt;li&gt;Job 控制器的 Workload API 集成：在 &lt;code&gt;kube-apiserver&lt;/code&gt; 和 &lt;code&gt;kube-controller-manager&lt;/code&gt; 上启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#EnableWorkloadWithJob&#34;&gt;&lt;code&gt;WorkloadWithJob&lt;/code&gt;&lt;/a&gt;
特性门控。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
We encourage you to try out workload-aware scheduling in your test clusters
and share your experiences to help shape the future of Kubernetes scheduling.
You can send your feedback by:
--&gt;
&lt;p&gt;我们鼓励你在测试集群中试用工作负载感知调度，
并分享你的经验，以帮助塑造 Kubernetes 调度的未来。
你可以通过以下方式发送反馈：&lt;/p&gt;
&lt;!--
* Reaching out via [Slack (#workload-aware-scheduling)](https://kubernetes.slack.com/archives/C0AHLJ0EAEL).
* Joining the [SIG Scheduling](https://www.kubernetes.dev/community/community-groups/sigs/scheduling/#meetings) meetings.
* Filing a new [issue](https://github.com/kubernetes/kubernetes/issues) in the Kubernetes repository.
--&gt;
&lt;ul&gt;
&lt;li&gt;通过 &lt;a href=&#34;https://kubernetes.slack.com/archives/C0AHLJ0EAEL&#34;&gt;Slack（#workload-aware-scheduling）&lt;/a&gt;联系我们。&lt;/li&gt;
&lt;li&gt;参加 &lt;a href=&#34;https://www.kubernetes.dev/community/community-groups/sigs/scheduling/#meetings&#34;&gt;SIG Scheduling&lt;/a&gt; 会议。&lt;/li&gt;
&lt;li&gt;在 Kubernetes 仓库中提交新的 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues&#34;&gt;issue&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Learn more
--&gt;
&lt;h2 id=&#34;了解更多&#34;&gt;了解更多&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%ba%86%e8%a7%a3%e6%9b%b4%e5%a4%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To dive deeper into the architecture and design of these features, read the KEPs:
--&gt;
&lt;p&gt;要深入了解这些特性的架构和设计，请阅读以下 KEP：&lt;/p&gt;
&lt;!--
* [Workload API and gang scheduling](https://kep.k8s.io/4671)
* [Topology-aware scheduling](https://kep.k8s.io/5732)
* [Workload-aware preemption](https://kep.k8s.io/5710)
* [DRA ResourceClaim support for workloads](https://kep.k8s.io/5729)
* [Workload API support in Job controller](https://kep.k8s.io/5547)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4671&#34;&gt;Workload API 和编组调度&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5732&#34;&gt;拓扑感知调度&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5710&#34;&gt;工作负载感知抢占&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5729&#34;&gt;工作负载的 DRA ResourceClaim 支持&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5547&#34;&gt;Job 控制器中的 Workload API 支持&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：Kubernetes PSI 指标升级到 GA</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/12/kubernetes-v1-36-psi-metrics-ga/</link>
      <pubDate>Tue, 12 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/12/kubernetes-v1-36-psi-metrics-ga/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: PSI Metrics for Kubernetes Graduates to GA&#34;
date: 2026-05-12T10:35:00-08:00
slug: kubernetes-v1-36-psi-metrics-ga
author: &#34;Maria Fernanda Romano Silva (Google Cloud)&#34;
---
--&gt;
&lt;!--
Since its original implementation in the Linux kernel in 2018,
_Pressure Stall Information_ (PSI) has provided users
with the high-fidelity signals needed to identify resource saturation before it becomes an outage.
Unlike traditional utilization metrics, PSI tells the story of tasks stalled and time lost, all in nicely-packaged percentages of time across the CPU, memory, and I/O.
--&gt;
&lt;p&gt;自 2018 年在 Linux 内核中首次实现以来，
&lt;strong&gt;Pressure Stall Information&lt;/strong&gt;（PSI）为用户提供了在资源饱和演变为停机之前识别它所需的高保真信号。
与传统的利用率指标不同，PSI 以 CPU、内存和 I/O 的时间百分比形式，清晰地展示了任务停滞和时间损失的情况。&lt;/p&gt;
&lt;!--
With the recent release of Kubernetes v1.36, users across the ecosystem have a stable, reliable interface to observe resource contention at the node, pod, and container levels. In this post, we will dive into the improvements and performance testing that proved its readiness for production.
--&gt;
&lt;p&gt;随着 Kubernetes v1.36 的发布，生态系统中的用户现在拥有一个稳定、可靠的接口，
可在节点、Pod 和容器级别观察资源竞争情况。在本文中，我们将深入探讨证明其已准备好投入生产的改进和性能测试。&lt;/p&gt;
&lt;!--
## Beyond utilization: why PSI?
--&gt;
&lt;h2 id=&#34;超越利用率-为什么选择-psi&#34;&gt;超越利用率：为什么选择 PSI？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%b6%85%e8%b6%8a%e5%88%a9%e7%94%a8%e7%8e%87-%e4%b8%ba%e4%bb%80%e4%b9%88%e9%80%89%e6%8b%a9-psi&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Monitoring CPU or memory usage alone can be misleading. A node may report XX% (below 100%) CPU utilization while certain tasks are experiencing severe latency due to scheduling delays. PSI fills this gap by providing:
* **Cumulative Totals**: Absolute time spent in a stalled state.
* **Moving Averages**: 10s, 60s, and 300s windows that allow operators to distinguish between transient spikes and sustained resource tension.
--&gt;
&lt;p&gt;仅监控 CPU 或内存使用情况可能会产生误导。一个节点可能报告 XX%（低于 100%）的 CPU 利用率，
而某些任务却因调度延迟而经历严重延迟。PSI 通过提供以下信息填补了这一空白：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;累计总计&lt;/strong&gt;：处于停滞状态的绝对时间。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;移动平均值&lt;/strong&gt;：10 秒、60 秒和 300 秒的窗口，允许运维人员区分瞬时峰值和持续的资源紧张。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Proving stability: performance testing at scale
--&gt;
&lt;h2 id=&#34;证明稳定性-大规模性能测试&#34;&gt;证明稳定性：大规模性能测试&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%af%81%e6%98%8e%e7%a8%b3%e5%ae%9a%e6%80%a7-%e5%a4%a7%e8%a7%84%e6%a8%a1%e6%80%a7%e8%83%bd%e6%b5%8b%e8%af%95&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
A common concern when graduating telemetry features is the resource overhead required to collect and serve the metrics. To address this, SIG Node conducted extensive performance validation on high-density workloads (80+ pods) across various machine types.
--&gt;
&lt;p&gt;遥测功能升级时的一个常见担忧是收集和提供指标所需的资源开销。
为解决此问题，SIG Node 对各种机器类型上的高密度工作负载（80+ Pod）进行了广泛的性能验证。&lt;/p&gt;
&lt;!--
Our testing focused on two primary scenarios to isolate the impact of the Kubelet and kernel-level collection respectively:
1. **Kernel PSI ON / Kubelet Feature OFF** vs **Kernel PSI ON / Kubelet Feature ON** (Kubelet overhead)
2. **Kernel PSI OFF / Kubelet Feature ON** vs **Kernel PSI ON / Kubelet Feature ON** (Kernel overhead)
--&gt;
&lt;p&gt;我们的测试集中在两个主要场景，分别隔离 kubelet 和内核级别的收集影响：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Kernel PSI ON / kubelet Feature OFF&lt;/strong&gt; 对比 &lt;strong&gt;Kernel PSI ON / kubelet Feature ON&lt;/strong&gt;（kubelet 开销）&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Kernel PSI OFF / kubelet Feature ON&lt;/strong&gt; 对比 &lt;strong&gt;Kernel PSI ON / kubelet Feature ON&lt;/strong&gt;（内核开销）&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
#### Scenario 1: The Kubelet Overhead
First, we looked at the kubelet usage on 4 core machines (Case 1). For these, the Linux kernel was already tracking pressure on both clusters by default(`psi=1`), but we toggled the `KubeletPSI` feature gate to see if the Kubelet actively querying and exposing these metrics impacted the resource usage. The synchronized bursts seen in the graph are practically identical in both magnitude and frequency, confirming that the Kubelet&#39;s collection logic is highly lightweight and blends seamlessly into standard housekeeping cycles. There is no issue about the feature affecting the pre-existing resource use, staying within the normal 0.1 cores or **2.5% of the total node capacity**, and is therefore safe for production-scale deployments.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/images/kubeletPSI_kubelet_cpu_usage_rate_graph.png&#34;
         alt=&#34;A line graph comparing the kubelet CPU usage rate over elapsed time with the Kubelet PSI feature turned off versus on and kernel PSI always on.&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;(Case 1) Kubelet CPU Usage Rate Comparison&lt;/h4&gt;&lt;p&gt;Figure 2: Kubelet CPU Usage Rate Comparison.&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt; 
--&gt;
&lt;h4 id=&#34;场景-1-kubelet-开销&#34;&gt;场景 1：kubelet 开销&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%9c%ba%e6%99%af-1-kubelet-%e5%bc%80%e9%94%80&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;首先，我们查看了 4 核机器上的 kubelet 使用情况（案例 1）。
对于这些机器，Linux 内核默认已经在两个集群上跟踪压力（&lt;code&gt;psi=1&lt;/code&gt;），
但我们切换了 &lt;code&gt;KubeletPSI&lt;/code&gt; 特性门控，以查看 kubelet 主动查询和暴露这些指标是否会影响资源使用。
图表中看到的同步突发在幅度和频率上几乎完全相同，证实了 kubelet 的收集逻辑非常轻量级，
可以无缝融入标准的内务处理周期。
该特性不会影响现有的资源使用，保持在正常的 0.1 核或&lt;strong&gt;节点总容量的 2.5%&lt;/strong&gt; 以内，
因此对于生产规模的部署是安全的。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/images/kubeletPSI_kubelet_cpu_usage_rate_graph.png&#34;
         alt=&#34;比较 Kubelet PSI 特性关闭与开启（内核 PSI 始终开启）时，kubelet CPU 使用率随时间变化的折线图。&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;（案例 1）kubelet CPU 使用率对比&lt;/h4&gt;&lt;p&gt;图 2：kubelet CPU 使用率对比。&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Next, we evaluated the system overhead in the same run. As seen in the following graph, the **System CPU** usage lines for the Kubelet PSI-enabled (red) follows the same pattern as the Kubelet PSI-disabled (blue) clusters, with a slight expected increase from the baseline. This visualizes that once the OS is tracking PSI, at around **2.5 cores**, the act of Kubernetes reading those cgroup metrics is negligible to performance. 



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/images/kubeletPSI_sys_cpu_usage_rate_graph.png&#34;
         alt=&#34;A line graph comparing the system CPU usage rate over elapsed time with the PSI feature turned off versus on and kernel PSI default ON.&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;(Case 1) System CPU Usage Rate Comparison&lt;/h4&gt;&lt;p&gt;Figure 1: Node System CPU Usage Rate Comparison.&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
--&gt;
&lt;p&gt;接下来，我们在同一运行中评估了系统开销。
如下列图表所示，启用 Kubelet PSI（红色）的 &lt;strong&gt;System CPU&lt;/strong&gt; 使用率曲线与禁用
kubelet PSI（蓝色）的集群遵循相同模式，比基线略有预期的增加。
这表明一旦操作系统跟踪 PSI（约 &lt;strong&gt;2.5 核&lt;/strong&gt;），
Kubernetes 读取这些 CGroup 指标的行为对性能的影响可以忽略不计。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/images/kubeletPSI_sys_cpu_usage_rate_graph.png&#34;
         alt=&#34;比较 PSI 特性关闭与开启（内核 PSI 默认开启）时，系统 CPU 使用率随时间变化的折线图。&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;（案例 1）系统 CPU 使用率对比&lt;/h4&gt;&lt;p&gt;图 1：节点系统 CPU 使用率对比。&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
#### Scenario 2: The Kernel Overhead
Shifting gears, we evaluated the underlying overhead of enabling PSI on the Linux kernel also on a 4 core machine. By comparing a cluster booted with `psi=1` (COS default) against a cluster with `psi=0`, we isolated the exact cost of the OS-level bookkeeping. Even under heavy I/O and CPU load at an 80-pod density, the **System CPU** delta between the kernel-enabled and kernel-disabled clusters remained consistently between **0.037 cores** and **0.125 cores** or **0.925% - 3.125%** of the total node capacity. There was a single spike to **0.225 cores**, or **5.6%**, but was controlled back down within a few seconds. This confirms that the internal kernel tracking is highly efficient under load.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/images/node_sys_cpu_usage_rate_comparison.png&#34;
         alt=&#34;A line graph comparing the Node System (Kernel) CPU usage rate with Kernel PSI ON and OFF over elapsed time.&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;(Case 2) Node System CPU Usage Rate Comparison&lt;/h4&gt;&lt;p&gt;Figure 3: Node System CPU Usage Rate Comparison.&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
--&gt;
&lt;h4 id=&#34;场景-2-内核开销&#34;&gt;场景 2：内核开销&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%9c%ba%e6%99%af-2-%e5%86%85%e6%a0%b8%e5%bc%80%e9%94%80&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p&gt;换个角度，我们在 4 核机器上评估了在 Linux 内核上启用 PSI 的底层开销。
通过比较使用 &lt;code&gt;psi=1&lt;/code&gt;（COS 默认值）启动的集群与使用 &lt;code&gt;psi=0&lt;/code&gt; 的集群，
我们分离出了操作系统级簿记的确切成本。即使在 80 Pod 密度下的繁重 I/O 和 CPU 负载下，
启用内核和禁用内核的集群之间的 &lt;strong&gt;System CPU&lt;/strong&gt; 差异始终保持在 &lt;strong&gt;0.037 核&lt;/strong&gt; 到 &lt;strong&gt;0.125 核&lt;/strong&gt; 之间，
即节点总容量的 &lt;strong&gt;0.925% - 3.125%&lt;/strong&gt;。有一次峰值达到 &lt;strong&gt;0.225 核&lt;/strong&gt;（即 &lt;strong&gt;5.6%&lt;/strong&gt;），
但在几秒钟内就被控制下来。这证实了内核内部跟踪在负载下非常高效。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/images/node_sys_cpu_usage_rate_comparison.png&#34;
         alt=&#34;比较内核 PSI 开启和关闭时，节点系统（内核）CPU 使用率随时间变化的折线图。&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;（案例 2）节点系统 CPU 使用率对比&lt;/h4&gt;&lt;p&gt;图 3：节点系统 CPU 使用率对比。&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Figure 4 zooms in on the kubelet process itself, which serves as the primary collector for these metrics. . The results show that even while the kubelet performs periodic _sweeps_ to aggregate data from the cgroup hierarchy, its CPU usage remains remarkably low with interchangeable spikes and nothing exceeding **0.25 cores** or **6.25%** of total capacity for longer than a second.



&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/images/kubelet_cpu_usage_rate_comparison.png&#34;
         alt=&#34;A line graph comparing the kubelet CPU usage rate over elapsed time with the Kernel PSI feature turned off versus on.&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;(Case 2) Kubelet CPU Usage Rate Comparison&lt;/h4&gt;&lt;p&gt;Figure 4: Kubelet CPU Usage Rate Comparison.&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
--&gt;
&lt;p&gt;图 4 放大了 kubelet 进程本身，它是这些指标的主要收集器。
结果表明，即使 kubelet 定期执行&lt;strong&gt;扫描&lt;/strong&gt;以从 CGroup 层次结构聚合数据，
其 CPU 使用率仍然非常低，峰值可互换，且没有任何峰值超过 &lt;strong&gt;0.25 核&lt;/strong&gt; 或总容量的 &lt;strong&gt;6.25%&lt;/strong&gt; 超过一秒。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/images/kubelet_cpu_usage_rate_comparison.png&#34;
         alt=&#34;比较内核 PSI 特性关闭与开启时，kubelet CPU 使用率随时间变化的折线图。&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;（案例 2）kubelet CPU 使用率对比&lt;/h4&gt;&lt;p&gt;图 4：kubelet CPU 使用率对比。&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
## Improvements between beta (1.34) and stable (1.36)
--&gt;
&lt;h2 id=&#34;beta-1-34-到-stable-1-36-之间的改进&#34;&gt;Beta（1.34）到 Stable（1.36）之间的改进&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#beta-1-34-%e5%88%b0-stable-1-36-%e4%b9%8b%e9%97%b4%e7%9a%84%e6%94%b9%e8%bf%9b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
- **Smarter Metric Emission for GA:** We improved how the Kubelet handles underlying OS support for PSI. Previously, if the feature was enabled in Kubernetes but the underlying Linux kernel didn&#39;t support PSI (`psi=0`), the Kubelet would emit misleading zero-valued metrics. These could trigger false alarms when read as real metrics instead of missing values. In v1.36, the Kubelet now detects OS-level PSI support via cgroup configurations before reporting. This ensures that pressure metrics are only collected and emitted when they are actually supported by the node, providing cleaner data for monitoring and alerting systems.
--&gt;
&lt;ul&gt;
&lt;li&gt;**GA 的智能指标发布：**我们改进了 kubelet 处理底层操作系统对 PSI 支持的方式。
以前，如果在 Kubernetes 中启用了该特性，但底层 Linux 内核不支持 PSI（&lt;code&gt;psi=0&lt;/code&gt;），
kubelet 会发布误导性的零值指标。当这些指标被当作真实指标而不是缺失值读取时，可能会触发误报。
在 v1.36 中，kubelet 现在会在报告之前通过 CGroup 配置检测操作系统级别的 PSI 支持。
这确保了压力指标仅在节点实际支持时才被收集和发布，为监控和告警系统提供更清晰的数据。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Getting started
--&gt;
&lt;h2 id=&#34;入门指南&#34;&gt;入门指南&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%85%a5%e9%97%a8%e6%8c%87%e5%8d%97&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To use PSI metrics in your Kubernetes cluster, your nodes must meet the following requirements:

1. **Ensure your nodes are running a Linux kernel version 4.20 or later and are using cgroup v2.**
2. **Ensure PSI is enabled at the OS level** (your kernel must be compiled with `CONFIG_PSI=y` and must not be booted with the `psi=0` parameter).
--&gt;
&lt;p&gt;要在你的 Kubernetes 集群中使用 PSI 指标，你的节点必须满足以下要求：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;确保你的节点运行 Linux 内核版本 4.20 或更高版本，并使用 CGroup v2。&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;确保在操作系统级别启用 PSI&lt;/strong&gt;（你的内核必须使用 &lt;code&gt;CONFIG_PSI=y&lt;/code&gt; 编译，并且不得使用 &lt;code&gt;psi=0&lt;/code&gt; 参数启动）。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
As of v1.36, Kubelet PSI metrics are generally available and you do not need to opt in to any feature gate. 
--&gt;
&lt;p&gt;从 v1.36 开始，Kubelet PSI 指标已普遍可用，你无需选择加入任何特性门控。&lt;/p&gt;
&lt;!--
Once the OS prerequisites are met, you can start scraping the `/metrics/cadvisor` endpoint with your Prometheus-compatible monitoring solution or query the Summary API to collect and visualize the new PSI metrics. Note that PSI is a Linux-kernel feature, so these metrics are not available on Windows nodes. Your cluster can contain a mix of Linux and Windows nodes, and on the Windows nodes, the kubelet will simply omit the PSI metrics.
--&gt;
&lt;p&gt;满足操作系统先决条件后，你可以开始使用兼容 Prometheus 的监控解决方案抓取 &lt;code&gt;/metrics/cadvisor&lt;/code&gt; 端点，
或查询 Summary API 来收集和可视化新的 PSI 指标。
请注意，PSI 是 Linux 内核特性，因此这些指标在 Windows 节点上不可用。
你的集群可以包含 Linux 和 Windows 节点的混合，在 Windows 节点上，kubelet 将简单地省略 PSI 指标。&lt;/p&gt;
&lt;!--
If your cluster is running a recent enough version of Kubernetes and you are a privileged node administrator, you can also proxy to the kubelet&#39;s HTTP API via the control plane&#39;s API server to see real-time pressure data from the Summary API. 

&gt; **Caution:** Proxying to the kubelet is a privileged operation. Granting access to it is a security risk, so ensure you have the appropriate administrative permissions before executing these commands.
--&gt;
&lt;p&gt;如果你的集群运行的是足够新的 Kubernetes 版本，并且你是特权节点管理员，
你还可以通过控制平面的 API 服务器代理到 kubelet 的 HTTP API，
以从 Summary API 查看实时压力数据。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;**注意：**代理到 kubelet 是一项特权操作。授予访问权限存在安全风险，
因此在执行这些命令之前，请确保你拥有适当的管理权限。&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;CONTAINER_NAME&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;example-container&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get --raw &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/api/v1/nodes/&lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get nodes -o &lt;span style=&#34;color:#b8860b&#34;&gt;jsonpath&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;{.items[0].metadata.name}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;/proxy/stats/summary&amp;#34;&lt;/span&gt; | jq &lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;.pods[].containers[] | select(.name==&amp;#34;&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;$CONTAINER_NAME&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;&amp;#34;) | {name, cpu: .cpu.psi, memory: .memory.psi, io: .io.psi}&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Further reading
--&gt;
&lt;h2 id=&#34;进一步阅读&#34;&gt;进一步阅读&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%bf%9b%e4%b8%80%e6%ad%a5%e9%98%85%e8%af%bb&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you want to dive deeper into how these metrics are calculated and exposed, check out these resources:
1. [The official Kernel documentation](https://docs.kernel.org/accounting/psi.html)
2. [Understanding PSI](/docs/reference/instrumentation/understand-psi-metrics/) in the Kubernetes documentation
3. [cAdvisor Metrics Implementation](https://github.com/google/cadvisor/blob/master/metrics/prometheus.go) 
--&gt;
&lt;p&gt;如果你想深入了解这些指标是如何计算和暴露的，请查看以下资源：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.kernel.org/accounting/psi.html&#34;&gt;官方内核文档&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Kubernetes 文档中的 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/instrumentation/understand-psi-metrics/&#34;&gt;Understanding PSI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/google/cadvisor/blob/master/metrics/prometheus.go&#34;&gt;cAdvisor Metrics Implementation&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
## Acknowledgements
--&gt;
&lt;h2 id=&#34;致谢&#34;&gt;致谢&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%87%b4%e8%b0%a2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Support for PSI metrics was developed through the collaborative efforts of [SIG Node](https://www.kubernetes.dev/community/community-groups/sigs/node/). Special thanks to all contributors who helped design, implement, test, review, and document this feature across its journey from alpha in v1.33, through beta in v1.34, to GA in v1.36.

To provide feedback on this feature, join the [Kubernetes Node Special Interest Group](https://github.com/kubernetes/community/tree/master/sig-node), participate in discussions on the [public Slack channel](http://slack.k8s.io/) (#sig-node), or file an issue on [GitHub](https://github.com/kubernetes/kubernetes/issues).
--&gt;
&lt;p&gt;PSI 指标的支持是通过 &lt;a href=&#34;https://www.kubernetes.dev/community/community-groups/sigs/node/&#34;&gt;SIG Node&lt;/a&gt;
的协作努力开发的。特别感谢所有在该特性从 v1.33 的 Alpha、v1.34 的 Beta 到 v1.36 的 GA
整个过程中帮助设计、实现、测试、审查和文档化的贡献者。&lt;/p&gt;
&lt;p&gt;要为此特性提供反馈，请加入 &lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-node&#34;&gt;Kubernetes Node 特别兴趣小组&lt;/a&gt;，
参与&lt;a href=&#34;http://slack.k8s.io/&#34;&gt;公共 Slack 频道&lt;/a&gt;（#sig-node）上的讨论，
或在 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues&#34;&gt;GitHub&lt;/a&gt; 上提交 Issue。&lt;/p&gt;
&lt;!--
## Feedback
--&gt;
&lt;h2 id=&#34;反馈&#34;&gt;反馈&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%8d%e9%a6%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you have feedback and want to share your experience using this feature, join the discussion:

- [SIG Node community page](https://github.com/kubernetes/community/tree/master/sig-node)
- [Kubernetes Slack](http://slack.k8s.io/) in the #sig-node channel
- [SIG Node mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-node)

SIG Node would love to hear about your experiences using this feature in production!
--&gt;
&lt;p&gt;如果你有反馈并想分享使用此特性的经验，请加入讨论：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-node&#34;&gt;SIG Node 社区页面&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://slack.k8s.io/&#34;&gt;Kubernetes Slack&lt;/a&gt; 的 #sig-node 频道&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://groups.google.com/forum/#!forum/kubernetes-sig-node&#34;&gt;SIG Node 邮件列表&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;SIG Node 很想了解你在生产中使用此特性的经验！&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：卷组快照进入正式发布阶段</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/08/kubernetes-v1-36-volume-group-snapshot-ga/</link>
      <pubDate>Fri, 08 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/08/kubernetes-v1-36-volume-group-snapshot-ga/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Moving Volume Group Snapshots to GA&#34;
date: 2026-05-08T10:35:00-08:00
slug: kubernetes-v1-36-volume-group-snapshot-ga
author: &gt;
   Xing Yang (VMware by Broadcom)
--&gt;
&lt;!--
Volume group snapshots were [introduced](/blog/2023/05/08/kubernetes-1-27-volume-group-snapshot-alpha/) as an Alpha feature with the Kubernetes v1.27 release, moved to [Beta](/blog/2024/12/18/kubernetes-1-32-volume-group-snapshot-beta/) in v1.32, and to a [second Beta](/blog/2025/09/16/kubernetes-v1-34-volume-group-snapshot-beta-2/) in v1.34. We are excited to announce that in the Kubernetes v1.36 release, support for volume group snapshots has reached **General Availability (GA)**.
--&gt;
&lt;p&gt;卷组快照（Volume Group Snapshots）作为 Alpha 功能在 Kubernetes v1.27 版本中&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2023/05/08/kubernetes-1-27-volume-group-snapshot-alpha/&#34;&gt;引入&lt;/a&gt;，
在 v1.32 版本中进入 &lt;a href=&#34;blog/2024/12/18/kubernetes-1-32-volume-group-snapshot-beta/&#34;&gt;Beta&lt;/a&gt; 阶段，
并在 v1.34 版本中进入&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/09/16/kubernetes-v1-34-volume-group-snapshot-beta-2/&#34;&gt;二次 Beta&lt;/a&gt; 阶段。
我们很高兴地宣布，在 Kubernetes v1.36 版本中，卷组快照已 &lt;strong&gt;正式发布（GA）&lt;/strong&gt;。&lt;/p&gt;
&lt;!--
The support for volume group snapshots relies on a set of [extension APIs for group snapshots](https://kubernetes-csi.github.io/docs/group-snapshot-restore-feature.html#volume-group-snapshot-apis). These APIs allow users to take crash-consistent snapshots for a set of volumes. Behind the scenes, Kubernetes uses a label selector to group multiple `PersistentVolumeClaim` objects for snapshotting. A key aim is to allow you to restore that set of snapshots to new volumes and recover your workload based on a crash-consistent recovery point.
--&gt;
&lt;p&gt;卷组快照的支持依赖于一组&lt;a href=&#34;https://kubernetes-csi.github.io/docs/group-snapshot-restore-feature.html#volume-group-snapshot-apis&#34;&gt;卷组快照的扩展 API&lt;/a&gt;。
这些 API 允许用户为一组卷创建崩溃一致性（crash-consistent）快照。
在后台，Kubernetes 使用标签选择器将多个 &lt;code&gt;PersistentVolumeClaim&lt;/code&gt; 对象分组以进行快照。
其主要目标是允许用户将该组快照恢复到新卷，并基于崩溃一致性恢复点恢复工作负载。&lt;/p&gt;
&lt;!--
This feature is only supported for [CSI](https://kubernetes-csi.github.io/docs/) volume drivers.
--&gt;
&lt;p&gt;此功能仅支持 &lt;a href=&#34;https://kubernetes-csi.github.io/docs/&#34;&gt;CSI&lt;/a&gt; 卷驱动程序。&lt;/p&gt;
&lt;!--
## An overview of volume group snapshots
--&gt;
&lt;h2 id=&#34;an-overview-of-volume-group-snapshots&#34;&gt;卷组快照概述&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#an-overview-of-volume-group-snapshots&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Some storage systems provide the ability to create a crash-consistent snapshot of multiple volumes. A group snapshot represents _copies_ made from multiple volumes that are taken at the same point-in-time. A group snapshot can be used either to rehydrate new volumes (pre-populated with the snapshot data) or to restore existing volumes to a previous state (represented by the snapshots).
--&gt;
&lt;p&gt;某些存储系统能够创建多个卷的崩溃一致性快照。组快照是指在同一时间点从多个卷创建的&lt;strong&gt;副本&lt;/strong&gt;。
组快照可用于重建新卷（预填充快照数据），或将现有卷恢复到之前的状态（由快照表示）。&lt;/p&gt;
&lt;!--
### Why add volume group snapshots to Kubernetes?
--&gt;
&lt;h3 id=&#34;why-add-volume-group-snapshots-to-kubernetes&#34;&gt;为什么要在 Kubernetes 中添加卷组快照？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#why-add-volume-group-snapshots-to-kubernetes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The Kubernetes volume plugin system already provides a powerful abstraction that automates the provisioning, attaching, mounting, resizing, and snapshotting of block and file storage. Underpinning all these features is the Kubernetes goal of workload portability.
--&gt;
&lt;p&gt;Kubernetes 卷插件系统已经提供了一种强大的抽象机制，能够自动完成块存储和文件存储的配置、挂载、调整大小以及快照操作。
所有这些特性都植根于 Kubernetes 追求的工作负载可移植性这一目标。&lt;/p&gt;
&lt;!--
There was already a [VolumeSnapshot](/docs/concepts/storage/volume-snapshots/) API that provides the ability to take a snapshot of a persistent volume to protect against data loss or data corruption. However, some storage systems support consistent group snapshots that allow a snapshot to be taken from multiple volumes at the same point-in-time to achieve write order consistency. This is extremely useful for applications that contain multiple volumes. For example, an application may have data stored in one volume and logs stored in another. If snapshots for these volumes are taken at different times, the application will not be consistent and will not function properly if restored from those snapshots.
--&gt;
&lt;p&gt;现有的 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/storage/volume-snapshots/&#34;&gt;VolumeSnapshot&lt;/a&gt; API
提供了对持久卷进行快照的功能，以防止数据丢失或损坏。
然而，一些存储系统支持一致性组快照，允许在同一时间点从多个卷创建快照，从而实现写入顺序的一致性。
这对于包含多个卷的应用程序非常有用。例如，应用程序的数据可能存储在一个卷中，而日志存储在另一个卷中。
如果这些卷的快照是在不同的时间创建的，则应用程序的数据将不一致，并且如果从这些快照恢复，则应用程序将无法正常运行。&lt;/p&gt;
&lt;!--
While you can quiesce the application first and take individual snapshots sequentially, this process can be time-consuming or sometimes impossible. Consistent group support provides crash consistency across all volumes in the group without the need for application quiescence.
--&gt;
&lt;p&gt;虽然你可以先让应用程序进入静默状态，然后按顺序创建各个快照，但这个过程可能非常耗时，有时甚至根本无法实现。
一致的组支持可在无需让应用程序进入静默状态的情况下，确保组内所有卷的崩溃一致性。&lt;/p&gt;
&lt;!--
### Kubernetes APIs for volume group snapshots
--&gt;
&lt;h3 id=&#34;kubernetes-apis-for-volume-group-snapshots&#34;&gt;Kubernetes 卷组快照 API&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kubernetes-apis-for-volume-group-snapshots&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes&#39; support for volume group snapshots relies on three API kinds that are used for managing snapshots:
--&gt;
&lt;p&gt;Kubernetes 对卷组快照的支持依赖于三种用于管理快照的 API：&lt;/p&gt;
&lt;!--
VolumeGroupSnapshot
: Created by a Kubernetes user (or automation) to request creation of a volume group snapshot for multiple persistent volume claims.
--&gt;
&lt;p&gt;VolumeGroupSnapshot
：由 Kubernetes 用户（或自动化）创建，用于请求为多个持久卷声明创建卷组快照。&lt;/p&gt;
&lt;!--
VolumeGroupSnapshotContent
: Created by the snapshot controller for a dynamically created VolumeGroupSnapshot. It contains information about the provisioned cluster resource (a group snapshot). The object binds to the VolumeGroupSnapshot for which it was created with a one-to-one mapping.
--&gt;
&lt;p&gt;VolumeGroupSnapshotContent
：由快照控制器为动态创建的 VolumeGroupSnapshot 创建。它包含有关已配置集群资源（组快照）的信息。
该对象与其创建的 VolumeGroupSnapshot 之间存在一对一映射关系。&lt;/p&gt;
&lt;!--
VolumeGroupSnapshotClass
: Created by cluster administrators to describe how volume group snapshots should be created, including the driver information, the deletion policy, etc.
--&gt;
&lt;p&gt;VolumeGroupSnapshotClass
：由集群管理员创建，用于描述应如何创建卷组快照，包括驱动程序信息、删除策略等。&lt;/p&gt;
&lt;!--
These three API kinds are defined as CustomResourceDefinitions (CRDs). For the GA release, the API version has been promoted to `v1`.
--&gt;
&lt;p&gt;这三种 API 类型被定义为自定义资源定义 (CRD)。在正式版发布中，API 版本已提升至 &lt;code&gt;v1&lt;/code&gt;。&lt;/p&gt;
&lt;!--
## What&#39;s new in GA?
--&gt;
&lt;h2 id=&#34;whats-new-in-ga&#34;&gt;正式发布中的新内容&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#whats-new-in-ga&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
* The API version for `VolumeGroupSnapshot`, `VolumeGroupSnapshotContent`, and `VolumeGroupSnapshotClass` is promoted to `groupsnapshot.storage.k8s.io/v1`.
* Enhanced stability and bug fixes based on feedback from the beta releases, including the improvements introduced in v1beta2 for accurate `restoreSize` reporting.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;VolumeGroupSnapshot&lt;/code&gt;、&lt;code&gt;VolumeGroupSnapshotContent&lt;/code&gt; 和 &lt;code&gt;VolumeGroupSnapshotClass&lt;/code&gt; 的 API 版本已升级为 &lt;code&gt;groupsnapshot.storage.k8s.io/v1&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;基于对 bete 测试版反馈的改进，增强了稳定性并修复了若干问题，其中包括 v1beta2 中引入的改进，以确保 &lt;code&gt;restoreSize&lt;/code&gt; 报告的准确性。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## How do I use Kubernetes volume group snapshots
--&gt;
&lt;h2 id=&#34;how-do-i-use-kubernetes-volume-group-snapshots&#34;&gt;如何使用 Kubernetes 卷组快照&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-do-i-use-kubernetes-volume-group-snapshots&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Creating a new group snapshot with Kubernetes
--&gt;
&lt;h3 id=&#34;creating-a-new-group-snapshot-with-kubernetes&#34;&gt;使用 Kubernetes 创建新的组快照&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#creating-a-new-group-snapshot-with-kubernetes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Once a `VolumeGroupSnapshotClass` object is defined and you have volumes you want to snapshot together, you may request a new group snapshot by creating a `VolumeGroupSnapshot` object.
--&gt;
&lt;p&gt;定义好 &lt;code&gt;VolumeGroupSnapshotClass&lt;/code&gt; 对象并选定要一起创建快照的卷后，你可以通过创建
&lt;code&gt;VolumeGroupSnapshot&lt;/code&gt; 对象来请求生成新的组快照。&lt;/p&gt;
&lt;!--
Label the PVCs you wish to group:
--&gt;
&lt;p&gt;为你想要分组的 PVC 打标签：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#000080;font-weight:bold&#34;&gt;%&lt;/span&gt; kubectl label pvc pvc-0 &lt;span style=&#34;color:#b8860b&#34;&gt;group&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;myGroup
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;persistentvolumeclaim/pvc-0 labeled
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;&lt;span style=&#34;&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#000080;font-weight:bold&#34;&gt;%&lt;/span&gt; kubectl label pvc pvc-1 &lt;span style=&#34;color:#b8860b&#34;&gt;group&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;myGroup
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;persistentvolumeclaim/pvc-1 labeled
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
For dynamic provisioning, a selector must be set so that the snapshot controller can find PVCs with the matching labels to be snapshotted together.
--&gt;
&lt;p&gt;对于动态配置，必须设置选择器，以便快照控制器可以找到具有匹配标签的 PVC，以便一起进行快照。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;groupsnapshot.storage.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;VolumeGroupSnapshot&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;snapshot-daily-20260422&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;demo-namespace&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;volumeGroupSnapshotClassName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;csi-groupSnapclass&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;source&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;selector&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matchLabels&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;group&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;myGroup&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
The `VolumeGroupSnapshotClass` is required for dynamic provisioning:
--&gt;
&lt;p&gt;动态配置需要 &lt;code&gt;VolumeGroupSnapshotClass&lt;/code&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;groupsnapshot.storage.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;VolumeGroupSnapshotClass&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;csi-groupSnapclass&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;driver&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example.csi.k8s.io&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;deletionPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Delete&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### How to use group snapshot for restore
--&gt;
&lt;h3 id=&#34;how-to-use-group-snapshot-for-restore&#34;&gt;如何使用组快照进行恢复&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-to-use-group-snapshot-for-restore&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
At restore time, request a new `PersistentVolumeClaim` to be created from a `VolumeSnapshot` object that is part of a `VolumeGroupSnapshot`. Repeat this for all volumes that are part of the group snapshot.
--&gt;
&lt;p&gt;在恢复时，请求从属于 &lt;code&gt;VolumeGroupSnapshot&lt;/code&gt; 的 &lt;code&gt;VolumeSnapshot&lt;/code&gt; 对象创建新的 &lt;code&gt;PersistentVolumeClaim&lt;/code&gt;。
对属于该组快照的所有卷重复此操作。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PersistentVolumeClaim&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;examplepvc-restored-2026-04-22&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;demo-namespace&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;storageClassName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-sc&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;dataSource&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;snapshot-0962a745b2bf930bb385b7b50c9b08af471f1a16780726de19429dd9c94eaca0&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;VolumeSnapshot&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiGroup&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;snapshot.storage.k8s.io&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;accessModes&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- ReadWriteOncePod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requests&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;storage&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;100Mi&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## As a storage vendor, how do I add support for group snapshots?
--&gt;
&lt;h2 id=&#34;as-a-storage-vendor-how-do-i-add-support-for-group-snapshots&#34;&gt;作为存储供应商，如何添加组快照支持？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#as-a-storage-vendor-how-do-i-add-support-for-group-snapshots&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To implement the volume group snapshot feature, a CSI driver **must**:
--&gt;
&lt;p&gt;要实现卷组快照功能，CSI 驱动程序 &lt;strong&gt;必须&lt;/strong&gt;：&lt;/p&gt;
&lt;!--
* Implement a new group controller service.
* Implement group controller RPCs: `CreateVolumeGroupSnapshot`, `DeleteVolumeGroupSnapshot`, and `GetVolumeGroupSnapshot`.
* Add group controller capability `CREATE_DELETE_GET_VOLUME_GROUP_SNAPSHOT`.
--&gt;
&lt;ul&gt;
&lt;li&gt;实现新的组控制器服务。&lt;/li&gt;
&lt;li&gt;实现组控制器远程过程调用 (RPC)：&lt;code&gt;CreateVolumeGroupSnapshot&lt;/code&gt;、&lt;code&gt;DeleteVolumeGroupSnapshot&lt;/code&gt; 和 &lt;code&gt;GetVolumeGroupSnapshot&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;添加组控制器能力 &lt;code&gt;CREATE_DELETE_GET_VOLUME_GROUP_SNAPSHOT&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
See the [CSI spec](https://github.com/container-storage-interface/spec/blob/master/spec.md) and the [Kubernetes-CSI Driver Developer Guide](https://kubernetes-csi.github.io/docs/) for more details.
--&gt;
&lt;p&gt;更多细节请参阅 &lt;a href=&#34;https://github.com/container-storage-interface/spec/blob/master/spec.md&#34;&gt;CSI 规范&lt;/a&gt; 和 &lt;a href=&#34;https://kubernetes-csi.github.io/docs/&#34;&gt;Kubernetes-CSI 驱动开发者指南&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## How can I learn more?
--&gt;
&lt;h2 id=&#34;how-can-i-learn-more&#34;&gt;如何了解更多信息？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-can-i-learn-more&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
- The [design spec](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3476-volume-group-snapshot) for the volume group snapshot feature.
- The [code repository](https://github.com/kubernetes-csi/external-snapshotter) for volume group snapshot APIs and controller.
- CSI [documentation](https://kubernetes-csi.github.io/docs/) on the group snapshot feature.
--&gt;
&lt;ul&gt;
&lt;li&gt;卷组快照功能的&lt;a href=&#34;https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3476-volume-group-snapshot&#34;&gt;设计规范&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;卷组快照 API 和控制器的&lt;a href=&#34;https://github.com/kubernetes-csi/external-snapshotter&#34;&gt;代码仓库&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;CSI &lt;a href=&#34;https://kubernetes-csi.github.io/docs/&#34;&gt;文档&lt;/a&gt;中关于组快照功能的介绍。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## How do I get involved?
--&gt;
&lt;h2 id=&#34;how-do-i-get-involved&#34;&gt;如何参与？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-do-i-get-involved&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This project, like all of Kubernetes, is the result of hard work by many contributors from diverse backgrounds working together. On behalf of SIG Storage, I would like to offer a huge thank you to all the contributors who stepped up over the years to help the project reach GA:
--&gt;
&lt;p&gt;与 Kubernetes 的所有项目一样，这个项目也是来自不同背景的众多贡献者共同努力的成果。
向多年来积极参与、助力本项目达到正式发布（GA）阶段的所有贡献者致以诚挚的谢意：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ben Swartzlander (&lt;a href=&#34;https://github.com/bswartz&#34;&gt;bswartz&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Cici Huang (&lt;a href=&#34;https://github.com/cici37&#34;&gt;cici37&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Darshan Murthy (&lt;a href=&#34;https://github.com/darshansreenivas&#34;&gt;darshansreenivas&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Hemant Kumar (&lt;a href=&#34;https://github.com/gnufied&#34;&gt;gnufied&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;James Defelice (&lt;a href=&#34;https://github.com/jdef&#34;&gt;jdef&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Jan Šafránek (&lt;a href=&#34;https://github.com/jsafrane&#34;&gt;jsafrane&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Madhu Rajanna (&lt;a href=&#34;https://github.com/Madhu-1&#34;&gt;Madhu-1&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Manish M Yathnalli (&lt;a href=&#34;https://github.com/manishym&#34;&gt;manishym&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Michelle Au (&lt;a href=&#34;https://github.com/msau42&#34;&gt;msau42&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Niels de Vos (&lt;a href=&#34;https://github.com/nixpanic&#34;&gt;nixpanic&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Leonardo Cecchi (&lt;a href=&#34;https://github.com/leonardoce&#34;&gt;leonardoce&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Rakshith R (&lt;a href=&#34;https://github.com/Rakshith-R&#34;&gt;Rakshith-R&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Raunak Shah (&lt;a href=&#34;https://github.com/RaunakShah&#34;&gt;RaunakShah&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Saad Ali (&lt;a href=&#34;https://github.com/saad-ali&#34;&gt;saad-ali&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Wei Duan (&lt;a href=&#34;https://github.com/duanwei33&#34;&gt;duanwei33&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Xing Yang (&lt;a href=&#34;https://github.com/xing-yang&#34;&gt;xing-yang&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Yati Padia (&lt;a href=&#34;https://github.com/yati1998&#34;&gt;yati1998&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
For those interested in getting involved with the design and development of CSI or any part of the Kubernetes Storage system, join the [Kubernetes Storage Special Interest Group](https://github.com/kubernetes/community/tree/master/sig-storage) (SIG). We always welcome new contributors.
--&gt;
&lt;p&gt;如果你有兴趣参与 CSI 或 Kubernetes 存储系统任何部分的设计和开发，请加入
&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-storage&#34;&gt;Kubernetes 存储特别兴趣小组&lt;/a&gt;（SIG）。
我们始终欢迎新的贡献者。&lt;/p&gt;
&lt;!--
We also hold regular [Data Protection Working Group meetings](https://github.com/kubernetes/community/tree/master/wg-data-protection). New attendees are welcome to join our discussions.
--&gt;
&lt;p&gt;我们还定期召开&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/wg-data-protection&#34;&gt;数据保护工作组会议&lt;/a&gt;。
欢迎新成员加入我们的讨论。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：更多驱动程序、新特性以及下一代 DRA</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/07/kubernetes-v1-36-dra-136-updates/</link>
      <pubDate>Thu, 07 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/07/kubernetes-v1-36-dra-136-updates/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: More Drivers, New Features, and the Next Era of DRA&#34;
date: 2026-05-07T10:35:00-08:00
slug: kubernetes-v1-36-dra-136-updates

author: &gt;
  The DRA team
--&gt;
&lt;!--
Dynamic Resource Allocation (DRA) has fundamentally changed how platform administrators handle hardware
accelerators and specialized resources in Kubernetes. In the v1.36 release, DRA
continues to mature, bringing a wave of feature graduations, critical usability
improvements, and new capabilities that extend the flexibility of DRA to native
resources like memory and CPU, and support for ResourceClaims in PodGroups.
--&gt;
&lt;p&gt;动态资源分配（DRA）从根本上改变了平台管理员在 Kubernetes 中处理硬件加速器和专用资源的方式。
在 Kubernetes v1.36 中，DRA 继续走向成熟，带来了多项特性进阶、重要的可用性改进，
以及一些新的能力，包括将 DRA 的灵活性扩展到内存和 CPU 这类原生资源，
并支持在 PodGroup 中使用 ResourceClaim。&lt;/p&gt;
&lt;!--
Driver availability continues to expand. Beyond specialized compute accelerators,
the ecosystem includes support for networking and other hardware types,
reflecting a move toward a more robust, hardware-agnostic infrastructure.
--&gt;
&lt;p&gt;驱动程序的可用性也在持续扩展。除了专用计算加速器之外，
这一生态系统也已经支持网络设备及其他硬件类型，
这反映出它正迈向更稳健、不过度绑定特定硬件的基础设施。&lt;/p&gt;
&lt;!--
Whether you are managing massive fleets of GPUs, need better handling of failures,
or simply looking for better ways to define resource fallback options, the upgrades
to DRA in 1.36 have something for you. Let&#39;s dive into the new features and graduations!
--&gt;
&lt;p&gt;无论你是在管理大规模 GPU 资源池，需要更好地处理故障，
还是只是希望找到更好的方式来定义资源候选/回退选项，
DRA 在 v1.36 中的升级都会对你有所帮助。
下面我们来看看这些新特性和进阶内容。&lt;/p&gt;
&lt;!--
## Feature graduations
--&gt;
&lt;h2 id=&#34;特性进阶&#34;&gt;特性进阶&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%89%b9%e6%80%a7%e8%bf%9b%e9%98%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The community has been hard at work stabilizing core DRA concepts. In Kubernetes 1.36,
several highly anticipated features have graduated to Beta and Stable.
--&gt;
&lt;p&gt;社区一直在努力稳定 DRA 的核心概念。
在 Kubernetes 1.36 中，多项备受期待的特性已经进入 Beta 和稳定阶段。&lt;/p&gt;
&lt;!--
### Prioritized list (stable) {#prioritized-list}
--&gt;
&lt;h3 id=&#34;prioritized-list&#34;&gt;按优先级排序的列表（Stable）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#prioritized-list&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Hardware heterogeneity is a reality in most clusters. With the
[Prioritized list](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#prioritized-list)
feature, you can confidently define fallback preferences when requesting
devices. Instead of hardcoding a request for a specific device model, you can specify an
ordered list of preferences (e.g., &#34;Give me an H100, but if none are available, fall back
to an A100&#34;). The scheduler will evaluate these requests in order, drastically improving
scheduling flexibility and cluster utilization.
--&gt;
&lt;p&gt;硬件异构是大多数集群中的现实情况。使用&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#prioritized-list&#34;&gt;按优先级排序的列表&lt;/a&gt;
特性，你可以在请求设备时明确指定回退偏好。
你无需将对特定设备型号的请求硬编码，而是可以指定一个有序的偏好列表
（例如，“给我一块 H100，如果没有可用的，就回退到 A100”）。
调度器会按顺序评估这些请求，从而显著提升调度灵活性和集群利用率。&lt;/p&gt;
&lt;!--
### Extended resource support (beta) {#extended-resource}
--&gt;
&lt;h3 id=&#34;extended-resource&#34;&gt;扩展资源支持（Beta）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#extended-resource&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
As DRA becomes the standard for resource allocation, bridging the gap with legacy systems
is crucial. The DRA
[Extended resource](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource)
feature allows users to request resources via traditional extended resources on a Pod.
This allows for a gradual transition to DRA, meaning cluster operators can migrate clusters
to DRA but let application developers adopt the ResourceClaim API on their own schedule.
--&gt;
&lt;p&gt;随着 DRA 成为资源分配的标准，弥合与既有机制之间的差距就变得至关重要。
DRA 的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource&#34;&gt;扩展资源&lt;/a&gt;
特性允许用户通过 Pod 上传统的扩展资源方式来请求资源。
这使得向 DRA 的过渡可以循序渐进，也就是说，集群运维人员可以将集群迁移到 DRA，
而让应用开发者按照自己的节奏采用 ResourceClaim API。&lt;/p&gt;
&lt;!--
### Partitionable devices (beta) {#partitionable-devices}
--&gt;
&lt;h3 id=&#34;partitionable-devices&#34;&gt;可切分设备（Beta）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#partitionable-devices&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Hardware accelerators are powerful, and sometimes a single workload doesn&#39;t need an
entire device. The
[Partitionable devices](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#partitionable-devices)
feature, provides native DRA support for dynamically carving physical hardware into smaller,
logical instances (such as Multi-Instance GPUs) based on workload demands. This allows
administrators to safely and efficiently share expensive accelerators across multiple Pods.
--&gt;
&lt;p&gt;硬件加速器能力强大，而有时单个工作负载并不需要整个设备。
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#partitionable-devices&#34;&gt;可切分设备&lt;/a&gt;
特性为 DRA 原生提供了支持，能够根据工作负载需求，将物理硬件动态切分为更小的逻辑实例
（例如多实例 GPU）。
这使管理员能够在多个 Pod 之间安全且高效地共享昂贵的加速器。&lt;/p&gt;
&lt;!--
### Device taints (beta) {#device-taints}
--&gt;
&lt;h3 id=&#34;device-taints&#34;&gt;设备污点（Beta）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#device-taints&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Just as you can taint a Kubernetes Node, you can apply taints directly to specific DRA
devices.
[Device taints and tolerations](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-taints-and-tolerations)
empower cluster administrators to manage hardware more effectively. You can taint faulty
devices to prevent them from being allocated to standard claims, or reserve specific hardware
for dedicated teams, specialized workloads, and experiments. Ultimately, only Pods with
matching tolerations are permitted to claim these tainted devices.
--&gt;
&lt;p&gt;正如你可以为 Kubernetes Node 添加污点一样，
你也可以直接为特定 DRA 设备添加污点。
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-taints-and-tolerations&#34;&gt;设备污点和容忍度&lt;/a&gt;
让集群管理员能够更高效地管理硬件。
你可以为故障设备打上污点，使其不会被普通 ResourceClaim 申领占用；
也可以把特定硬件预留给专属团队、专用工作负载或实验场景。
这样，只有具有匹配容忍度的 Pod 才允许申领这些带污点的设备。&lt;/p&gt;
&lt;!--
### Device binding conditions (beta) {#device-binding-conditions}
--&gt;
&lt;h3 id=&#34;device-binding-conditions&#34;&gt;设备绑定状况（Beta）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#device-binding-conditions&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
To improve scheduling reliability, the Kubernetes scheduler can use the
[Binding conditions](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-binding-conditions)
feature to delay committing a Pod to a Node until its required external resources—such as attachable
devices or FPGAs—are fully prepared. By explicitly modeling resource readiness, this
prevents premature assignments that can lead to Pod failures, ensuring a much more robust
and predictable deployment process.
--&gt;
&lt;p&gt;为了提升调度可靠性，Kubernetes
调度器可以使用&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-binding-conditions&#34;&gt;绑定状况&lt;/a&gt;
特性，在 Pod 所需的外部资源（例如可挂接设备或 FPGA）完全就绪之前，推迟将 Pod 绑定到节点。
通过显式地对资源就绪状态建模，这一特性能够防止过早分配导致 Pod 失败，
从而确保部署过程更加稳健且可预测。&lt;/p&gt;
&lt;!--
### Resource health status (beta) {#device-health-monitoring}
--&gt;
&lt;h3 id=&#34;device-health-monitoring&#34;&gt;资源健康状态（Beta）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#device-health-monitoring&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Knowing when a device has failed or become unhealthy is critical for workloads running on
specialized hardware. With
[Resource health status](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-health-monitoring),
Kubernetes expose device health information directly in the Pod status, giving users and
controllers crucial visibility to quickly identify and react to hardware failures. The
feature includes support for human-readable health status messages, making it
significantly easier to diagnose issues without the need to dive into complex driver logs.
--&gt;
&lt;p&gt;对于运行在专用硬件上的工作负载来说，知道设备何时故障或变得不健康至关重要。
借助&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-health-monitoring&#34;&gt;资源健康状态&lt;/a&gt;，
Kubernetes 直接在 Pod 状态中暴露设备健康信息，
为用户和控制器提供了关键的可见性，以便快速识别并响应硬件故障。
该特性还支持易于阅读的健康状态消息，使问题诊断变得容易得多，
而无需深入复杂的驱动日志。&lt;/p&gt;
&lt;!--
## New Features
--&gt;
&lt;h2 id=&#34;新特性&#34;&gt;新特性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%96%b0%e7%89%b9%e6%80%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Beyond stabilizing existing capabilities, v1.36 introduces foundational new features
that expand what DRA can do. These are alpha features, so they are behind feature gates
that are disabled by default.
--&gt;
&lt;p&gt;除了稳定现有能力之外，v1.36 还引入了一些基础性的新特性，进一步扩展了 DRA 能支持的场景。
这些特性目前均处于 Alpha 阶段，并由默认关闭的特性门控控制。&lt;/p&gt;
&lt;!--
### ResourceClaim support for workloads {#workload-resourceclaims}
--&gt;
&lt;h3 id=&#34;workload-resourceclaims&#34;&gt;面向工作负载的 ResourceClaim 支持&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#workload-resourceclaims&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
To optimize large-scale AI/ML workloads that rely on strict topological scheduling, the 
[ResourceClaim support for workloads](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#workload-resourceclaims)
feature enables Kubernetes to seamlessly manage shared resources across massive sets
of Pods. By associating ResourceClaims or ResourceClaimTemplates with PodGroups,
this feature eliminates previous scaling bottlenecks, such as the limit on the
number of pods that can share a claim, and removes the burden of manual claim
management from specialized orchestrators.
--&gt;
&lt;p&gt;为了优化依赖严格拓扑调度的大规模 AI/ML 工作负载，
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#workload-resourceclaims&#34;&gt;面向工作负载的 ResourceClaim 支持&lt;/a&gt;
特性使 Kubernetes 能够在大规模 Pod 集合之间统一管理共享资源。
通过将 ResourceClaim 或 ResourceClaimTemplate 与 PodGroup 关联起来，
该特性消除了此前的扩展性瓶颈，例如可共享某个申领的 Pod 数量限制，
同时也减轻了专用编排器手动管理申领的负担。&lt;/p&gt;
&lt;!--
### Node allocatable resources {#node-allocatable-resources}
--&gt;
&lt;h3 id=&#34;node-allocatable-resources&#34;&gt;节点可分配资源&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#node-allocatable-resources&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Why should DRA only be for external accelerators? In v1.36, we are introducing the first
iteration of using the DRA APIs to manage _node allocatable_ infrastructure resources (like CPU and
memory). By bringing CPU and memory allocation under the DRA umbrella with the DRA
[Node allocatable resources](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#node-allocatable-resources)
feature, users can leverage DRA&#39;s advanced placement, NUMA-awareness, and prioritization
semantics for standard compute resources, paving the way for incredibly fine-grained
performance tuning.
--&gt;
&lt;p&gt;为什么 DRA 只能用于外部加速器呢？在 v1.36 中，我们引入了使用 DRA API 管理
&lt;strong&gt;节点可分配&lt;/strong&gt;基础设施资源（如 CPU 和内存）的第一版实现。
通过 DRA 的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#node-allocatable-resources&#34;&gt;节点可分配资源&lt;/a&gt;
特性，将 CPU 和内存分配纳入 DRA 体系之下，
用户就可以将 DRA 的高级放置能力、NUMA 感知和优先级语义应用到标准计算资源上，
从而为极细粒度的性能调优铺平道路。&lt;/p&gt;
&lt;!--
### DRA resource availability visibility {#resource-pool-status}
--&gt;
&lt;h3 id=&#34;resource-pool-status&#34;&gt;DRA 资源可用性可见性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#resource-pool-status&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
One of the most requested features from cluster administrators has been better visibility
into hardware capacity. The new
[Resource pool status](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#resource-pool-status)
feature allows you to query the availability of devices in DRA resource pools. By creating a
`ResourcePoolStatusRequest` object, you get a point-in-time snapshot of device counts
— total, allocated, available, and unavailable — for each pool managed by a given
driver. This enables better integration with dashboards and capacity planning tools.
--&gt;
&lt;p&gt;集群管理员最常提出的需求之一，就是希望更好地了解硬件容量。
全新的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#resource-pool-status&#34;&gt;资源池状态&lt;/a&gt;
特性允许你查询 DRA 资源池中的设备可用性。
通过创建 &lt;code&gt;ResourcePoolStatusRequest&lt;/code&gt; 对象，
你可以获得某个驱动所管理的每个资源池在某一时刻的设备数量快照，
包括总数、已分配、可用和不可用。
这有助于更好地集成仪表板和容量规划工具。&lt;/p&gt;
&lt;!--
### List types for attributes {#list-type-attributes}
--&gt;
&lt;h3 id=&#34;list-type-attributes&#34;&gt;属性的列表类型&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#list-type-attributes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
ResourceClaim constraint evaluation has changed to work better with scalar
and list values:
`matchAttribute` now checks for a non-empty intersection, and
`distinctAttribute` checks for pairwise disjoint values.
--&gt;
&lt;p&gt;ResourceClaim 的约束求值机制已经调整，以便更好地处理标量值和列表值：
&lt;code&gt;matchAttribute&lt;/code&gt; 现在检查是否存在非空交集，
而 &lt;code&gt;distinctAttribute&lt;/code&gt; 则检查值是否两两不相交。&lt;/p&gt;
&lt;!--
An `includes()` function in CEL has also been introduced,
that lets device selectors keep working more easily when an attribute
changes between scalar and list representations.
(The `includes()` function is only available in DRA
contexts for expression evaluation).
--&gt;
&lt;p&gt;同时，CEL 中还引入了一个 &lt;code&gt;includes()&lt;/code&gt; 函数，
这使设备选择器在某个属性于标量表示和列表表示之间变化时，
仍可更容易地保持可用。
（&lt;code&gt;includes()&lt;/code&gt; 函数仅可用于 DRA 表达式求值上下文。）&lt;/p&gt;
&lt;!--
### Deterministic device selection {#deterministic-device-selection}
--&gt;
&lt;h3 id=&#34;deterministic-device-selection&#34;&gt;确定性设备选择&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deterministic-device-selection&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The Kubernetes scheduler has been updated to evaluate devices using lexicographical
ordering based on resource pool and ResourceSlice names. This change empowers drivers
to proactively influence the scheduling process, leading to improved throughput and
more optimal scheduling decisions. The ResourceSlice controller toolkit automatically
generates names that reflect the exact device ordering specified by the driver author.
--&gt;
&lt;p&gt;Kubernetes 调度器已更新：在评估设备时，会按资源池与 ResourceSlice 名称的字典序进行比较。
这样一来，驱动可以更主动地影响调度过程，有助于提高吞吐量并做出更优的调度决策。
ResourceSlice 控制器工具包还会自动生成名称，使其与驱动作者在实现里声明的设备先后次序一致。&lt;/p&gt;
&lt;!--
### Discoverable device metadata in containers {#device-metadata}
--&gt;
&lt;h3 id=&#34;device-metadata&#34;&gt;容器中可被发现的设备元数据&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#device-metadata&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Workloads running on nodes with DRA devices often need to discover details about
their allocated devices, such as PCI bus addresses or network
interface configuration, without querying the Kubernetes API. With
[Device metadata](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-metadata),
Kubernetes defines a standard protocol for how DRA drivers expose device
attributes to containers as versioned JSON files at well-known paths. Drivers
built with the
[DRA kubelet plugin library](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/kubeletplugin)
get this behavior transparently; they just provide the metadata and the
library handles file layout, CDI bind-mounts, versioning, and lifecycle. This
gives applications a consistent, driver-independent way to discover and
consume device metadata, eliminating the need for custom controllers or
looking up ResourceSlice objects to get metadata via attributes.
--&gt;
&lt;p&gt;运行在带有 DRA 设备的节点上的工作负载，通常需要在不查询 Kubernetes API 的情况下，
发现其已分配设备的详细信息，例如 PCI 总线地址或网络接口配置。
借助&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-metadata&#34;&gt;设备元数据&lt;/a&gt;，
Kubernetes 定义了一套标准协议，用于规定 DRA 驱动如何以带版本的 JSON 文件形式，
在约定路径下向容器暴露设备属性。
使用 &lt;a href=&#34;https://pkg.go.dev/k8s.io/dynamic-resource-allocation/kubeletplugin&#34;&gt;DRA kubelet plugin library&lt;/a&gt;
构建的驱动可以无需额外处理即可获得这一能力；它们只需要提供元数据，其余如文件布局、
CDI bind-mount、版本控制和生命周期管理，都由该库负责处理。
这为应用提供了一种一致、与驱动无关的方式来发现和使用设备元数据，
从而无需再借助自定义控制器或查询 ResourceSlice 对象并从其属性中获取元数据。&lt;/p&gt;
&lt;!--
## What’s next?
--&gt;
&lt;h2 id=&#34;后续计划&#34;&gt;后续计划&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%90%8e%e7%bb%ad%e8%ae%a1%e5%88%92&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This release introduced a wealth of new Dynamic Resource Allocation (DRA) features,
and the momentum is only building. As we look ahead, our roadmap focuses on maturing
existing features toward beta and stable releases while hardening DRA’s performance,
scalability, and reliability. A key priority over the coming cycles will be deep
integration with _workload aware_ and _topology aware scheduling_.
--&gt;
&lt;p&gt;这一版本引入了大量新的动态资源分配（DRA）特性，而且相关工作仍在持续推进。
展望未来，我们的路线图将聚焦于推动现有特性走向 Beta 和稳定发布阶段，
同时进一步夯实 DRA 的性能、可扩展性和可靠性。
在接下来的几个迭代周期中，一个关键优先事项将是与
&lt;strong&gt;工作负载感知调度&lt;/strong&gt; 和 &lt;strong&gt;拓扑感知调度&lt;/strong&gt; 的深度集成。&lt;/p&gt;
&lt;!--
A big goal for us is to migrate users from Device Plugin to DRA, and we want
you involved. Whether you are currently maintaining a driver or are just beginning
to explore the possibilities, your input is vital. Partner with us to shape the next
generation of resource management. Reach out today to collaborate on development,
share feedback, or start building your first DRA driver.
--&gt;
&lt;p&gt;我们的一个重要目标，是推动用户从设备插件迁移到 DRA，而我们也希望你参与其中。
无论你当前正在维护某个驱动，还是刚开始探索这些可能性，
你的意见都至关重要。与我们一起塑造下一代资源管理能力。
现在就联系我们，一起协作开发、分享反馈，或者开始构建你的第一个 DRA 驱动程序。&lt;/p&gt;
&lt;!--

## Getting involved
--&gt;
&lt;h2 id=&#34;参与其中&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e5%85%b6%e4%b8%ad&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
A good starting point is joining the WG Device Management 
[Slack channel](https://kubernetes.slack.com/archives/C0409NGC1TK) and
[meetings](https://docs.google.com/document/d/1qxI87VqGtgN7EAJlqVfxx86HGKEAc2A3SKru8nJHNkQ/edit?tab=t.0#heading=h.tgg8gganowxq),
which happen at Americas/EMEA and EMEA/APAC friendly time slots.
--&gt;
&lt;p&gt;一个不错的起点，是加入 WG Device Management 的
&lt;a href=&#34;https://kubernetes.slack.com/archives/C0409NGC1TK&#34;&gt;Slack 频道&lt;/a&gt;
和&lt;a href=&#34;https://docs.google.com/document/d/1qxI87VqGtgN7EAJlqVfxx86HGKEAc2A3SKru8nJHNkQ/edit?tab=t.0#heading=h.tgg8gganowxq&#34;&gt;会议&lt;/a&gt;，
这些会议分别安排在适合 Americas/EMEA 和 EMEA/APAC 的时间段举行。&lt;/p&gt;
&lt;!--
Not all enhancement ideas are tracked as issues yet, so come talk to us if you want to help or have some ideas yourself!
We have work to do at all levels, from difficult core changes to usability enhancements in kubectl, which could be picked up by newcomers.
--&gt;
&lt;p&gt;并非所有增强想法目前都已经作为 Issue 进行跟踪，
因此，如果你想提供帮助，或者你自己也有一些想法，欢迎来和我们交流。
我们在各个层面都有工作要做，从高难度核心变更，到 kubectl 的易用性增强，
其中一些工作也很适合新贡献者上手。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：声明式验证正式发布</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/05/kubernetes-v1-36-declarative-validation-ga/</link>
      <pubDate>Tue, 05 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/05/kubernetes-v1-36-declarative-validation-ga/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Declarative Validation Graduates to GA&#34;
date: 2026-05-05T10:35:00-08:00
slug: kubernetes-v1-36-declarative-validation-ga
author: &gt;
  [Yongrui Lin](https://github.com/yongruilin) (Google)
--&gt;
&lt;!--
In Kubernetes v1.36, **Declarative Validation** for Kubernetes native types has reached General Availability (GA).

For users, this means more reliable, predictable, and better-documented APIs. By moving to a declarative model, the project also unlocks the future ability to publish validation rules via OpenAPI and integrate with ecosystem tools like Kubebuilder. For contributors and ecosystem developers, this replaces thousands of lines of handwritten validation code with a unified, maintainable framework.

This post covers why this migration was necessary, how the declarative validation framework works, and what new capabilities come with this GA release.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，Kubernetes 原生类型的&lt;strong&gt;声明式验证&lt;/strong&gt;特性已正式发布（GA）。&lt;/p&gt;
&lt;p&gt;对于用户而言，这意味着更可靠、更可预测且文档更完善的 API。
通过迁移到声明式模型，该项目还为未来通过 OpenAPI 发布验证规则以及与 Kubebuilder 等生态系统工具集成奠定了基础。
对于贡献者和生态系统开发者而言，这意味着可以用一个统一且易于维护的框架取代数千行手写的验证代码。&lt;/p&gt;
&lt;p&gt;本文将介绍此次迁移的必要性、声明式验证框架的工作原理以及此正式版带来的新特性。&lt;/p&gt;
&lt;!--
## The Motivation: Escaping the &#34;Handwritten&#34; Technical Debt

For years, the validation of Kubernetes native APIs relied almost entirely on handwritten Go code. If a field needed to be bounded by a minimum value, or if two fields needed to be mutually exclusive, developers had to write explicit Go functions to enforce those constraints. 
--&gt;
&lt;h2 id=&#34;动机-摆脱-手写-技术债务&#34;&gt;动机：摆脱“手写”技术债务&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8a%a8%e6%9c%ba-%e6%91%86%e8%84%b1-%e6%89%8b%e5%86%99-%e6%8a%80%e6%9c%af%e5%80%ba%e5%8a%a1&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;多年来，Kubernetes 原生 API 的验证几乎完全依赖于手写的 Go 代码。
如果某个字段需要设置最小值限制，或者两个字段需要互斥，开发人员就必须编写显式的 Go
函数来强制执行这些约束。&lt;/p&gt;
&lt;!--
As the Kubernetes API surface expanded, this approach led to several systemic issues:
1. **Technical Debt:** The project accumulated roughly 18,000 lines of boilerplate validation code. This code was difficult to maintain, error-prone, and required intense scrutiny during code reviews.
2. **Inconsistency:** Without a centralized framework, validation rules were sometimes applied inconsistently across different resources.
3. **Opaque APIs:** Handwritten validation logic was difficult to discover or analyze programmatically. This meant clients and tooling couldn&#39;t predictably know validation rules without consulting the source code or encountering errors at runtime.

The solution proposed by SIG API Machinery was **Declarative Validation**: using Interface Definition Language (IDL) tags (specifically `+k8s:` marker tags) directly within `types.go` files to define validation rules.
--&gt;
&lt;p&gt;随着 Kubernetes API 接口的扩展，这种方法导致了几个系统性问题：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;技术债务&lt;/strong&gt;：该项目积累了大约 18,000 行样板验证代码。这些代码难以维护、容易出错，
并且在代码审查期间需要进行严格审查。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;不一致性&lt;/strong&gt;：由于缺乏集中式框架，验证规则有时会在不同的资源中以不一致的方式应用。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API 不透明&lt;/strong&gt;：手写的验证逻辑难以通过编程方式发现或分析。
这意味着客户端和工具无法在不查阅源代码或在运行时遇到错误的情况下，预先了解验证规则。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;SIG API Machinery 提出的解决方案是&lt;strong&gt;声明式验证&lt;/strong&gt;：
直接在 &lt;code&gt;types.go&lt;/code&gt; 文件中使用接口定义语言（IDL）标签（特别是 &lt;code&gt;+k8s:&lt;/code&gt; 标记标签）来定义验证规则。&lt;/p&gt;
&lt;!--
## Enter `validation-gen`

At the core of the declarative validation feature is a new code generator called `validation-gen`. Just as Kubernetes uses generators for deep copies, conversions, and defaulting, `validation-gen` parses `+k8s:` tags and automatically generates the corresponding Go validation functions.

These generated functions are then registered seamlessly with the API scheme. The generator is designed as an extensible framework, allowing developers to plug in new &#34;Validators&#34; by describing the tags they parse and the Go logic they should produce. 
--&gt;
&lt;h2 id=&#34;引入-validation-gen&#34;&gt;引入 &lt;code&gt;validation-gen&lt;/code&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bc%95%e5%85%a5-validation-gen&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;声明式验证特性的核心是一个名为 &lt;code&gt;validation-gen&lt;/code&gt; 的全新代码生成器。
正如 Kubernetes 使用生成器进行深度复制、转换和默认值设置一样，&lt;code&gt;validation-gen&lt;/code&gt;
会解析 &lt;code&gt;+k8s:&lt;/code&gt; 标签并自动生成相应的 Go 验证函数。&lt;/p&gt;
&lt;p&gt;这些生成的函数随后会无缝注册到 API 方案中。该生成器被设计为一个可扩展的框架，
允许开发人员通过描述其要解析的标签以及应生成的 Go 逻辑来插入新的“验证器”。&lt;/p&gt;
&lt;!--
### A Comprehensive Suite of +k8s: Tags

The declarative validation framework introduces a comprehensive suite of marker tags that provide rich validation capabilities highly optimized for Go types. For a full list of supported tags, check out the [official documentation](https://kubernetes.io/docs/reference/using-api/declarative-validation/#declarative-validation-tag-reference). Here is a catalog of some of the most common tags you will now see in the Kubernetes codebase:
--&gt;
&lt;h3 id=&#34;一套全面的-k8s-标签&#34;&gt;一套全面的 &lt;code&gt;+k8s:&lt;/code&gt; 标签&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%80%e5%a5%97%e5%85%a8%e9%9d%a2%e7%9a%84-k8s-%e6%a0%87%e7%ad%be&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;声明式验证框架引入了一套全面的标记标签，提供丰富的验证功能，并针对
Go 类型进行了高度优化。有关支持标签的完整列表，
请参阅&lt;a href=&#34;https://kubernetes.io/zh-cn/docs/reference/using-api/declarative-validation/#declarative-validation-tag-reference&#34;&gt;官方文档&lt;/a&gt;。
以下列出了一些你现在将在 Kubernetes 代码库中看到的最常用标签：&lt;/p&gt;
&lt;!--
*   **Presence:** `+k8s:optional`, `+k8s:required`
*   **Basic Constraints:** `+k8s:minimum=0`, `+k8s:maximum=100`, `+k8s:maxLength=16`, `+k8s:format=k8s-short-name`
*   **Collections:** `+k8s:listType=map`, `+k8s:listMapKey=type`
*   **Unions:** `+k8s:unionMember`, `+k8s:unionDiscriminator`
*   **Immutability:** `+k8s:immutable`, `+k8s:update=[NoSet, NoModify, NoClear]`

**Example Usage:**
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;存在性：&lt;/strong&gt; &lt;code&gt;+k8s:optional&lt;/code&gt;、&lt;code&gt;+k8s:required&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;基本约束：&lt;/strong&gt; &lt;code&gt;+k8s:minimum=0&lt;/code&gt;、&lt;code&gt;+k8s:maximum=100&lt;/code&gt;、&lt;code&gt;+k8s:maxLength=16&lt;/code&gt; 和 &lt;code&gt;+k8s:format=k8s-short-name&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;集合：&lt;/strong&gt; &lt;code&gt;+k8s:listType=map&lt;/code&gt;、&lt;code&gt;+k8s:listMapKey=type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;联合：&lt;/strong&gt; &lt;code&gt;+k8s:unionMember&lt;/code&gt;、&lt;code&gt;+k8s:unionDiscriminator&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;不可变性：&lt;/strong&gt; &lt;code&gt;+k8s:immutable&lt;/code&gt;、&lt;code&gt;+k8s:update=[NoSet, NoModify, NoClear]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;用法示例：&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;type&lt;/span&gt; ReplicationControllerSpec &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;struct&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// +k8s:optional&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// +k8s:minimum=0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    Replicas &lt;span style=&#34;color:#666&#34;&gt;*&lt;/span&gt;&lt;span style=&#34;color:#0b0;font-weight:bold&#34;&gt;int32&lt;/span&gt; &lt;span style=&#34;color:#b44&#34;&gt;`json:&amp;#34;replicas,omitempty&amp;#34;`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
By placing these tags directly above the field definitions, the constraints are self-documenting and immediately visible to anyone reading the type definitions.
--&gt;
&lt;p&gt;通过将这些标签直接放置在字段定义上方，约束条件就具有了自文档性，
任何阅读类型定义的人都可以立即看到这些约束条件。&lt;/p&gt;
&lt;!--
## Advanced Capabilities: &#34;Ambient Ratcheting&#34;

One of the most substantial outcomes of this work is that validation ratcheting is now a standard, ambient part of the API. In the past, if we needed to tighten validation, we had to first add handwritten ratcheting code, wait a release, and then tighten the validation to avoid breaking existing objects. 

With declarative validation, this safety mechanism is built-in. If a user updates an existing object, the validation framework compares the incoming object with the `oldObject`. If a specific field&#39;s value is semantically equivalent to its prior state (i.e., the user didn&#39;t change it), the new validation rule is bypassed. This &#34;ambient ratcheting&#34; means we can loosen or tighten validation immediately and in the least disruptive way possible.
--&gt;
&lt;h2 id=&#34;高级功能-ambient-棘轮机制&#34;&gt;高级功能：“Ambient 棘轮机制”&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%ab%98%e7%ba%a7%e5%8a%9f%e8%83%bd-ambient-%e6%a3%98%e8%bd%ae%e6%9c%ba%e5%88%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;这项工作最重要的成果之一是，验证棘轮机制现在已成为 API 的标准组成部分。
过去，如果我们需要加强验证，必须先编写手动棘轮代码，等待版本发布，然后再加强验证，以避免破坏现有对象。&lt;/p&gt;
&lt;p&gt;借助声明式验证，这种安全机制已内置。如果用户更新现有对象，验证框架会将传入的对象与 &lt;code&gt;oldObject&lt;/code&gt; 进行比较。
如果特定字段的值在语义上与其先前状态相同（即用户未对其进行更改），则新的验证规则将被忽略。
这种“Ambient 棘轮机制”意味着我们可以立即以尽可能减少干扰的方式放松或加强验证。&lt;/p&gt;
&lt;!--
## Scaling API Reviews with `kube-api-linter`

Reaching GA required absolute confidence in the generated code, but our vision extends beyond just validation. Declarative validation is a key part of a comprehensive approach to making API review easier, more consistent, and highly scalable.

By moving validation rules out of opaque Go functions and into structured markers, we are empowering tools like `kube-api-linter`. This linter can now statically analyze API types and enforce API conventions automatically, significantly reducing the manual burden on SIG API Machinery reviewers and providing immediate feedback to contributors.
--&gt;
&lt;h2 id=&#34;使用-kube-api-linter-扩展-api-审查&#34;&gt;使用 &lt;code&gt;kube-api-linter&lt;/code&gt; 扩展 API 审查&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bd%bf%e7%94%a8-kube-api-linter-%e6%89%a9%e5%b1%95-api-%e5%ae%a1%e6%9f%a5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;达到正式发布（GA）要求我们对生成的代码绝对有信心，但我们的愿景远不止于代码验证。
声明式验证是全面改进 API 审查的关键组成部分，它能使审查更轻松、更一致、更具可扩展性。&lt;/p&gt;
&lt;p&gt;通过将验证规则从不透明的 Go 函数中移至结构化标记，我们增强了 &lt;code&gt;kube-api-linter&lt;/code&gt;
等工具的功能。该代码检查器现在可以静态分析 API 类型并自动强制执行 API 约定，
从而显著减轻 SIG API Machinery 审查人员的手动负担，并为贡献者提供即时反馈。&lt;/p&gt;
&lt;!--
## What&#39;s next?

With the release of Kubernetes v1.36, Declarative Validation graduates to General Availability (GA). As a stable feature, the associated `DeclarativeValidation` feature gate is now enabled by default. It has become the primary mechanism for adding new validation rules to Kubernetes native types.
--&gt;
&lt;h2 id=&#34;下一步是什么&#34;&gt;下一步是什么？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%8b%e4%b8%80%e6%ad%a5%e6%98%af%e4%bb%80%e4%b9%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;随着 Kubernetes v1.36 的发布，声明式验证正式上线（GA）。
作为一项稳定特性，相关的 &lt;code&gt;DeclarativeValidation&lt;/code&gt; 特性门控现在默认启用。
它已成为向 Kubernetes 原生类型添加新验证规则的主要机制。&lt;/p&gt;
&lt;!--
Looking forward, the project is committed to adopting declarative validation even more extensively. This includes migrating the remaining legacy handwritten validation code for established APIs and requiring its use for all new APIs and new fields. This ongoing transition will continue to shrink the codebase&#39;s complexity while enhancing the consistency and reliability of the entire Kubernetes API surface.

Beyond the core migration, declarative validation also unlocks an exciting future for the broader ecosystem. Because validation rules are now defined as structured markers rather than opaque Go code, they can be parsed and reflected in the OpenAPI schemas published by the Kubernetes API server. This paves the way for tools like `kubectl`, client libraries, and IDEs to perform rich client-side validation before a request is ever sent to the cluster. The same declarative framework can also be consumed by ecosystem tools like Kubebuilder, enabling a more consistent developer experience for authors of Custom Resource Definitions (CRDs).
--&gt;
&lt;p&gt;展望未来，该项目致力于更广泛地采用声明式验证。
这包括迁移现有 API 中剩余的旧式手写验证代码，并要求所有新 API 和新字段都使用声明式验证。
这一持续的过渡将不断降低代码库的复杂性，同时增强整个 Kubernetes API 接口的一致性和可靠性。&lt;/p&gt;
&lt;p&gt;除了核心迁移之外，声明式验证也为更广泛的生态系统开启了令人兴奋的未来。
由于验证规则现在被定义为结构化标记，而不是不透明的 Go 代码，因此它们可以被解析并反映在
Kubernetes API 服务器发布的 OpenAPI schema 中。这为 &lt;code&gt;kubectl&lt;/code&gt; 等工具、客户端库和
IDE 等在向集群发送请求之前执行丰富的客户端验证铺平了道路。
同样的声明式框架也可以被 Kubebuilder 等生态系统工具使用，从而为自定义资源定义（CRD）的作者带来更一致的开发体验。&lt;/p&gt;
&lt;!--
## Getting involved

The migration to declarative validation is an ongoing effort. While the framework itself is GA, there is still work to be done migrating older APIs to the new declarative format. 

If you are interested in contributing to the core of Kubernetes API Machinery, this is a fantastic place to start. Check out the `validation-gen` documentation, look for issues tagged with `sig/api-machinery`, and join the conversation in the [#sig-api-machinery](https://kubernetes.slack.com/messages/sig-api-machinery) and [#sig-api-machinery-dev-tools](https://kubernetes.slack.com/messages/sig-api-machinery-dev-tools) channels on Kubernetes Slack (for an invitation, visit [https://slack.k8s.io/](https://slack.k8s.io/)). You can also attend the [SIG API Machinery meetings](https://github.com/kubernetes/community/tree/master/sig-api-machinery#meetings) to get involved directly.
--&gt;
&lt;h2 id=&#34;参与其中&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e5%85%b6%e4%b8%ad&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;向声明式验证的迁移是一项持续进行的工作。虽然框架本身已经正式发布 (GA)，
但仍需将旧版 API 迁移到新的声明式格式。&lt;/p&gt;
&lt;p&gt;如果你有兴趣为 Kubernetes API Machinery 的核心做出贡献，这里是一个绝佳的起点。
请查看 &lt;code&gt;validation-gen&lt;/code&gt; 文档，查找带有 &lt;code&gt;sig/api-machinery&lt;/code&gt; 标签的问题，
并加入 Kubernetes Slack 上的 &lt;a href=&#34;https://kubernetes.slack.com/messages/sig-api-machinery&#34;&gt;#sig-api-machinery&lt;/a&gt;
和 &lt;a href=&#34;https://kubernetes.slack.com/messages/sig-api-machinery-dev-tools&#34;&gt;#sig-api-machinery-dev-tools&lt;/a&gt;
频道参与讨论（如需邀请，请访问 &lt;a href=&#34;https://slack.k8s.io/&#34;&gt;https://slack.k8s.io/&lt;/a&gt;）。
你还可以参加
&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-api-machinery#meetings&#34;&gt;SIG API Machinery 会议&lt;/a&gt;直接参与其中。&lt;/p&gt;
&lt;!--
## Acknowledgments

A huge thank you to everyone who helped bring this feature to GA:
--&gt;
&lt;h2 id=&#34;致谢&#34;&gt;致谢&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%87%b4%e8%b0%a2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;衷心感谢所有帮助将此特性上线 GA 的朋友们：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/thockin&#34;&gt;Tim Hockin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/jpbetz&#34;&gt;Joe Betz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/aaron-prindle&#34;&gt;Aaron Prindle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/lalitc375&#34;&gt;Lalit Chauhan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/deads2k&#34;&gt;David Eads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/darshansreenivas&#34;&gt;Darshan Murthy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/liggitt&#34;&gt;Jordan Liggitt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/pohly&#34;&gt;Patrick Ohly&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/soltysh&#34;&gt;Maciej Szulik&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/wojtek-t&#34;&gt;Wojciech Tyczynski&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/JoelSpeed&#34;&gt;Joel Speed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/everettraven&#34;&gt;Bryce Palmer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
And the many others across the Kubernetes community who contributed along the way.

Welcome to the declarative future of Kubernetes validation!
--&gt;
&lt;p&gt;以及 Kubernetes 社区中其他众多为此做出贡献的人。&lt;/p&gt;
&lt;p&gt;欢迎来到 Kubernetes 验证的声明式未来！&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：无法删除的准入策略</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/04/kubernetes-v1-36-manifest-based-admission-control/</link>
      <pubDate>Mon, 04 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/04/kubernetes-v1-36-manifest-based-admission-control/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Admission Policies That Can&#39;t Be Deleted&#34;
date: 2026-05-04T10:35:00-08:00
slug: kubernetes-v1-36-manifest-based-admission-control
author: &gt;
  [Anish Ramasekar](https://github.com/aramase) (Microsoft),
  [Benjamin Elder](https://github.com/BenTheElder) (Google)
--&gt;
&lt;!--
If you&#39;ve ever tried to enforce a security policy across a fleet of
Kubernetes clusters, you&#39;ve probably run into a frustrating chicken-and-egg
problem. Your admission policies are API objects, which means they don&#39;t
exist until someone creates them, and they can be deleted by anyone with
the right permissions. There&#39;s always a window during cluster bootstrap
where your policies aren&#39;t active yet, and there&#39;s no way to prevent a
privileged user from removing them.
--&gt;
&lt;p&gt;如果你曾尝试在一组 Kubernetes 集群上强制执行安全策略，你可能遇到过一个令人沮丧的先有鸡还是先有蛋的问题。
你的准入策略是 API 对象，这意味着它们在有人创建之前不存在，并且任何具有适当权限的人都可以删除它们。
在集群引导期间，总是存在一个窗口，此时你的策略尚未生效，并且无法阻止特权用户删除它们。&lt;/p&gt;
&lt;!--
Kubernetes v1.36 introduces an alpha feature that addresses this:
*manifest-based admission control*. It lets you define admission webhooks
and [CEL](/docs/reference/using-api/cel/)-based policies as files on disk, loaded by the API server at
startup, before it serves any requests.
--&gt;
&lt;p&gt;Kubernetes v1.36 引入了一个 Alpha 特性来解决这个问题：
&lt;strong&gt;基于清单的准入控制&lt;/strong&gt;。它允许你将准入 Webhook 和基于
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/using-api/cel/&#34;&gt;CEL&lt;/a&gt; 的策略定义为磁盘上的文件，
由 API 服务器在启动时、处理任何请求之前加载。&lt;/p&gt;
&lt;!--
## The gap we&#39;re closing
--&gt;
&lt;h2 id=&#34;我们正在填补的空白&#34;&gt;我们正在填补的空白&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%88%91%e4%bb%ac%e6%ad%a3%e5%9c%a8%e5%a1%ab%e8%a1%a5%e7%9a%84%e7%a9%ba%e7%99%bd&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Most Kubernetes policy enforcement today works through the API. You create
a ValidatingAdmissionPolicy or a webhook configuration as an API object,
and the admission controller picks it up. This works well in steady state,
but it has some fundamental limitations.
--&gt;
&lt;p&gt;如今，大多数 Kubernetes 策略强制执行都是通过 API 进行的。
你创建 ValidatingAdmissionPolicy 或 Webhook 配置作为 API 对象，准入控制器会接收它。
这在稳定状态下工作良好，但存在一些基本限制。&lt;/p&gt;
&lt;!--
During cluster bootstrap, there&#39;s a gap between when the API server starts
serving requests and when your policies are created and active. If you&#39;re
restoring from a backup or recovering from an etcd failure, that gap can be
significant.
--&gt;
&lt;p&gt;在集群引导期间，API 服务器开始处理请求与你的策略创建并生效之间存在一个间隙。
如果你从备份恢复或从 etcd 故障中恢复，这个间隙可能会很大。&lt;/p&gt;
&lt;!--
There&#39;s also a self-protection problem. Admission webhooks and policies
can&#39;t intercept operations on their own configuration resources. Kubernetes
skips invoking webhooks on types like ValidatingWebhookConfiguration to
avoid circular dependencies. That means a sufficiently privileged user can
delete your critical admission policies, and there&#39;s nothing in the
admission chain to stop them.
--&gt;
&lt;p&gt;还有一个自我保护问题。准入 Webhook 和策略无法拦截对其自身配置资源的操作。
Kubernetes 跳过对 ValidatingWebhookConfiguration 等类型调用 Webhook，以避免循环依赖。
这意味着具有足够权限的用户可以删除你的关键准入策略，而准入链中没有任何东西可以阻止他们。&lt;/p&gt;
&lt;!--
We - Kubernetes SIG API Machinery - wanted a way to say &#34;these policies are always on, full stop.&#34;
--&gt;
&lt;p&gt;我们 —— Kubernetes SIG API Machinery —— 希望有一种方式可以说&amp;quot;这些策略始终启用，到此为止。&amp;quot;&lt;/p&gt;
&lt;!--
## How it works
--&gt;
&lt;h2 id=&#34;工作原理&#34;&gt;工作原理&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b7%a5%e4%bd%9c%e5%8e%9f%e7%90%86&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
You add a `staticManifestsDir` field to the `AdmissionConfiguration` file
that you already pass to the API server via `--admission-control-config-file`.
Point it at a directory, drop your policy YAML files in there, and the API
server loads them before it starts serving.
--&gt;
&lt;p&gt;你在已经通过 &lt;code&gt;--admission-control-config-file&lt;/code&gt; 传递给 API 服务器的
&lt;code&gt;AdmissionConfiguration&lt;/code&gt; 文件中添加一个 &lt;code&gt;staticManifestsDir&lt;/code&gt; 字段。
将其指向一个目录，将你的策略 YAML 文件放在那里，API 服务器会在开始服务之前加载它们。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;apiserver.config.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;AdmissionConfiguration&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;plugins&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ValidatingAdmissionPolicy&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;configuration&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;apiserver.config.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ValidatingAdmissionPolicyConfiguration&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;staticManifestsDir&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/etc/kubernetes/admission/validating-policies/&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
The manifest files are standard Kubernetes resource definitions. The only
requirement is that all the objects that these manifests define **must** have names ending in `.static.k8s.io`.
This reserved suffix prevents collisions with API-based configurations and
makes it easy to tell where an admission decision came from when you&#39;re
looking at metrics or audit logs.
--&gt;
&lt;p&gt;清单文件是标准的 Kubernetes 资源定义。唯一的要求是这些清单定义的所有对象&lt;strong&gt;必须&lt;/strong&gt;以 &lt;code&gt;.static.k8s.io&lt;/code&gt; 结尾。
这个保留的后缀可以防止与基于 API 的配置冲突，并在查看指标或审计日志时轻松判断准入决策的来源。&lt;/p&gt;
&lt;!--
Here&#39;s a complete example that denies privileged containers outside
kube-system:
--&gt;
&lt;p&gt;以下是一个完整的示例，拒绝 kube-system 之外的特权容器：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;admissionregistration.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ValidatingAdmissionPolicy&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;deny-privileged.static.k8s.io&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kubernetes.io/description&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Deny launching privileged pods, anywhere this policy is applied&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;failurePolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Fail&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matchConstraints&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceRules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiGroups&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;v1&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;CREATE&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;UPDATE&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;pods&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;variables&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;allContainers&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;expression&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&amp;gt;-&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      object.spec.containers +
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      (has(object.spec.initContainers) ? object.spec.initContainers : []) +
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      (has(object.spec.ephemeralContainers) ? object.spec.ephemeralContainers : [])&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;validations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;expression&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&amp;gt;-&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      !variables.allContainers.exists(c,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      has(c.securityContext) &amp;amp;&amp;amp; has(c.securityContext.privileged) &amp;amp;&amp;amp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      c.securityContext.privileged == true)&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;message&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Privileged containers are not allowed&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;admissionregistration.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ValidatingAdmissionPolicyBinding&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;deny-privileged-binding.static.k8s.io&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kubernetes.io/description&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Bind deny-privileged policy to all namespaces except kube-system&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;policyName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;deny-privileged.static.k8s.io&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;validationActions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- Deny&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matchResources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespaceSelector&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matchExpressions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;kubernetes.io/metadata.name&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;NotIn&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;values&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;kube-system&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Protecting what couldn&#39;t be protected before
--&gt;
&lt;h2 id=&#34;保护以前无法保护的内容&#34;&gt;保护以前无法保护的内容&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bf%9d%e6%8a%a4%e4%bb%a5%e5%89%8d%e6%97%a0%e6%b3%95%e4%bf%9d%e6%8a%a4%e7%9a%84%e5%86%85%e5%ae%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The part we&#39;re most excited about is the ability to intercept operations on
admission configuration resources themselves.
--&gt;
&lt;p&gt;我们最兴奋的部分是能够拦截对准入配置资源本身的操作。&lt;/p&gt;
&lt;!--
With API-based admission, webhooks and policies are never invoked on types
like ValidatingAdmissionPolicy or ValidatingWebhookConfiguration. That
restriction exists for good reason: if a webhook could reject changes to
its own configuration, you could end up locked out with no way to fix it
through the API.
--&gt;
&lt;p&gt;使用基于 API 的准入，Webhook 和策略永远不会在 ValidatingAdmissionPolicy 或 ValidatingWebhookConfiguration 等类型上调用。
这个限制存在是有充分理由的：如果 Webhook 可以拒绝对其自身配置的更改，你可能会被锁定，无法通过 API 修复它。&lt;/p&gt;
&lt;!--
Manifest-based policies don&#39;t have that problem. If a bad policy is
blocking something it shouldn&#39;t, you fix the file on disk and the API
server picks up the change. There&#39;s no circular dependency because the
recovery path doesn&#39;t go through the API.
--&gt;
&lt;p&gt;基于清单的策略没有这个问题。如果一个错误的策略阻止了它不应该阻止的东西，你可以修复磁盘上的文件，API 服务器会接收到更改。
不存在循环依赖，因为恢复路径不通过 API。&lt;/p&gt;
&lt;!--
This means you can write a manifest-based policy that prevents deletion of
your critical API-based admission policies. For platform teams managing
shared clusters, this is a significant improvement. You can now guarantee
that your baseline security policies can&#39;t be removed by a cluster admin,
accidentally or otherwise.
--&gt;
&lt;p&gt;这意味着你可以编写一个基于清单的策略来防止删除关键的基于 API 的准入策略。
对于管理共享集群的平台团队来说，这是一个重大改进。
你现在可以保证你的基线安全策略不会被集群管理员删除，无论是意外还是故意。&lt;/p&gt;
&lt;!--
Here&#39;s what that looks like in practice. This policy prevents any
modification or deletion of admission resources that carry the
`platform.example.com/protected: &#34;true&#34;` label:
--&gt;
&lt;p&gt;以下是实际应用中的示例。此策略防止修改或删除带有
&lt;code&gt;platform.example.com/protected: &amp;quot;true&amp;quot;&lt;/code&gt; 标签的准入资源：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;admissionregistration.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ValidatingAdmissionPolicy&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;protect-policies.static.k8s.io&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kubernetes.io/description&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Prevent modification or deletion of protected admission resources&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;failurePolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Fail&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matchConstraints&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceRules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiGroups&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;admissionregistration.k8s.io&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;*&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;DELETE&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;UPDATE&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;validatingadmissionpolicies&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;validatingadmissionpolicybindings&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;validatingwebhookconfigurations&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;mutatingwebhookconfigurations&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;validations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;expression&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&amp;gt;-&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      !has(oldObject.metadata.labels) ||
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      !(&amp;#39;platform.example.com/protected&amp;#39; in oldObject.metadata.labels) ||
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      oldObject.metadata.labels[&amp;#39;platform.example.com/protected&amp;#39;] != &amp;#39;true&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;message&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Protected admission resources cannot be modified or deleted&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;admissionregistration.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ValidatingAdmissionPolicyBinding&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;protect-policies-binding.static.k8s.io&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kubernetes.io/description&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Bind protect-policies policy to all admission resources&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;policyName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;protect-policies.static.k8s.io&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;validationActions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- Deny&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
With this in place, any API-based admission policy or webhook configuration
labeled `platform.example.com/protected: &#34;true&#34;` is shielded from tampering.
The protection itself lives on disk and can&#39;t be removed through the API.
--&gt;
&lt;p&gt;有了这个策略，任何带有 &lt;code&gt;platform.example.com/protected: &amp;quot;true&amp;quot;&lt;/code&gt;
标签的基于 API 的准入策略或 webhook 配置都受到保护，不会被篡改。
保护本身存储在磁盘上，无法通过 API 删除。&lt;/p&gt;
&lt;!--
## A few things to know
--&gt;
&lt;h2 id=&#34;需要知道的几件事&#34;&gt;需要知道的几件事&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%9c%80%e8%a6%81%e7%9f%a5%e9%81%93%e7%9a%84%e5%87%a0%e4%bb%b6%e4%ba%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Manifest-based configurations are intentionally self-contained. They can&#39;t
reference API resources, which means no `paramKind` for policies, no
Service references for admission webhooks (instead they are URL-only),
and bindings may only reference
policies in the same manifest set. These restrictions exist because the
configurations need to work without any cluster state, including at startup
before etcd is available.
--&gt;
&lt;p&gt;基于清单的配置故意设计为自包含的。它们不能引用 API 资源，这意味着策略没有 &lt;code&gt;paramKind&lt;/code&gt;，
准入 Webhook 没有 Service 引用（而是仅使用 URL），
并且绑定只能引用同一清单集中的策略。这些限制存在是因为配置需要在没有任何集群状态的情况下工作，
包括在 etcd 可用之前的启动阶段。&lt;/p&gt;
&lt;!--
If you run multiple API server instances, each one loads its own manifest
files independently. There&#39;s no cross-server synchronization built in. This
is the same model as other file-based API server configurations like
encryption at rest. When this feature is enabled, Kubernetes exposes a configuration hash as a label on relevant metrics, so you can
detect drift.
--&gt;
&lt;p&gt;如果你运行多个 API 服务器实例，每个实例独立加载自己的清单文件。没有内置的跨服务器同步。
这与其他基于文件的 API 服务器配置（如静态加密）的模型相同。
启用此特性后，Kubernetes 会在相关指标上公开配置哈希作为标签，因此你可以检测漂移。&lt;/p&gt;
&lt;!--
Files are watched for changes at runtime, so you don&#39;t need to restart the
API server to update policies. If you update a manifest file, the API
server validates the new configuration and swaps it in atomically. If
validation fails, it keeps the previous good configuration and logs the
error. This means you can roll out policy changes across your fleet using
standard configuration management tools (Ansible, Puppet, or even mounted
ConfigMaps) without any API server downtime.
--&gt;
&lt;p&gt;文件在运行时会被监视更改，因此你无需重启 API 服务器即可更新策略。
如果你更新清单文件，API 服务器会验证新配置并原子性地切换到新配置。
如果验证失败，它会保留之前的良好配置并记录错误。
这意味着你可以使用标准配置管理工具（Ansible、Puppet，甚至挂载的 ConfigMap）在整个集群中推出策略更改，
而不会导致 API 服务器停机。&lt;/p&gt;
&lt;!--
The initial load at startup is stricter: if any manifest is invalid, the
API server won&#39;t start. This is intentional. At startup, failing fast is
safer than running without your expected policies.
--&gt;
&lt;p&gt;启动时的初始加载更加严格：如果任何清单无效，API 服务器将不会启动。这是有意为之的。
在启动时，快速失败比没有预期策略运行更安全。&lt;/p&gt;
&lt;!--
## Try it out
--&gt;
&lt;h2 id=&#34;尝试一下&#34;&gt;尝试一下&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b0%9d%e8%af%95%e4%b8%80%e4%b8%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To try this in Kubernetes v1.36:

1. Enable the [`ManifestBasedAdmissionControlConfig`](/docs/reference/command-line-tools-reference/feature-gates/#ManifestBasedAdmissionControlConfig)
   feature gate for each kube-apiserver.
2. Create a directory with your static manifest files.
   If you need to mount that in to the Pod where the API server runs, do that too. Read-only is fine.
3. Configure `staticManifestsDir` in your [`AdmissionConfiguration`](/docs/reference/access-authn-authz/admission-controllers/)
   with the directory path.
4. Start the API server with `--admission-control-config-file` pointing to
   your `AdmissionConfiguration` file.
--&gt;
&lt;p&gt;要在 Kubernetes v1.36 中尝试此特性：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;为每个 kube-apiserver 启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#ManifestBasedAdmissionControlConfig&#34;&gt;&lt;code&gt;ManifestBasedAdmissionControlConfig&lt;/code&gt;&lt;/a&gt;
特性门控。&lt;/li&gt;
&lt;li&gt;创建一个包含静态清单文件的目录。
如果需要将其挂载到 API 服务器运行的 Pod 中，请进行挂载。只读模式即可。&lt;/li&gt;
&lt;li&gt;在你的 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/access-authn-authz/admission-controllers/&#34;&gt;&lt;code&gt;AdmissionConfiguration&lt;/code&gt;&lt;/a&gt;
中配置 &lt;code&gt;staticManifestsDir&lt;/code&gt;，指定目录路径。&lt;/li&gt;
&lt;li&gt;使用 &lt;code&gt;--admission-control-config-file&lt;/code&gt; 指向你的 &lt;code&gt;AdmissionConfiguration&lt;/code&gt; 文件启动 API 服务器。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
The full documentation is at
[Manifest-Based Admission Control](/docs/reference/access-authn-authz/manifest-admission-control/),
and you can follow
[KEP-5793](https://kep.k8s.io/5793)
for ongoing progress.
--&gt;
&lt;p&gt;完整文档位于
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/access-authn-authz/manifest-admission-control/&#34;&gt;Manifest-Based Admission Control&lt;/a&gt;，
你可以关注
&lt;a href=&#34;https://kep.k8s.io/5793&#34;&gt;KEP-5793&lt;/a&gt;
了解持续进展。&lt;/p&gt;
&lt;!--
We&#39;d love to hear your feedback. Reach out on the
[#sig-api-machinery](https://kubernetes.slack.com/archives/C0EG7JC6T)
channel on Kubernetes Slack
(for an invitation, visit [https://slack.k8s.io/](https://slack.k8s.io/)).
--&gt;
&lt;p&gt;我们很想听听你的反馈。请在 Kubernetes Slack 上的
&lt;a href=&#34;https://kubernetes.slack.com/archives/C0EG7JC6T&#34;&gt;#sig-api-machinery&lt;/a&gt;
频道联系我们
（如需邀请，请访问 &lt;a href=&#34;https://slack.k8s.io/&#34;&gt;https://slack.k8s.io/&lt;/a&gt;）。&lt;/p&gt;
&lt;!--
## How to get involved
--&gt;
&lt;h2 id=&#34;如何参与&#34;&gt;如何参与&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e5%8f%82%e4%b8%8e&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you&#39;re interested in contributing to this feature or other
SIG API Machinery projects, join us on
[#sig-api-machinery](https://kubernetes.slack.com/archives/C0EG7JC6T)
on Kubernetes Slack. You&#39;re also welcome to attend the
[SIG API Machinery meetings](https://github.com/kubernetes/community/blob/master/sig-api-machinery/README.md#meetings),
held every other Wednesday.
--&gt;
&lt;p&gt;如果你有兴趣为这个特性或其他 SIG API Machinery 项目做出贡献，请加入 Kubernetes Slack 上的
&lt;a href=&#34;https://kubernetes.slack.com/archives/C0EG7JC6T&#34;&gt;#sig-api-machinery&lt;/a&gt;。
也欢迎你参加
&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-api-machinery/README.md#meetings&#34;&gt;SIG API Machinery 会议&lt;/a&gt;，
每两周周三举行一次。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：Pod 级资源管理器（Alpha）</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/01/kubernetes-v1-36-feature-pod-level-resource-managers-alpha/</link>
      <pubDate>Fri, 01 May 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/05/01/kubernetes-v1-36-feature-pod-level-resource-managers-alpha/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Pod-Level Resource Managers (Alpha)&#34;
date: 2026-05-01T10:35:00-08:00
slug: kubernetes-v1-36-feature-pod-level-resource-managers-alpha
author: Kevin Torres Martinez (Google)
--&gt;
&lt;!--
Kubernetes v1.36 introduces
[Pod-Level Resource Managers](/docs/concepts/workloads/resource-managers/#pod-level-resource-managers)
as an alpha feature, bringing a more flexible and powerful resource management
model to performance-sensitive workloads. This enhancement extends the kubelet&#39;s
Topology, CPU, and Memory Managers to support pod-level resource specifications
(`.spec.resources`), evolving them from a strictly per-container allocation
model to a pod-centric one.
--&gt;
&lt;p&gt;Kubernetes v1.36 将
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/docs/concepts/workloads/resource-managers/#pod-level-resource-managers&#34;&gt;Pod 级资源管理器&lt;/a&gt;
作为 Alpha 特性引入，为对性能敏感的工作负载带来了一种更灵活、更强大的资源管理模型。
这一增强将 kubelet 的拓扑管理器（Topology Manager）、CPU 管理器和内存管理器扩展为支持 Pod 级别资源规约
（&lt;code&gt;.spec.resources&lt;/code&gt;），使它们从严格按容器分配的模型演进为以 Pod 为中心的模型。&lt;/p&gt;
&lt;!--
## Why do we need pod-level resource managers?
--&gt;
&lt;h2 id=&#34;为什么需要-pod-级资源管理器&#34;&gt;为什么需要 Pod 级资源管理器？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%ba%e4%bb%80%e4%b9%88%e9%9c%80%e8%a6%81-pod-%e7%ba%a7%e8%b5%84%e6%ba%90%e7%ae%a1%e7%90%86%e5%99%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
When running performance-critical workloads such as machine learning (ML)
training, high-frequency trading applications, or low-latency databases, you
often need exclusive, NUMA-aligned resources for your primary application
containers to ensure predictable performance.
--&gt;
&lt;p&gt;当运行机器学习（ML）训练、高频交易应用或低延迟数据库这类对性能要求严苛的工作负载时，
你通常需要为主要应用容器分配独占且经过 NUMA 对齐的资源，以确保性能可预测。&lt;/p&gt;
&lt;!--
However, modern Kubernetes pods rarely consist of just one container. They
frequently include sidecar containers for logging, monitoring, service meshes,
or data ingestion.
--&gt;
&lt;p&gt;不过，现代 Kubernetes Pod 很少只包含一个容器。
它们通常还会包含用于日志、监控、服务网格或数据摄取的边车容器。&lt;/p&gt;
&lt;!--
Before this feature, this created a trade-off, to get NUMA-aligned, exclusive
resources for your main application, you had to allocate exclusive,
integer-based CPU resources to *every* container in the pod. This might be
wasteful for lightweight sidecars. If you didn&#39;t do this, you forfeited the
pod&#39;s Guaranteed Quality of Service (QoS) class entirely, losing the performance
benefits.
--&gt;
&lt;p&gt;在这一特性出现之前，这会带来一种取舍：为了让主应用获得 NUMA 对齐的独占资源，
你必须为 Pod 中的&lt;strong&gt;每一个&lt;/strong&gt;容器都分配基于整数的独占 CPU 资源。
这对于轻量级边车来说可能是一种浪费。
如果不这样做，你就会完全失去该 Pod 的 Guaranteed 服务质量（QoS）类，
同时失去相应的性能收益。&lt;/p&gt;
&lt;!--
## Introducing pod-level resource managers
--&gt;
&lt;h2 id=&#34;引入-pod-级资源管理器&#34;&gt;引入 Pod 级资源管理器&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bc%95%e5%85%a5-pod-%e7%ba%a7%e8%b5%84%e6%ba%90%e7%ae%a1%e7%90%86%e5%99%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Enabling pod-level resources support for the resource managers (via the
`PodLevelResourceManagers` and `PodLevelResources` feature gates) allows the
kubelet to create **hybrid resource allocation models**. This brings flexibility
and efficiency to high-performance workloads without sacrificing NUMA alignment.
--&gt;
&lt;p&gt;为资源管理器启用 Pod 级别资源支持（通过 &lt;code&gt;PodLevelResourceManagers&lt;/code&gt; 和
&lt;code&gt;PodLevelResources&lt;/code&gt; 特性门控）后，kubelet 就能够创建&lt;strong&gt;混合资源分配模型&lt;/strong&gt;。
这为高性能工作负载带来了灵活性和效率，同时又不牺牲 NUMA 对齐。&lt;/p&gt;
&lt;!--
### Real-world use cases
--&gt;
&lt;h3 id=&#34;真实世界中的用例&#34;&gt;真实世界中的用例&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%9c%9f%e5%ae%9e%e4%b8%96%e7%95%8c%e4%b8%ad%e7%9a%84%e7%94%a8%e4%be%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Here are a few practical scenarios demonstrating how this feature can be
applied, depending on the configured Topology Manager scope:
--&gt;
&lt;p&gt;下面通过几个实际场景说明，在不同的拓扑管理器作用域下，这一特性可以如何应用：&lt;/p&gt;
&lt;!--
#### 1. Tightly-coupled database (Topology manager&#39;s pod scope)
--&gt;
&lt;h4 id=&#34;1-紧密耦合的数据库-拓扑管理器的-pod-作用域&#34;&gt;1. 紧密耦合的数据库（拓扑管理器的 &lt;code&gt;pod&lt;/code&gt; 作用域）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#1-%e7%b4%a7%e5%af%86%e8%80%a6%e5%90%88%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93-%e6%8b%93%e6%89%91%e7%ae%a1%e7%90%86%e5%99%a8%e7%9a%84-pod-%e4%bd%9c%e7%94%a8%e5%9f%9f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
Consider a latency-sensitive database pod that includes a main database
container, a local metrics exporter, and a backup agent sidecar.
--&gt;
&lt;p&gt;假设有一个对延迟敏感的数据库 Pod，其中包含一个主数据库容器、一个本地指标导出器，
以及一个备份代理边车容器。&lt;/p&gt;
&lt;!--
When configured with the `pod` Topology Manager scope, the kubelet performs a
single NUMA alignment based on the entire pod&#39;s budget. The database container
gets its exclusive CPU and memory slices from that NUMA node. The remaining
resources from the pod&#39;s budget form a new **pod shared pool**. The metrics
exporter and backup agent run in this pod shared pool. They share resources with
each other, but they are strictly isolated from the database&#39;s exclusive slices
and the rest of the node.
--&gt;
&lt;p&gt;当配置为拓扑管理器的 &lt;code&gt;pod&lt;/code&gt; 作用域时，kubelet 会基于整个 Pod 的资源预算执行一次统一的 NUMA 对齐。
数据库容器会从该 NUMA 节点获得自己的独占 CPU 和内存切片。
Pod 预算中的剩余资源会形成一个新的 &lt;strong&gt;Pod 共享池&lt;/strong&gt;。
指标导出器和备份代理运行在这个 Pod 共享池中。
它们彼此共享资源，但会与数据库的独占切片以及节点其余部分严格隔离。&lt;/p&gt;
&lt;!--
This allows you to safely co-locate auxiliary containers on the same NUMA node
as your primary workload without wasting dedicated cores on them.
--&gt;
&lt;p&gt;这样一来，你就可以安全地将辅助容器与主工作负载放置在同一个 NUMA 节点上，
同时又不必为这些辅助容器浪费专用核心。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;tightly-coupled-database&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# Pod 级别资源定义整体预算和 NUMA 对齐规模。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requests&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;8&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;16Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;limits&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;8&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;16Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;initContainers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;metrics-exporter&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;metrics-exporter:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;restartPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Always&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;backup-agent&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;backup-agent:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;restartPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Always&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;database&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;database:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 这个 Guaranteed 容器从 Pod 预算中获得独占的 6 个 CPU 切片。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 剩余的 2 个 CPU 和 4Gi 内存会构成供边车使用的 Pod 共享池。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requests&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;6&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;12Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;limits&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;6&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;12Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
#### 2. ML workload with infrastructure sidecars (Topology manager&#39;s container scope)
--&gt;
&lt;h4 id=&#34;2-带基础设施边车的-ml-工作负载-拓扑管理器的-container-作用域&#34;&gt;2. 带基础设施边车的 ML 工作负载（拓扑管理器的 &lt;code&gt;container&lt;/code&gt; 作用域）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#2-%e5%b8%a6%e5%9f%ba%e7%a1%80%e8%ae%be%e6%96%bd%e8%be%b9%e8%bd%a6%e7%9a%84-ml-%e5%b7%a5%e4%bd%9c%e8%b4%9f%e8%bd%bd-%e6%8b%93%e6%89%91%e7%ae%a1%e7%90%86%e5%99%a8%e7%9a%84-container-%e4%bd%9c%e7%94%a8%e5%9f%9f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
Imagine a pod running a GPU-accelerated ML training workload alongside a generic
service mesh sidecar.
--&gt;
&lt;p&gt;设想一个 Pod 运行着 GPU 加速的 ML 训练工作负载，同时还带有一个通用的服务网格边车。&lt;/p&gt;
&lt;!--
Under the `container` Topology Manager scope, the kubelet evaluates each
container individually. You can grant the ML container exclusive, NUMA-aligned
CPUs and Memory for maximum performance. Meanwhile, the service mesh sidecar
doesn&#39;t need to be NUMA-aligned; it can run in the general node-wide shared
pool. The collective resource consumption is still safely bounded by the overall
pod limits, but you only allocate NUMA-aligned, exclusive resources to the
specific containers that actually require them.
--&gt;
&lt;p&gt;在拓扑管理器的 &lt;code&gt;container&lt;/code&gt; 作用域下，kubelet 会逐个评估每个容器。
你可以为 ML 容器分配独占且经过 NUMA 对齐的 CPU 和内存，以获得最佳性能。
与此同时，服务网格边车并不需要进行 NUMA 对齐；它可以运行在节点范围内的通用共享池中。
总体资源消耗仍会安全地受整个 Pod 的限制值约束，但你只需要把 NUMA 对齐的独占资源分配给那些真正需要它们的特定容器。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ml-workload&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# Pod 级别资源定义整体预算约束。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requests&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;4&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;8Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;limits&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;4&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;8Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;initContainers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;service-mesh-sidecar&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;service-mesh:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;restartPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Always&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ml-training&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ml-training:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 在 `container` 作用域下，这个 Guaranteed 容器会获得独占且经过 NUMA 对齐的资源，&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 而边车则运行在节点的共享池中。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requests&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;3&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;6Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;limits&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;3&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;6Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### CPU quotas (CFS) and isolation
--&gt;
&lt;h3 id=&#34;cpu-配额-cfs-与隔离&#34;&gt;CPU 配额（CFS）与隔离&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#cpu-%e9%85%8d%e9%a2%9d-cfs-%e4%b8%8e%e9%9a%94%e7%a6%bb&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
When running these mixed workloads within a pod, isolation is enforced
differently depending on the allocation:
--&gt;
&lt;p&gt;当在一个 Pod 内运行这些混合工作负载时，隔离机制会根据分配方式的不同而有所区别：&lt;/p&gt;
&lt;!--
*   **Exclusive containers:** Containers granted exclusive CPU slices have their
    CPU CFS quota enforcement disabled at the container level, allowing them to
    run without being throttled by the Linux scheduler.
*   **Pod shared pool containers:** Containers falling into the pod shared pool
    have CPU CFS quotas enforced at the pod level, ensuring they do not consume
    more than the leftover pod budget.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;独占容器：&lt;/strong&gt; 获得独占 CPU 切片的容器会在容器级别禁用 CPU CFS 配额限制，
这样它们运行时就不会被 Linux 调度器限流。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pod 共享池容器：&lt;/strong&gt; 落入 Pod 共享池的容器会在 Pod 级别应用 CPU CFS 配额限制，
以确保它们不会消耗超过 Pod 剩余预算的资源。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## How to enable Pod-Level Resource Managers
--&gt;
&lt;h2 id=&#34;如何启用-pod-级资源管理器&#34;&gt;如何启用 Pod 级资源管理器&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e5%90%af%e7%94%a8-pod-%e7%ba%a7%e8%b5%84%e6%ba%90%e7%ae%a1%e7%90%86%e5%99%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Using this feature requires Kubernetes v1.36 or newer. To enable it, you must
configure the kubelet with the appropriate feature gates and policies:
--&gt;
&lt;p&gt;使用这一特性需要 Kubernetes v1.36 或更高版本。
要启用它，你必须为 kubelet 配置相应的特性门控和策略：&lt;/p&gt;
&lt;!--
1.  Enable the `PodLevelResources` and `PodLevelResourceManagers`
    [feature gates](/docs/reference/command-line-tools-reference/feature-gates/).
2.  Configure the
    [Topology Manager](/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies)
    with a policy other than `none` (i.e., `best-effort`, `restricted`, or
    `single-numa-node`).
3.  Set the
    [Topology Manager scope](/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes)
    to either `pod` or `container` using the `topologyManagerScope` field in the
    [`KubeletConfiguration`](/docs/reference/config-api/kubelet-config.v1beta1/).
4.  Configure the
    [CPU Manager](/docs/tasks/administer-cluster/cpu-management-policies/) with
    the `static` policy.
5.  Configure the
    [Memory Manager](/docs/tasks/administer-cluster/memory-manager/) with the
    `Static` policy.
--&gt;
&lt;ol&gt;
&lt;li&gt;启用 &lt;code&gt;PodLevelResources&lt;/code&gt; 和 &lt;code&gt;PodLevelResourceManagers&lt;/code&gt;
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/&#34;&gt;特性门控&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;将
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/administer-cluster/topology-manager/#topology-manager-policies&#34;&gt;拓扑管理器&lt;/a&gt;
配置为 &lt;code&gt;none&lt;/code&gt; 之外的策略（即 &lt;code&gt;best-effort&lt;/code&gt;、&lt;code&gt;restricted&lt;/code&gt; 或 &lt;code&gt;single-numa-node&lt;/code&gt;）。&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/&#34;&gt;&lt;code&gt;KubeletConfiguration&lt;/code&gt;&lt;/a&gt;
中使用 &lt;code&gt;topologyManagerScope&lt;/code&gt; 字段，将
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/administer-cluster/topology-manager/#topology-manager-scopes&#34;&gt;拓扑管理器作用域&lt;/a&gt;
设置为 &lt;code&gt;pod&lt;/code&gt; 或 &lt;code&gt;container&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;将
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/administer-cluster/cpu-management-policies/&#34;&gt;CPU 管理器&lt;/a&gt;
配置为 &lt;code&gt;static&lt;/code&gt; 策略。&lt;/li&gt;
&lt;li&gt;将
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/administer-cluster/memory-manager/&#34;&gt;内存管理器&lt;/a&gt;
配置为 &lt;code&gt;Static&lt;/code&gt; 策略。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
## Observability
--&gt;
&lt;h2 id=&#34;可观测性&#34;&gt;可观测性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%af%e8%a7%82%e6%b5%8b%e6%80%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To help cluster administrators monitor and debug these new allocation models, we
have introduced several new kubelet metrics when the feature gate is enabled:
--&gt;
&lt;p&gt;为了帮助集群管理员监控并调试这些新的分配模型，我们在启用该特性门控时引入了几个新的 kubelet 指标：&lt;/p&gt;
&lt;!--
*   `resource_manager_allocations_total`: Counts the total number of exclusive
    resource allocations performed by a manager. The `source` label (&#34;pod&#34; or
    &#34;node&#34;) distinguishes between allocations drawn from the node-level pool
    versus a pre-allocated pod-level pool.
*   `resource_manager_allocation_errors_total`: Counts errors encountered during
    exclusive resource allocation, distinguished by the intended allocation
    `source` (&#34;pod&#34; or &#34;node&#34;).
*   `resource_manager_container_assignments`: Tracks the cumulative number of
    containers running with specific assignment types. The `assignment_type`
    label (&#34;node_exclusive&#34;, &#34;pod_exclusive&#34;, &#34;pod_shared&#34;) provides visibility
    into how workloads are distributed.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;resource_manager_allocations_total&lt;/code&gt;：统计某个管理器执行独占资源分配的总次数。
&lt;code&gt;source&lt;/code&gt; 标签（&amp;quot;pod&amp;quot; 或 &amp;quot;node&amp;quot;）用于区分分配来源于节点级资源池，
还是来源于预先分配的 Pod 级资源池。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resource_manager_allocation_errors_total&lt;/code&gt;：统计独占资源分配过程中出现的错误次数，
并通过目标分配 &lt;code&gt;source&lt;/code&gt;（&amp;quot;pod&amp;quot; 或 &amp;quot;node&amp;quot;）进行区分。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resource_manager_container_assignments&lt;/code&gt;：跟踪以特定分配类型运行的容器累计数量。
&lt;code&gt;assignment_type&lt;/code&gt; 标签（&amp;quot;node_exclusive&amp;quot;、&amp;quot;pod_exclusive&amp;quot;、&amp;quot;pod_shared&amp;quot;）
让你能够看到工作负载是如何分布的。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Current limitations and caveats
--&gt;
&lt;h2 id=&#34;当前的限制与注意事项&#34;&gt;当前的限制与注意事项&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bd%93%e5%89%8d%e7%9a%84%e9%99%90%e5%88%b6%e4%b8%8e%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
While this feature opens up new possibilities, there are a few things to keep in
mind during its alpha phase. Be sure to review the
[Limitations and caveats](/docs/concepts/workloads/resource-managers/#limitations-and-caveats)
in the official documentation for full details on compatibility, requirements,
and downgrade instructions.
--&gt;
&lt;p&gt;虽然这一特性带来了新的可能性，但在其 Alpha 阶段仍有几点需要留意。
有关兼容性、要求以及降级说明的完整细节，请务必查阅官方文档中的
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/docs/concepts/workloads/resource-managers/#limitations-and-caveats&#34;&gt;限制与注意事项&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Getting started and providing feedback
--&gt;
&lt;h2 id=&#34;开始使用并提供反馈&#34;&gt;开始使用并提供反馈&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bc%80%e5%a7%8b%e4%bd%bf%e7%94%a8%e5%b9%b6%e6%8f%90%e4%be%9b%e5%8f%8d%e9%a6%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
For a deep dive into the technical details and configuration of this feature,
check out the official concept documentation:
--&gt;
&lt;p&gt;若要深入了解这一特性的技术细节和配置方式，请参阅官方概念文档：&lt;/p&gt;
&lt;!--
*   [Pod-level resource managers](/docs/concepts/workloads/resource-managers/#pod-level-resource-managers)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/docs/concepts/workloads/resource-managers/#pod-level-resource-managers&#34;&gt;Pod 级资源管理器&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
To learn more about the overall pod-level resources feature and how to assign
resources to pods, see:
--&gt;
&lt;p&gt;若要进一步了解 Pod 级别资源特性的整体情况，以及如何为 Pod 分配资源，请参阅：&lt;/p&gt;
&lt;!--
*   [Assign Pod-level CPU and memory resources](/docs/tasks/configure-pod-container/assign-pod-level-resources/)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/configure-pod-container/assign-pod-level-resources/&#34;&gt;分配 Pod 级别 CPU 和内存资源&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
As this feature moves through Alpha, your feedback is invaluable. Please report
any issues or share your experiences via the standard Kubernetes communication
channels:
--&gt;
&lt;p&gt;随着这一特性在 Alpha 阶段持续演进，你的反馈尤为宝贵。
欢迎通过 Kubernetes 的标准沟通渠道报告问题或分享你的使用经验：&lt;/p&gt;
&lt;!--
*   Slack: [#sig-node](https://kubernetes.slack.com/messages/sig-node)
*   [Mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-node)
*   [Open Community Issues/PRs](https://github.com/kubernetes/community/labels/sig%2Fnode)
--&gt;
&lt;ul&gt;
&lt;li&gt;Slack：&lt;a href=&#34;https://kubernetes.slack.com/messages/sig-node&#34;&gt;#sig-node&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://groups.google.com/forum/#!forum/kubernetes-sig-node&#34;&gt;邮件列表&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/community/labels/sig%2Fnode&#34;&gt;开放的社区 Issue/PR&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：Pod 级别资源的原地垂直扩缩容升级至 Beta 版本</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/30/kubernetes-v1-36-inplace-pod-level-resources-beta/</link>
      <pubDate>Thu, 30 Apr 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/30/kubernetes-v1-36-inplace-pod-level-resources-beta/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: In-Place Vertical Scaling for Pod-Level Resources Graduates to Beta&#34;
date: 2026-04-30T10:35:00-08:00
slug: kubernetes-v1-36-inplace-pod-level-resources-beta
author: Narang Dixita Sohanlal (Google)
--&gt;
&lt;!--
Following the graduation of Pod-Level Resources to Beta in v1.34 and the General Availability (GA)
of In-Place Pod Vertical Scaling in v1.35, the Kubernetes community is thrilled to announce
that **In-Place Pod-Level Resources Vertical Scaling has graduated to Beta in v1.36!**

This feature is now enabled by default via the `InPlacePodLevelResourcesVerticalScaling`
feature gate. It allows users to update the aggregate Pod resource budget (`.spec.resources`)
for a running Pod, **often without requiring a container restart.**
--&gt;
&lt;p&gt;在 v1.34 中 Pod 级别资源升级到 Beta 版本，以及 v1.35 中原地 Pod 垂直扩缩容达到正式可用（GA）之后，
Kubernetes 社区非常高兴地宣布：&lt;strong&gt;Pod 级别资源的原地垂直扩缩容已在 v1.36 中升级到 Beta 版本！&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;此特性现在通过 InPlacePodLevelResourcesVerticalScaling 特性门控默认启用。
它允许用户更新运行中 Pod 的聚合 Pod 资源预算（&lt;code&gt;.spec.resources&lt;/code&gt;），&lt;strong&gt;通常不需要容器重启&lt;/strong&gt;。&lt;/p&gt;
&lt;!--
## Why Pod-level in-place resize?

The Pod-level resource model simplified management for complex Pods (such as those with sidecars)
by allowing containers to share a collective pool of resources. In v1.36, you can now adjust
this aggregate boundary on-the-fly.

This is particularly useful for Pods where containers do not have individual limits defined.
These containers automatically scale their effective boundaries to fit the newly resized
Pod-level dimensions, allowing you to expand the shared pool during peak demand without
manual per-container recalculations.
--&gt;
&lt;h2 id=&#34;why-pod-level-in-place-resize&#34;&gt;为什么需要 Pod 级别的原地调整大小？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#why-pod-level-in-place-resize&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Pod 级别的资源模型通过允许容器共享一个集体资源池，简化了复杂 Pod（例如带有边车容器的 Pod）的管理。
在 v1.36 中，你现在可以动态调整这个聚合边界。&lt;/p&gt;
&lt;p&gt;这对于没有定义单个容器限制的 Pod 特别有用。这些容器会自动调整其有效边界以适应新调整大小的 Pod 级维度，
允许你在高峰需求期间扩展共享池，而无需手动重新计算每个容器。&lt;/p&gt;
&lt;!--
## Resource inheritance and the `resizePolicy`

When a Pod-level resize is initiated, the Kubelet treats the change as a resize event for
every container that inherits its limits from the Pod-level budget. To determine whether a
restart is required, the Kubelet consults the `resizePolicy` defined within individual containers:

*   **Non-disruptive Updates:** If a container&#39;s `restartPolicy` is set to `NotRequired`,
    the Kubelet attempts to update the cgroup limits dynamically via the Container Runtime
    Interface (CRI).
*   **Disruptive Updates:** If set to `RestartContainer`, the container will be restarted
    to apply the new aggregate boundary safely.

&gt; **Note:** Currently, `resizePolicy` is not supported at the Pod level. The Kubelet always
&gt; defers to individual container settings to decide if an update can be applied in-place or
&gt; requires a restart.
--&gt;
&lt;h2 id=&#34;resource-inheritance-and-the-resizepolicy&#34;&gt;资源继承和 &lt;code&gt;resizePolicy&lt;/code&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#resource-inheritance-and-the-resizepolicy&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;当启动 Pod 级别的调整大小时，kubelet 将此更改视为每个从 Pod 级预算继承其限制的容器的调整大小事件。
为了确定是否需要重启，kubelet 会参考各个容器中定义的 &lt;code&gt;resizePolicy&lt;/code&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;非破坏性更新&lt;/strong&gt;：如果容器的 &lt;code&gt;restartPolicy&lt;/code&gt; 设置为 &lt;code&gt;NotRequired&lt;/code&gt;，kubelet
会尝试通过容器运行时接口（CRI）动态更新 CGroup 限制。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;破坏性更新&lt;/strong&gt;：如果设置为 &lt;code&gt;RestartContainer&lt;/code&gt;，容器将被重启以安全应用新的聚合边界。&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;注意&lt;/strong&gt;：目前，&lt;code&gt;resizePolicy&lt;/code&gt; 不支持在 Pod 级别设置。kubelet 始终遵循各个容器的设置来决定更新是否可以原地应用或需要重启。&lt;/p&gt;&lt;/blockquote&gt;
&lt;!--
## Example: ccaling a shared resource pool

In this scenario, a Pod is defined with a 2 CPU pod-level limit. Because the individual
containers do not have their own limits defined, they share this total pool.

### 1. Initial Pod specification
--&gt;
&lt;h2 id=&#34;example-ccaling-a-shared-resource-pool&#34;&gt;示例：调整共享资源池大小&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#example-ccaling-a-shared-resource-pool&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;在这个场景中，一个 Pod 定义了 2 CPU 的 Pod 级别限制。由于各个容器没有定义自己的限制，它们共享这个总池。&lt;/p&gt;
&lt;h3 id=&#34;1-初始-pod-规范&#34;&gt;1. 初始 Pod 规范&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#1-%e5%88%9d%e5%a7%8b-pod-%e8%a7%84%e8%8c%83&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;shared-pool-app&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# Pod-level limits&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;limits&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;2&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memory&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;4Gi&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;main-app&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-app:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resizePolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[{&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;cpu&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;, restartPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NotRequired&amp;#34;&lt;/span&gt;}]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;sidecar&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;logger:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resizePolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[{&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resourceName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;cpu&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;, restartPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NotRequired&amp;#34;&lt;/span&gt;}]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### 2. The resize operation

To double the CPU capacity to 4 CPUs, apply a patch using the `resize` subresource:
--&gt;
&lt;h3 id=&#34;2-调整大小操作&#34;&gt;2. 调整大小操作&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#2-%e8%b0%83%e6%95%b4%e5%a4%a7%e5%b0%8f%e6%93%8d%e4%bd%9c&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;要将 CPU 容量增加一倍至 4 个 CPU，请使用 &lt;code&gt;resize&lt;/code&gt; 子资源应用补丁：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl patch pod shared-pool-app --subresource resize --patch &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  &lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;{&amp;#34;spec&amp;#34;:{&amp;#34;resources&amp;#34;:{&amp;#34;limits&amp;#34;:{&amp;#34;cpu&amp;#34;:&amp;#34;4&amp;#34;}}}}&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Node-Level reality: feasibility and safety

Applying a resize patch is only the first step. The Kubelet performs several checks and follows
a specific sequence to ensure node stability:

### 1. The feasibility check

Before admitting a resize, the Kubelet verifies if the new aggregate request fits within
the Node&#39;s allocatable capacity. If the Node is overcommitted, the resize is not ignored;
instead, the `PodResizePending` condition will reflect a `Deferred` or `Infeasible` status,
providing immediate feedback on why the &#34;envelope&#34; hasn&#39;t grown.
--&gt;
&lt;h2 id=&#34;node-level-reality-feasibility-and-safety&#34;&gt;节点级现实：可行性和安全性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#node-level-reality-feasibility-and-safety&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;应用调整大小补丁只是第一步。kubelet 执行多项检查并遵循特定顺序以确保节点稳定性：&lt;/p&gt;
&lt;h3 id=&#34;1-可行性检查&#34;&gt;1. 可行性检查&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#1-%e5%8f%af%e8%a1%8c%e6%80%a7%e6%a3%80%e6%9f%a5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;在接受调整大小之前，kubelet 会验证新的聚合请求是否适合节点的可分配容量。
如果节点过度承诺，调整大小不会被忽略；相反，&lt;code&gt;PodResizePending&lt;/code&gt; 条件会反映 &lt;code&gt;Deferred&lt;/code&gt; 或 &lt;code&gt;Infeasible&lt;/code&gt; 状态，
提示为什么“信封”没有增长的即时反馈。&lt;/p&gt;
&lt;!--
### 2. Update sequencing

To prevent resource &#34;overshoot,&#34; the Kubelet coordinates the cgroup updates in a specific order:
*   **When Increasing:** The Pod-level cgroup is expanded first, creating the &#34;room&#34; before
    the individual container cgroups are enlarged.
*   **When Decreasing:** The container cgroups are throttled first, and only then is the
    aggregate Pod-level cgroup shrunken.
--&gt;
&lt;h3 id=&#34;2-更新顺序&#34;&gt;2. 更新顺序&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#2-%e6%9b%b4%e6%96%b0%e9%a1%ba%e5%ba%8f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;为防止资源“超调”，kubelet 按特定顺序协调 CGroup 更新：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;增加时&lt;/strong&gt;：首先扩展 Pod 级 CGroup，在扩大各个容器 CGroup 之前创建“空间”。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;减少时&lt;/strong&gt;：首先限制容器 CGroup，然后才缩小聚合 Pod 级 CGroup。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Observability: tracking resize status

With the move to Beta, Kubernetes uses **Pod Conditions** to track the lifecycle of a resize:

*   **`PodResizePending`**: The spec is updated, but the Node hasn&#39;t admitted the change
    (e.g., due to capacity).
*   **`PodResizeInProgress`**: The Node has admitted the resize (`status.allocatedResources`)
    but the changes aren&#39;t yet fully applied to the cgroups (`status.resources`).
--&gt;
&lt;h2 id=&#34;observability-tracking-resize-status&#34;&gt;可观测性：跟踪调整大小状态&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#observability-tracking-resize-status&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;随着升级到 Beta 版本，Kubernetes 使用 &lt;strong&gt;Pod 状况&lt;/strong&gt;来跟踪调整大小的生命周期：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;PodResizePending&lt;/code&gt;&lt;/strong&gt;：规范已更新，但节点尚未接受更改（例如，由于容量）。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;PodResizeInProgress&lt;/code&gt;&lt;/strong&gt;：节点已接受调整大小（&lt;code&gt;status.allocatedResources&lt;/code&gt;），
但更改尚未完全应用到 CGroup（&lt;code&gt;status.resources&lt;/code&gt;）。&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;status&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allocatedResources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;4&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;limits&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;4&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;conditions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PodResizeInProgress&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;status&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;True&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Constraints and requirements

*   **cgroup v2 Only:** Required for accurate aggregate enforcement.
*   **CRI Support:** Requires a container runtime that supports the `UpdateContainerResources`
    CRI call (e.g., containerd v2.0+ or CRI-O).
*   **Feature Gates:** Requires `PodLevelResources`, `InPlacePodVerticalScaling`,
    `InPlacePodLevelResourcesVerticalScaling`, and `NodeDeclaredFeatures`.
*   **Linux Only:** Currently exclusive to Linux-based nodes.
--&gt;
&lt;h2 id=&#34;constraints-and-requirements&#34;&gt;约束和要求&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#constraints-and-requirements&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;仅支持 CGroup v2&lt;/strong&gt;：准确的聚合执行所必需。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CRI 支持&lt;/strong&gt;：需要支持 &lt;code&gt;UpdateContainerResources&lt;/code&gt; CRI 调用的容器运行时（例如 containerd v2.0+ 或 CRI-O）。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;特性门控&lt;/strong&gt;：需要 &lt;code&gt;PodLevelResources&lt;/code&gt;、&lt;code&gt;InPlacePodVerticalScaling&lt;/code&gt;、&lt;code&gt;InPlacePodLevelResourcesVerticalScaling&lt;/code&gt;
和 &lt;code&gt;NodeDeclaredFeatures&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;仅支持 Linux&lt;/strong&gt;：目前仅适用于基于 Linux 的节点。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## What&#39;s next?

As we move toward General Availability (GA), the community is focusing on **Vertical Pod Autoscaler
(VPA) Integration**, enabling VPA to issue Pod-level resource recommendations and trigger
in-place actuation automatically.
--&gt;
&lt;h2 id=&#34;whats-next&#34;&gt;下一步&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#whats-next&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;在我们向正式可用（GA）迈进的过程中，社区正在专注于&lt;strong&gt;垂直 Pod 自动缩放器（VPA）集成&lt;/strong&gt;，
使 VPA 能够发布 Pod 级资源建议并自动触发原地执行。&lt;/p&gt;
&lt;!--
## Getting started and providing feedback

We encourage you to test this feature and provide feedback via the standard Kubernetes
communication channels:

*   Slack: [#sig-node](https://kubernetes.slack.com/messages/sig-node)
*   [Mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-node)
*   [Open Community Issues/PRs](https://github.com/kubernetes/community/labels/sig%2Fnode)
--&gt;
&lt;h2 id=&#34;getting-started-and-providing-feedback&#34;&gt;开始使用并提供反馈&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#getting-started-and-providing-feedback&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;我们鼓励你测试此特性并通过标准的 Kubernetes 沟通渠道提供反馈：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Slack：&lt;a href=&#34;https://kubernetes.slack.com/messages/sig-node&#34;&gt;#sig-node&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://groups.google.com/forum/#!forum/kubernetes-sig-node&#34;&gt;邮件列表&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/community/labels/sig%2Fnode&#34;&gt;开放社区 Issue/PR&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：借助 Memory QoS 实现分层内存保护</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/29/kubernetes-v1-36-memory-qos-tiered-protection/</link>
      <pubDate>Wed, 29 Apr 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/29/kubernetes-v1-36-memory-qos-tiered-protection/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Tiered Memory Protection with Memory QoS&#34;
date: 2026-04-29T10:35:00-08:00
slug: kubernetes-v1-36-memory-qos-tiered-protection
author: &gt;
  Qi Wang (Red Hat),
  Sohan Kunkerkar (Red Hat)
--&gt;
&lt;!--
On behalf of SIG Node, we are pleased to announce updates to the Memory QoS
feature (alpha) in Kubernetes v1.36. Memory QoS uses the cgroup v2 memory
controller to give the kernel better guidance on how to treat container memory.
It was first introduced in v1.22 and updated in v1.27. In Kubernetes v1.36, we&#39;re introducing: opt-in memory reservation, tiered
protection by QoS class, observability metrics, and kernel-version warning for `memory.high`.
--&gt;
&lt;p&gt;我谨代表 SIG Node 宣布 Kubernetes v1.36 中 Memory QoS 特性（Alpha）的更新。
Memory QoS 使用 cgroup v2 的内存控制器，为内核提供更好的指引来处理容器内存。
它最早在 v1.22 中引入，并在 v1.27 中更新。
在 Kubernetes v1.36 中，我们引入了以下内容：可选启用的内存预留、基于 QoS 类的分层保护、
可观测性指标，以及针对 &lt;code&gt;memory.high&lt;/code&gt; 的内核版本告警。&lt;/p&gt;
&lt;!--
## What&#39;s new in v1.36
--&gt;
&lt;h2 id=&#34;v1-36-的新变化&#34;&gt;v1.36 的新变化&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#v1-36-%e7%9a%84%e6%96%b0%e5%8f%98%e5%8c%96&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Opt-in memory reservation with `memoryReservationPolicy`
--&gt;
&lt;h3 id=&#34;使用-memoryreservationpolicy-选择性启用内存预留&#34;&gt;使用 &lt;code&gt;memoryReservationPolicy&lt;/code&gt; 选择性启用内存预留&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bd%bf%e7%94%a8-memoryreservationpolicy-%e9%80%89%e6%8b%a9%e6%80%a7%e5%90%af%e7%94%a8%e5%86%85%e5%ad%98%e9%a2%84%e7%95%99&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
v1.36 separates throttling from reservation. Enabling the feature gate turns on
`memory.high` throttling (the kubelet sets `memory.high` based on
`memoryThrottlingFactor`, default 0.9), but memory reservation is now controlled
by a separate kubelet configuration field:
--&gt;
&lt;p&gt;v1.36 将节流与预留分离开来。启用该特性门控后，会开启 &lt;code&gt;memory.high&lt;/code&gt; 节流
（kubelet 基于 &lt;code&gt;memoryThrottlingFactor&lt;/code&gt; 设置 &lt;code&gt;memory.high&lt;/code&gt;，默认值为 0.9），
但内存预留现在由一个独立的 kubelet 配置字段控制：&lt;/p&gt;
&lt;!--
- **`None`** (default): no `memory.min` or `memory.low` is written. Throttling
  via `memory.high` still works.
- **`TieredReservation`**: the kubelet writes tiered memory protection based on the Pod&#39;s
[QoS class](/docs/concepts/workloads/pods/pod-qos/):
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;None&lt;/code&gt;&lt;/strong&gt;（默认）：不写入 &lt;code&gt;memory.min&lt;/code&gt; 或 &lt;code&gt;memory.low&lt;/code&gt;。通过 &lt;code&gt;memory.high&lt;/code&gt; 进行的节流仍然有效。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;TieredReservation&lt;/code&gt;&lt;/strong&gt;：kubelet 基于 Pod 的
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/pods/pod-qos/&#34;&gt;QoS 类&lt;/a&gt;
写入分层内存保护：&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**Guaranteed** Pods get hard protection via `memory.min`. For example, a
Guaranteed Pod requesting 512 MiB of memory results in:
--&gt;
&lt;p&gt;&lt;strong&gt;Guaranteed&lt;/strong&gt; Pod 通过 &lt;code&gt;memory.min&lt;/code&gt; 获得硬保护。例如，一个请求 512 MiB 内存的
Guaranteed Pod 会得到：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-none&#34; data-lang=&#34;none&#34;&gt;$ cat /sys/fs/cgroup/kubepods.slice/kubepods-pod6a4f2e3b_1c9d_4a5e_8f7b_2d3e4f5a6b7c.slice/memory.min
536870912
&lt;/code&gt;&lt;/pre&gt;&lt;!--
The kernel will not reclaim this memory under any circumstances. If it cannot
honor the guarantee, it invokes the OOM killer on other processes to free pages.
--&gt;
&lt;p&gt;内核在任何情况下都不会回收这部分内存。如果无法兑现这一保证，
它会对其他进程触发 OOM killer 以释放内存页。&lt;/p&gt;
&lt;!--
**Burstable** Pods get soft protection via `memory.low`. For the same 512 MiB
request on a Burstable Pod:
--&gt;
&lt;p&gt;&lt;strong&gt;Burstable&lt;/strong&gt; Pod 通过 &lt;code&gt;memory.low&lt;/code&gt; 获得软保护。对于同样请求 512 MiB 内存的
Burstable Pod：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-none&#34; data-lang=&#34;none&#34;&gt;$ cat /sys/fs/cgroup/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod8b3c7d2e_4f5a_6b7c_9d1e_3f4a5b6c7d8e.slice/memory.low
536870912
&lt;/code&gt;&lt;/pre&gt;&lt;!--
The kernel avoids reclaiming this memory under normal pressure, but may reclaim
it if the alternative is a system-wide OOM.
--&gt;
&lt;p&gt;在正常压力下，内核会避免回收这部分内存；但如果另一种选择是系统范围的 OOM，
内核仍可能回收其中一部分。&lt;/p&gt;
&lt;!--
**BestEffort** Pods get neither `memory.min` nor `memory.low`. Their memory
remains fully reclaimable.
--&gt;
&lt;p&gt;&lt;strong&gt;BestEffort&lt;/strong&gt; Pod 既不会获得 &lt;code&gt;memory.min&lt;/code&gt;，也不会获得 &lt;code&gt;memory.low&lt;/code&gt;。
它们的内存仍然是完全可回收的。&lt;/p&gt;
&lt;!--
#### Comparison with v1.27 behavior
--&gt;
&lt;h4 id=&#34;与-v1-27-行为的对比&#34;&gt;与 v1.27 行为的对比&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%8e-v1-27-%e8%a1%8c%e4%b8%ba%e7%9a%84%e5%af%b9%e6%af%94&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
In earlier versions, enabling the MemoryQoS feature gate immediately set `memory.min` for every container with a memory request. `memory.min` is a hard reservation that the kernel will not reclaim, regardless of memory pressure.
--&gt;
&lt;p&gt;在更早的版本中，启用 &lt;code&gt;MemoryQoS&lt;/code&gt; 特性门控后，会立即为每个带有内存请求的容器设置 &lt;code&gt;memory.min&lt;/code&gt;。
&lt;code&gt;memory.min&lt;/code&gt; 是一种硬预留，无论内存压力如何，内核都不会回收它。&lt;/p&gt;
&lt;!--
Consider a node with 8 GiB of RAM where Burstable Pod requests total 7 GiB. In earlier versions, that 7 GiB would be locked as `memory.min`, leaving little headroom for the kernel, system daemons, or BestEffort workloads and increasing the risk of OOM kills.
--&gt;
&lt;p&gt;假设一个节点有 8 GiB RAM，而 Burstable Pod 的请求总量达到 7 GiB。
在更早版本中，这 7 GiB 会作为 &lt;code&gt;memory.min&lt;/code&gt; 被锁定，
从而给内核、系统守护进程或 BestEffort 工作负载留下极少余量，
并增加 OOM kill 的风险。&lt;/p&gt;
&lt;!--
With v1.36 tiered reservation, those Burstable requests map to `memory.low` instead of `memory.min`. Under normal pressure, the kernel still protects that memory, but under extreme pressure it can reclaim part of it to avoid system-wide OOM. Only Guaranteed Pods use `memory.min`, which keeps hard reservation lower.
--&gt;
&lt;p&gt;在 v1.36 的分层预留机制下，这些 Burstable 请求会映射到 &lt;code&gt;memory.low&lt;/code&gt;，而不是 &lt;code&gt;memory.min&lt;/code&gt;。
在正常压力下，内核仍会保护这部分内存；但在极端压力下，
它可以回收其中一部分以避免系统范围的 OOM。
只有 Guaranteed Pod 才会使用 &lt;code&gt;memory.min&lt;/code&gt;，这使得硬预留保持在更低水平。&lt;/p&gt;
&lt;!--
With `memoryReservationPolicy` in v1.36, you can enable throttling first, observe workload behavior, and opt into reservation when your node has enough headroom.
--&gt;
&lt;p&gt;借助 v1.36 中的 &lt;code&gt;memoryReservationPolicy&lt;/code&gt;，
你可以先启用节流，观察工作负载行为，
然后在节点拥有足够余量时再选择启用预留。&lt;/p&gt;
&lt;!--
### Observability metrics
--&gt;
&lt;h3 id=&#34;可观测性指标&#34;&gt;可观测性指标&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%af%e8%a7%82%e6%b5%8b%e6%80%a7%e6%8c%87%e6%a0%87&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Two alpha-stability metrics are exposed on the kubelet `/metrics` endpoint:
--&gt;
&lt;p&gt;kubelet 的 &lt;code&gt;/metrics&lt;/code&gt; 端点会暴露两个 Alpha 级稳定性指标：&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;指标&lt;/th&gt;
          &lt;th&gt;说明&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;kubelet_memory_qos_node_memory_min_bytes&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Guaranteed Pod 的 &lt;code&gt;memory.min&lt;/code&gt; 总量&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;kubelet_memory_qos_node_memory_low_bytes&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Burstable Pod 的 &lt;code&gt;memory.low&lt;/code&gt; 总量&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;!--
These are useful for capacity planning. If `kubelet_memory_qos_node_memory_min_bytes`
is creeping toward your node&#39;s physical memory, you know hard reservation is
getting tight.
--&gt;
&lt;p&gt;这些指标对于容量规划非常有用。
如果 &lt;code&gt;kubelet_memory_qos_node_memory_min_bytes&lt;/code&gt;
正在逐渐逼近节点的物理内存，
你就知道硬预留已经变得紧张了。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-none&#34; data-lang=&#34;none&#34;&gt;$ curl -sk https://localhost:10250/metrics | grep memory_qos
# HELP kubelet_memory_qos_node_memory_min_bytes [ALPHA] Total memory.min in bytes for Guaranteed pods
kubelet_memory_qos_node_memory_min_bytes 5.36870912e+08
# HELP kubelet_memory_qos_node_memory_low_bytes [ALPHA] Total memory.low in bytes for Burstable pods
kubelet_memory_qos_node_memory_low_bytes 2.147483648e+09
&lt;/code&gt;&lt;/pre&gt;&lt;!--
### Kernel version check
--&gt;
&lt;h3 id=&#34;内核版本检查&#34;&gt;内核版本检查&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%86%85%e6%a0%b8%e7%89%88%e6%9c%ac%e6%a3%80%e6%9f%a5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
On kernels older than 5.9, `memory.high` throttling can trigger the
[kernel livelock](https://lore.kernel.org/all/a4e23b59e9ef499b575ae73a8120ee089b7d3373.1594640214.git.chris@chrisdown.name/) issue. The bug was fixed
in kernel 5.9. In v1.36, when the feature gate is enabled, the kubelet checks the
kernel version at startup and logs a warning if it is below 5.9. The feature
continues to work — this is informational, not a hard block.
--&gt;
&lt;p&gt;在版本低于 5.9 的内核上，&lt;code&gt;memory.high&lt;/code&gt; 节流可能触发
&lt;a href=&#34;https://lore.kernel.org/all/a4e23b59e9ef499b575ae73a8120ee089b7d3373.1594640214.git.chris@chrisdown.name/&#34;&gt;内核活锁&lt;/a&gt;
问题。这个缺陷已在内核 5.9 中修复。
在 v1.36 中，当启用该特性门控时，kubelet 会在启动时检查内核版本，
如果内核版本低于 5.9 就记录一条告警日志。
该特性仍然可以继续工作，这只是信息提示，并不是硬阻断。&lt;/p&gt;
&lt;!--
### How Kubernetes maps Memory QoS to cgroup v2
--&gt;
&lt;h3 id=&#34;kubernetes-如何将-memory-qos-映射到-cgroup-v2&#34;&gt;Kubernetes 如何将 Memory QoS 映射到 cgroup v2&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kubernetes-%e5%a6%82%e4%bd%95%e5%b0%86-memory-qos-%e6%98%a0%e5%b0%84%e5%88%b0-cgroup-v2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Memory QoS uses four cgroup v2 memory controller interfaces:
--&gt;
&lt;p&gt;Memory QoS 使用四个 cgroup v2 内存控制器接口：&lt;/p&gt;
&lt;!--
- **`memory.max`**: hard memory limit — unchanged from previous versions
- **`memory.min`**: hard memory protection — with `TieredReservation`, set only for Guaranteed Pods
- **`memory.low`**: soft memory protection — set for Burstable Pods with `TieredReservation`
- **`memory.high`**: memory throttling threshold — unchanged from previous versions
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;memory.max&lt;/code&gt;&lt;/strong&gt;：硬内存限制，与之前版本一致&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;memory.min&lt;/code&gt;&lt;/strong&gt;：硬内存保护，在 &lt;code&gt;TieredReservation&lt;/code&gt; 下仅对 Guaranteed Pod 设置&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;memory.low&lt;/code&gt;&lt;/strong&gt;：软内存保护，在 &lt;code&gt;TieredReservation&lt;/code&gt; 下对 Burstable Pod 设置&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;memory.high&lt;/code&gt;&lt;/strong&gt;：内存节流阈值，与之前版本一致&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
The following table shows how Kubernetes container resources map to cgroup v2
interfaces when `memoryReservationPolicy: TieredReservation` is configured.
With the default `memoryReservationPolicy: None`, no `memory.min` or
`memory.low` values are set.
--&gt;
&lt;p&gt;下表展示了在配置 &lt;code&gt;memoryReservationPolicy: TieredReservation&lt;/code&gt; 时，
Kubernetes 容器资源如何映射到 cgroup v2 接口。
对于默认值 &lt;code&gt;memoryReservationPolicy: None&lt;/code&gt;，不会设置 &lt;code&gt;memory.min&lt;/code&gt; 或 &lt;code&gt;memory.low&lt;/code&gt;。&lt;/p&gt;
&lt;table&gt;
    &lt;tr&gt;
        &lt;th&gt;QoS 类&lt;/th&gt;
        &lt;th&gt;&lt;tt&gt;memory.min&lt;/tt&gt;&lt;/th&gt;
        &lt;th&gt;&lt;tt&gt;memory.low&lt;/tt&gt;&lt;/th&gt;
        &lt;th&gt;&lt;tt&gt;memory.high&lt;/tt&gt;&lt;/th&gt;
        &lt;th&gt;&lt;tt&gt;memory.max&lt;/tt&gt;&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;b&gt;Guaranteed&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;设置为 &lt;code&gt;requests.memory&lt;/code&gt;&lt;br&gt;（硬保护）&lt;/td&gt;
        &lt;td&gt;不设置&lt;/td&gt;
        &lt;td&gt;不设置&lt;br&gt;（requests == limits，因此节流没有意义）&lt;/td&gt;
        &lt;td&gt;设置为 &lt;code&gt;limits.memory&lt;/code&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;b&gt;Burstable&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;不设置&lt;/td&gt;
        &lt;td&gt;设置为 &lt;code&gt;requests.memory&lt;/code&gt;&lt;br&gt;（软保护）&lt;/td&gt;
        &lt;td&gt;基于节流因子公式计算&lt;/td&gt;
        &lt;td&gt;设置为 &lt;code&gt;limits.memory&lt;/code&gt;&lt;br&gt;（如果已指定）&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;b&gt;BestEffort&lt;/b&gt;&lt;/td&gt;
        &lt;td&gt;不设置&lt;/td&gt;
        &lt;td&gt;不设置&lt;/td&gt;
        &lt;td&gt;基于节点可分配内存计算&lt;/td&gt;
        &lt;td&gt;不设置&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;!--
### Cgroup hierarchy
--&gt;
&lt;h3 id=&#34;cgroup-层级&#34;&gt;cgroup 层级&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#cgroup-%e5%b1%82%e7%ba%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
cgroup v2 requires that a parent cgroup&#39;s memory protection is at least as
large as the sum of its children&#39;s. The kubelet maintains this by setting
`memory.min` on the kubepods root cgroup to the sum of all Guaranteed and
Burstable Pod memory requests, and `memory.low` on the Burstable QoS cgroup
to the sum of all Burstable Pod memory requests. This way the kernel can
enforce the per-container and per-pod protection values correctly.
--&gt;
&lt;p&gt;cgroup v2 要求父 cgroup 的内存保护值至少要与其所有子 cgroup 之和一样大。
kubelet 通过以下方式维持这一点：
将 kubepods 根 cgroup 上的 &lt;code&gt;memory.min&lt;/code&gt;
设置为所有 Guaranteed 和 Burstable Pod 内存请求之和，
并将 Burstable QoS cgroup 上的 &lt;code&gt;memory.low&lt;/code&gt;
设置为所有 Burstable Pod 内存请求之和。
这样，内核就能够正确执行容器级和 Pod 级的保护值。&lt;/p&gt;
&lt;!--
The kubelet manages pod-level and QoS-class cgroups directly using the runc
libcontainer library, while container-level cgroups are managed by the
container runtime (containerd or CRI-O).
--&gt;
&lt;p&gt;kubelet 直接使用 runc 的 libcontainer 库管理 Pod 级别和 QoS 类级别的 cgroup，
而容器级别的 cgroup 则由容器运行时（containerd 或 CRI-O）管理。&lt;/p&gt;
&lt;!--
## How do I use it?
--&gt;
&lt;h2 id=&#34;如何使用&#34;&gt;如何使用？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Prerequisites
--&gt;
&lt;h3 id=&#34;前提条件&#34;&gt;前提条件&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%89%8d%e6%8f%90%e6%9d%a1%e4%bb%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
1. Kubernetes v1.36 or later
2. Linux with cgroup v2. Kernel 5.9 or higher is recommended — earlier kernels
   work but may experience the livelock issue. You can verify cgroup v2 is
   active by running `mount | grep cgroup2`.
3. A container runtime that supports cgroup v2 (containerd 1.6+, CRI-O 1.22+)
--&gt;
&lt;ol&gt;
&lt;li&gt;Kubernetes v1.36 或更高版本&lt;/li&gt;
&lt;li&gt;使用 cgroup v2 的 Linux。推荐使用 5.9 或更高版本的内核；
更早版本的内核也能工作，但可能会遇到活锁问题。
你可以运行 &lt;code&gt;mount | grep cgroup2&lt;/code&gt; 来验证 cgroup v2 是否已启用。&lt;/li&gt;
&lt;li&gt;支持 cgroup v2 的容器运行时（containerd 1.6+、CRI-O 1.22+）&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
### Configuration
--&gt;
&lt;h3 id=&#34;配置&#34;&gt;配置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%85%8d%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
To enable Memory QoS with tiered protection:
--&gt;
&lt;p&gt;要启用带分层保护的 Memory QoS：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubelet.config.k8s.io/v1beta1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;KubeletConfiguration&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;featureGates&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;MemoryQoS&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memoryReservationPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;TieredReservation &lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 可选值：None（默认）、TieredReservation&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memoryThrottlingFactor&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;0.9&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 可选，默认值为 0.9&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
If you want `memory.high` throttling without memory protection, omit
`memoryReservationPolicy` or set it to `None`:
--&gt;
&lt;p&gt;如果你只想启用 &lt;code&gt;memory.high&lt;/code&gt; 节流，而不启用内存保护，
可以省略 &lt;code&gt;memoryReservationPolicy&lt;/code&gt;，或者将其设置为 &lt;code&gt;None&lt;/code&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubelet.config.k8s.io/v1beta1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;KubeletConfiguration&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;featureGates&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;MemoryQoS&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;memoryReservationPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;None &lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 默认值&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## How can I learn more?
--&gt;
&lt;h2 id=&#34;如何进一步了解&#34;&gt;如何进一步了解？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e8%bf%9b%e4%b8%80%e6%ad%a5%e4%ba%86%e8%a7%a3&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
- [KEP-2570: Memory QoS](https://kep.k8s.io/2570)
- [Pod Quality of Service Classes](/docs/concepts/workloads/pods/pod-qos/)
- [Managing Resources for Containers](/docs/concepts/configuration/manage-resources-containers/)
- [Kubernetes cgroups v2 support](/docs/concepts/architecture/cgroups/)
- [Linux kernel cgroups v2 documentation](https://docs.kernel.org/admin-guide/cgroup-v2.html)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/2570&#34;&gt;KEP-2570：Memory QoS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/pods/pod-qos/&#34;&gt;Pod QoS 类&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/configuration/manage-resources-containers/&#34;&gt;为 Pod 和容器管理资源&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/architecture/cgroups/&#34;&gt;关于 CGroup v2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.kernel.org/admin-guide/cgroup-v2.html&#34;&gt;Linux 内核 cgroups v2 文档&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Getting involved
--&gt;
&lt;h2 id=&#34;参与其中&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e5%85%b6%e4%b8%ad&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This feature is driven by [SIG Node](https://github.com/kubernetes/community/tree/master/sig-node).
If you are interested in contributing or have feedback, you can find us on
[Slack](https://kubernetes.slack.com/messages/sig-node) (#sig-node), the
[mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-node),
or at the regular
[SIG Node meetings](https://github.com/kubernetes/community/tree/master/sig-node#meetings).
Please file bugs at [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes/issues)
and enhancement proposals at
[kubernetes/enhancements](https://github.com/kubernetes/enhancements/issues/2570).
--&gt;
&lt;p&gt;此特性由 &lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-node&#34;&gt;SIG Node&lt;/a&gt; 推动。
如果你有兴趣参与贡献或提供反馈，
可以通过 &lt;a href=&#34;https://kubernetes.slack.com/messages/sig-node&#34;&gt;Slack&lt;/a&gt;（&lt;code&gt;#sig-node&lt;/code&gt;）、
&lt;a href=&#34;https://groups.google.com/forum/#!forum/kubernetes-sig-node&#34;&gt;邮件列表&lt;/a&gt;
或定期举行的
&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-node#meetings&#34;&gt;SIG Node 会议&lt;/a&gt;
找到我们。
请将缺陷报告提交到 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues&#34;&gt;kubernetes/kubernetes&lt;/a&gt;，
并将增强提案提交到 &lt;a href=&#34;https://github.com/kubernetes/enhancements/issues/2570&#34;&gt;kubernetes/enhancements&lt;/a&gt;。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：细粒度 kubelet API 鉴权正式发布（GA）</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/24/kubernetes-v1-36-fine-grained-kubelet-authorization-ga/</link>
      <pubDate>Fri, 24 Apr 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/24/kubernetes-v1-36-fine-grained-kubelet-authorization-ga/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: Fine-Grained Kubelet API Authorization Graduates to GA&#34;
date: 2026-04-24T10:35:00-08:00
slug: kubernetes-v1-36-fine-grained-kubelet-authorization-ga
author: &gt;
   Vinayak Goyal (Google)
--&gt;
&lt;!--
On behalf of Kubernetes SIG Auth and SIG Node, we are pleased to announce the
graduation of fine-grained `kubelet` API authorization to General Availability
(GA) in Kubernetes v1.36!
--&gt;
&lt;p&gt;我谨代表 Kubernetes SIG Auth 和 SIG Node 宣布，
细粒度 &lt;code&gt;kubelet&lt;/code&gt; API 鉴权已在 Kubernetes v1.36 中正式发布（GA）！&lt;/p&gt;
&lt;!--
The `KubeletFineGrainedAuthz` feature gate was introduced as an opt-in alpha
feature in Kubernetes v1.32, then graduated to beta (enabled by default) in
v1.33. Now, the feature is generally available and the feature gate is locked
to enabled. This feature enables more precise, least-privilege access control
over the `kubelet`&#39;s HTTPS API, replacing the need to grant the overly broad
`nodes/proxy` permission for common monitoring and observability use cases.
--&gt;
&lt;p&gt;&lt;code&gt;KubeletFineGrainedAuthz&lt;/code&gt; 特性门控在 Kubernetes v1.32 中作为可选启用的
Alpha 特性引入，并在 v1.33 中进入 Beta 阶段（默认启用）。
如今，该特性已正式发布，且特性门控被锁定为启用状态。
此特性可针对 &lt;code&gt;kubelet&lt;/code&gt; 的 HTTPS API 提供更精确、遵循最小权限原则的访问控制，
替代在常见监控与可观测性场景下授予范围过宽的 &lt;code&gt;nodes/proxy&lt;/code&gt; 权限的做法。&lt;/p&gt;
&lt;!--
## Motivation: the `nodes/proxy` problem
--&gt;
&lt;h2 id=&#34;动机-nodes-proxy-问题&#34;&gt;动机：&lt;code&gt;nodes/proxy&lt;/code&gt; 问题&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8a%a8%e6%9c%ba-nodes-proxy-%e9%97%ae%e9%a2%98&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The `kubelet` exposes an HTTPS endpoint with several APIs that give access to data
of varying sensitivity, including pod listings, node metrics, container logs,
and, critically, the ability to execute commands inside running containers.
--&gt;
&lt;p&gt;&lt;code&gt;kubelet&lt;/code&gt; 暴露了一个 HTTPS 端点，其中包含多个 API，可访问敏感程度不同的数据，
包括 Pod 列表、节点指标、容器日志，以及至关重要的在运行中的容器内执行命令的能力。&lt;/p&gt;
&lt;!--
Prior to this feature, `kubelet` authorization used a coarse-grained model. When
webhook authorization was enabled, almost all `kubelet` API paths were mapped to a
single `nodes/proxy` subresource. This meant that any workload needing to read
metrics or health status from the `kubelet` required `nodes/proxy` permission,
the same permission that also grants the ability to execute arbitrary commands
in any container running on the node.
--&gt;
&lt;p&gt;在此特性出现之前，&lt;code&gt;kubelet&lt;/code&gt; 鉴权采用的是一种粗粒度模型。
启用 webhook 鉴权时，几乎所有 &lt;code&gt;kubelet&lt;/code&gt; API 路径都会映射到单一的
&lt;code&gt;nodes/proxy&lt;/code&gt; 子资源。
这意味着，任何需要从 &lt;code&gt;kubelet&lt;/code&gt; 读取指标或健康状态的工作负载，
都必须拥有 &lt;code&gt;nodes/proxy&lt;/code&gt; 权限，而这一权限同时也赋予了在节点上运行的任意容器中执行任意命令的能力。&lt;/p&gt;
&lt;!--
### What&#39;s wrong with that?
--&gt;
&lt;h3 id=&#34;这有什么问题&#34;&gt;这有什么问题？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%bf%99%e6%9c%89%e4%bb%80%e4%b9%88%e9%97%ae%e9%a2%98&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Granting `nodes/proxy` to monitoring agents, log collectors, or health-checking
tools violates the principle of least privilege. If any of those workloads were
compromised, an attacker would gain the ability to run commands in every
container on the node. The `nodes/proxy` permission is effectively a node-level
superuser capability, and granting it broadly dramatically increases the blast
radius of a security incident.
--&gt;
&lt;p&gt;将 &lt;code&gt;nodes/proxy&lt;/code&gt; 授予监控代理、日志采集器或健康检查工具，违背了最小权限原则。
一旦这些工作负载中的任何一个被攻破，攻击者就能够在该节点上的每一个容器中执行命令。
&lt;code&gt;nodes/proxy&lt;/code&gt; 权限实质上相当于节点级的超级用户能力，
而将其广泛授予会显著扩大安全事件的影响范围。&lt;/p&gt;
&lt;!--
This problem has been well understood in the community for years (see 
[kubernetes/kubernetes#83465](https://github.com/kubernetes/kubernetes/issues/83465)),
and was the driving motivation behind this enhancement [KEP-2862](https://kep.k8s.io/2862).
--&gt;
&lt;p&gt;这个问题多年来一直被社区充分认识到（参见
&lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/83465&#34;&gt;kubernetes/kubernetes#83465&lt;/a&gt;），
也是推动此增强项 &lt;a href=&#34;https://kep.k8s.io/2862&#34;&gt;KEP-2862&lt;/a&gt; 的核心动因。&lt;/p&gt;
&lt;!--
### The `nodes/proxy GET` WebSocket RCE risk
--&gt;
&lt;h3 id=&#34;nodes-proxy-get-的-websocket-远程代码执行风险&#34;&gt;&lt;code&gt;nodes/proxy GET&lt;/code&gt; 的 WebSocket 远程代码执行风险&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#nodes-proxy-get-%e7%9a%84-websocket-%e8%bf%9c%e7%a8%8b%e4%bb%a3%e7%a0%81%e6%89%a7%e8%a1%8c%e9%a3%8e%e9%99%a9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The situation is more severe than it might appear at first glance. Security
researchers [demonstrated in early 2026](https://grahamhelton.com/blog/nodes-proxy-rce)
that `nodes/proxy GET` alone, which is the minimal read-only permission routinely
granted to monitoring tools, can be abused to execute commands in any pod on
reachable nodes.
--&gt;
&lt;p&gt;实际情况比乍看起来更严重。安全研究人员在
&lt;a href=&#34;https://grahamhelton.com/blog/nodes-proxy-rce&#34;&gt;2026 年初的研究中演示&lt;/a&gt;，
仅凭 &lt;code&gt;nodes/proxy GET&lt;/code&gt; 这一通常授予监控工具的最小只读权限，
就可以被滥用来在可访问节点上的任意 Pod 中执行命令。&lt;/p&gt;
&lt;!--
The root cause is a mismatch between how WebSocket connections work and how the
`kubelet` maps HTTP methods to RBAC verbs. The
[WebSocket protocol (RFC 6455)](https://datatracker.ietf.org/doc/html/rfc6455#section-1.2)
requires an HTTP `GET` request for the initial connection handshake. The `kubelet`
maps this `GET` to the RBAC `get` verb and authorizes the request without
performing a secondary check to confirm that `CREATE` permission is also present
for the write operation that follows. Using a WebSocket client like `websocat`,
an attacker can reach the `kubelet`&#39;s `/exec` endpoint directly on port 10250 and
execute arbitrary commands:
--&gt;
&lt;p&gt;根本原因在于 WebSocket 连接的工作方式与 &lt;code&gt;kubelet&lt;/code&gt; 将 HTTP 方法映射到
RBAC 动词的方式之间存在不匹配。
&lt;a href=&#34;https://datatracker.ietf.org/doc/html/rfc6455#section-1.2&#34;&gt;WebSocket 协议（RFC 6455）&lt;/a&gt;
要求在初始连接握手时发起一个 HTTP &lt;code&gt;GET&lt;/code&gt; 请求。
&lt;code&gt;kubelet&lt;/code&gt; 会将这个 &lt;code&gt;GET&lt;/code&gt; 映射为 RBAC &lt;code&gt;get&lt;/code&gt; 动词，并在鉴权时不进行二次检查，
以确认后续写操作所需的 &lt;code&gt;create&lt;/code&gt; 权限是否同时存在。
攻击者借助 &lt;code&gt;websocat&lt;/code&gt; 之类的 WebSocket 客户端，
可以直接访问 10250 端口上的 &lt;code&gt;kubelet&lt;/code&gt; &lt;code&gt;/exec&lt;/code&gt; 端点，并执行任意命令：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;websocat --insecure &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --header &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;$TOKEN&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --protocol v4.channel.k8s.io &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;wss://&lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;$NODE_IP&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;:10250/exec/default/nginx/nginx?output=1&amp;amp;error=1&amp;amp;command=id&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;uid&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;0&lt;span style=&#34;color:#666&#34;&gt;(&lt;/span&gt;root&lt;span style=&#34;color:#666&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#b8860b&#34;&gt;gid&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;0&lt;span style=&#34;color:#666&#34;&gt;(&lt;/span&gt;root&lt;span style=&#34;color:#666&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#b8860b&#34;&gt;groups&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;0&lt;span style=&#34;color:#666&#34;&gt;(&lt;/span&gt;root&lt;span style=&#34;color:#666&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Fine-grained `kubelet` authorization: how it works
--&gt;
&lt;h2 id=&#34;细粒度-kubelet-鉴权如何工作&#34;&gt;细粒度 &lt;code&gt;kubelet&lt;/code&gt; 鉴权如何工作&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%bb%86%e7%b2%92%e5%ba%a6-kubelet-%e9%89%b4%e6%9d%83%e5%a6%82%e4%bd%95%e5%b7%a5%e4%bd%9c&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
With `KubeletFineGrainedAuthz`, the `kubelet` now performs an additional, more
specific authorization check before falling back to the `nodes/proxy`
subresource. Several commonly used `kubelet` API paths are mapped to their own
dedicated subresources:
--&gt;
&lt;p&gt;启用 &lt;code&gt;KubeletFineGrainedAuthz&lt;/code&gt; 后，&lt;code&gt;kubelet&lt;/code&gt; 现在会在回退到 &lt;code&gt;nodes/proxy&lt;/code&gt;
子资源之前，先执行一次额外且更具体的鉴权检查。
多个常用的 &lt;code&gt;kubelet&lt;/code&gt; API 路径被映射到了各自专属的子资源：&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;code&gt;kubelet&lt;/code&gt; API&lt;/th&gt;
          &lt;th&gt;资源&lt;/th&gt;
          &lt;th&gt;子资源&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/stats/*&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;stats&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/metrics/*&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;metrics&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/logs/*&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;log&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/pods&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;pods, proxy&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/runningPods/&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;pods, proxy&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/healthz&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;healthz, proxy&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/configz&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;configz, proxy&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/spec/*&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;spec&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;/checkpoint/*&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;checkpoint&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;其他所有路径&lt;/td&gt;
          &lt;td&gt;nodes&lt;/td&gt;
          &lt;td&gt;proxy&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;!--
For the endpoints that now have fine-grained subresources (`/pods`,
`/runningPods/`, `/healthz`, `/configz`), the `kubelet` first sends a
`SubjectAccessReview` for the specific subresource. If that check succeeds, the
request is authorized. If it fails, the `kubelet` retries with the coarse-grained
`nodes/proxy` subresource for backward compatibility.
--&gt;
&lt;p&gt;对于现在拥有细粒度子资源的端点（&lt;code&gt;/pods&lt;/code&gt;、&lt;code&gt;/runningPods/&lt;/code&gt;、&lt;code&gt;/healthz&lt;/code&gt; 和
&lt;code&gt;/configz&lt;/code&gt;），&lt;code&gt;kubelet&lt;/code&gt; 会先针对具体子资源发送一次 &lt;code&gt;SubjectAccessReview&lt;/code&gt;。
如果该检查成功，请求即获准通过；如果失败，&lt;code&gt;kubelet&lt;/code&gt; 会再使用粗粒度的
&lt;code&gt;nodes/proxy&lt;/code&gt; 子资源重试，以保持向后兼容。&lt;/p&gt;
&lt;!--
This dual-check approach ensures a smooth migration path. Existing workloads
with `nodes/proxy` permissions continue to work, while new deployments can adopt
least-privilege access from day one.
--&gt;
&lt;p&gt;这种双重检查方式确保了平滑的迁移路径。
已有的、依赖 &lt;code&gt;nodes/proxy&lt;/code&gt; 权限的工作负载仍可继续运行，
而新的部署则可以从一开始就采用最小权限访问方式。&lt;/p&gt;
&lt;!--
## What this means in practice
--&gt;
&lt;h2 id=&#34;这在实践中意味着什么&#34;&gt;这在实践中意味着什么&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%bf%99%e5%9c%a8%e5%ae%9e%e8%b7%b5%e4%b8%ad%e6%84%8f%e5%91%b3%e7%9d%80%e4%bb%80%e4%b9%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Consider a Prometheus node exporter or a monitoring `DaemonSet` that needs to
scrape `/metrics` from the `kubelet`. Previously, you would need an RBAC
`ClusterRole` like this:
--&gt;
&lt;p&gt;以 Prometheus node exporter 或某个需要从 &lt;code&gt;kubelet&lt;/code&gt; 抓取 &lt;code&gt;/metrics&lt;/code&gt; 的监控
&lt;code&gt;DaemonSet&lt;/code&gt; 为例。过去，你需要像下面这样配置一个 RBAC &lt;code&gt;ClusterRole&lt;/code&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 旧方式：权限范围过宽&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;rbac.authorization.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterRole&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;monitoring-agent&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiGroups&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;nodes/proxy&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;verbs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;get&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This grants the monitoring agent far more access than it needs. With
fine-grained authorization, you can now scope the permissions precisely:
--&gt;
&lt;p&gt;这赋予了监控代理远超实际所需的访问权限。
有了细粒度鉴权后，你现在可以精确限定权限范围：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 新方式：遵循最小权限原则&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;rbac.authorization.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterRole&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;monitoring-agent&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiGroups&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;nodes/metrics&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;nodes/stats&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;verbs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;get&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
The monitoring agent can now read metrics and stats from the `kubelet` without
ever being able to execute commands in containers.
--&gt;
&lt;p&gt;这样一来，监控代理就可以从 &lt;code&gt;kubelet&lt;/code&gt; 读取 &lt;code&gt;metrics&lt;/code&gt; 与 &lt;code&gt;stats&lt;/code&gt;，
同时完全不具备在容器中执行命令的能力。&lt;/p&gt;
&lt;!--
## Updated `system:kubelet-api-admin` `ClusterRole`
--&gt;
&lt;h2 id=&#34;已更新的-system-kubelet-api-admin-clusterrole&#34;&gt;已更新的 &lt;code&gt;system:kubelet-api-admin&lt;/code&gt; &lt;code&gt;ClusterRole&lt;/code&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b7%b2%e6%9b%b4%e6%96%b0%e7%9a%84-system-kubelet-api-admin-clusterrole&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
When RBAC authorization is enabled, the built-in `system:kubelet-api-admin`
`ClusterRole` is automatically updated to include permissions for all the new
fine-grained subresources. This ensures that cluster administrators who already
use this role, including the API server&#39;s `kubelet` client, continue to have
full access without any manual configuration changes.
--&gt;
&lt;p&gt;启用 RBAC 鉴权时，内置的 &lt;code&gt;system:kubelet-api-admin&lt;/code&gt; &lt;code&gt;ClusterRole&lt;/code&gt;
会自动更新，以包含所有新的细粒度子资源权限。
这可确保已经在使用该角色的集群管理员（包括 API server 所使用的 &lt;code&gt;kubelet&lt;/code&gt; 客户端）
无需任何手动配置变更，仍然保有完整访问能力。&lt;/p&gt;
&lt;!--
The role now includes permissions for:
--&gt;
&lt;p&gt;该角色现在包含以下权限：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;nodes/proxy&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nodes/stats&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nodes/metrics&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nodes/log&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nodes/spec&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nodes/checkpoint&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nodes/configz&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nodes/healthz&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nodes/pods&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Upgrade considerations
--&gt;
&lt;h2 id=&#34;升级注意事项&#34;&gt;升级注意事项&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8d%87%e7%ba%a7%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Because the `kubelet` performs a dual authorization check (fine-grained first,
then falling back to `nodes/proxy`), upgrading to v1.36 should be seamless for
most clusters:
--&gt;
&lt;p&gt;由于 &lt;code&gt;kubelet&lt;/code&gt; 会执行双重鉴权检查（先细粒度检查，再回退到 &lt;code&gt;nodes/proxy&lt;/code&gt;），
升级到 v1.36 对大多数集群来说应当是无缝的：&lt;/p&gt;
&lt;!--
- **Existing workloads** with `nodes/proxy` permissions continue to work without
changes. The fallback to `nodes/proxy` ensures backward compatibility.
- **The API server** always has `nodes/proxy` permissions via
`system:kubelet-api-admin`, so `kube-apiserver`-to-`kubelet` communication is
unaffected regardless of feature gate state.
- **Mixed-version clusters** are handled gracefully. If a `kubelet` supports
fine-grained authorization but the API server does not (or vice versa),
`nodes/proxy` permissions serve as the fallback.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;现有工作负载&lt;/strong&gt;：已经拥有 &lt;code&gt;nodes/proxy&lt;/code&gt; 权限的工作负载无需任何改动即可继续运行。
回退到 &lt;code&gt;nodes/proxy&lt;/code&gt; 的机制保证了向后兼容。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API server&lt;/strong&gt;：始终通过 &lt;code&gt;system:kubelet-api-admin&lt;/code&gt; 拥有 &lt;code&gt;nodes/proxy&lt;/code&gt;
权限，因此无论特性门控状态如何，&lt;code&gt;kube-apiserver&lt;/code&gt; 与 &lt;code&gt;kubelet&lt;/code&gt; 之间的通信都不受影响。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;混合版本集群&lt;/strong&gt;：也能被平滑处理。如果 &lt;code&gt;kubelet&lt;/code&gt; 支持细粒度鉴权而 API server 不支持
（或反过来），&lt;code&gt;nodes/proxy&lt;/code&gt; 权限就会作为回退机制发挥作用。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Verifying the feature is enabled
--&gt;
&lt;h2 id=&#34;验证该特性是否已启用&#34;&gt;验证该特性是否已启用&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%aa%8c%e8%af%81%e8%af%a5%e7%89%b9%e6%80%a7%e6%98%af%e5%90%a6%e5%b7%b2%e5%90%af%e7%94%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
You can confirm that the feature is active on a given node by checking the
`kubelet` metrics endpoint. Since the metrics endpoint on port 10250 requires
authorization, you&#39;ll first need to create appropriate RBAC bindings for the pod
or `ServiceAccount` making the request.
--&gt;
&lt;p&gt;你可以通过检查 &lt;code&gt;kubelet&lt;/code&gt; 的 metrics 端点，确认该特性是否在某个节点上处于启用状态。
由于 10250 端口上的 metrics 端点需要鉴权，
你首先需要为发起请求的 Pod 或服务账号创建适当的 RBAC 绑定。&lt;/p&gt;
&lt;!--
**Step 1: Create a `ServiceAccount` and `ClusterRole`**
--&gt;
&lt;p&gt;&lt;strong&gt;第 1 步：创建 &lt;code&gt;ServiceAccount&lt;/code&gt; 和 &lt;code&gt;ClusterRole&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ServiceAccount&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubelet-metrics-checker&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;default&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;rbac.authorization.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterRole&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubelet-metrics-reader&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiGroups&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;nodes/metrics&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;verbs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;get&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
**Step 2: Bind the `ClusterRole` to the `ServiceAccount`**
--&gt;
&lt;p&gt;&lt;strong&gt;第 2 步：将 &lt;code&gt;ClusterRole&lt;/code&gt; 绑定到 &lt;code&gt;ServiceAccount&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;rbac.authorization.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterRoleBinding&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubelet-metrics-checker&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;subjects&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ServiceAccount&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubelet-metrics-checker&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;default&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;roleRef&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterRole&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubelet-metrics-reader&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiGroup&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;rbac.authorization.k8s.io&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Apply both manifests:
--&gt;
&lt;p&gt;应用这些清单：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl apply -f serviceaccount.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl apply -f clusterrole.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl apply -f clusterrolebinding.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
**Step 3: Run a pod with the `ServiceAccount` and check the feature flag**
--&gt;
&lt;p&gt;&lt;strong&gt;第 3 步：使用该 &lt;code&gt;ServiceAccount&lt;/code&gt; 运行一个 Pod，并检查特性标志&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl run kubelet-check &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --image&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;curlimages/curl &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --serviceaccount&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;kubelet-metrics-checker &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --restart&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;Never &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --rm -it &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  -- sh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Then from within the pod, retrieve the node IP and query the metrics endpoint:
--&gt;
&lt;p&gt;然后在 Pod 内获取节点 IP，并查询 metrics 端点：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 获取令牌&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;TOKEN&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;$(&lt;/span&gt;cat /var/run/secrets/kubernetes.io/serviceaccount/token&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 查询 kubelet 指标，并筛选特性门控&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl -sk &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --header &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;$TOKEN&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  https://&lt;span style=&#34;color:#b8860b&#34;&gt;$NODE_IP&lt;/span&gt;:10250/metrics &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  | grep kubernetes_feature_enabled &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  | grep KubeletFineGrainedAuthz
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
If the feature is enabled, you should see output like:
--&gt;
&lt;p&gt;如果该特性已启用，你应当会看到类似下面的输出：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kubernetes_feature_enabled{name=&amp;#34;KubeletFineGrainedAuthz&amp;#34;,stage=&amp;#34;GA&amp;#34;} 1
&lt;/code&gt;&lt;/pre&gt;&lt;!--
&gt; **Note:** Replace `$NODE_IP` with the IP address of the node you want to check.
You can retrieve node IPs with `kubectl get nodes -o wide`.
--&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;注意&lt;/strong&gt;： 请将 &lt;code&gt;$NODE_IP&lt;/code&gt; 替换为你要检查的节点 IP 地址。
你可以使用 &lt;code&gt;kubectl get nodes -o wide&lt;/code&gt; 获取节点 IP。&lt;/p&gt;&lt;/blockquote&gt;
&lt;!--
## The journey from alpha to GA
--&gt;
&lt;h2 id=&#34;从-alpha-到-ga-的历程&#34;&gt;从 Alpha 到 GA 的历程&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bb%8e-alpha-%e5%88%b0-ga-%e7%9a%84%e5%8e%86%e7%a8%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;版本&lt;/th&gt;
          &lt;th&gt;阶段&lt;/th&gt;
          &lt;th&gt;说明&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;v1.32&lt;/td&gt;
          &lt;td&gt;Alpha&lt;/td&gt;
          &lt;td&gt;引入 &lt;code&gt;KubeletFineGrainedAuthz&lt;/code&gt; 特性门控，默认禁用&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;v1.33&lt;/td&gt;
          &lt;td&gt;Beta&lt;/td&gt;
          &lt;td&gt;默认启用；为 &lt;code&gt;/pods&lt;/code&gt;、&lt;code&gt;/runningPods/&lt;/code&gt;、&lt;code&gt;/healthz&lt;/code&gt;、&lt;code&gt;/configz&lt;/code&gt; 增加细粒度检查&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;v1.36&lt;/td&gt;
          &lt;td&gt;GA&lt;/td&gt;
          &lt;td&gt;特性门控被锁定为启用状态；细粒度 &lt;code&gt;kubelet&lt;/code&gt; 鉴权始终处于活动状态&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;!--
## What&#39;s next?
--&gt;
&lt;h2 id=&#34;下一步是什么&#34;&gt;下一步是什么？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%8b%e4%b8%80%e6%ad%a5%e6%98%af%e4%bb%80%e4%b9%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
With fine-grained `kubelet` authorization now GA, the Kubernetes community can
begin recommending and eventually enforcing the use of specific subresources
instead of `nodes/proxy` for monitoring and observability workloads. The urgency
of this migration is underscored by
[research showing that `nodes/proxy GET` can be abused for unlogged remote code execution](https://grahamhelton.com/blog/nodes-proxy-rce) via the WebSocket protocol. This risk is present in the default RBAC
configurations of dozens of widely deployed Helm charts. Over time, we expect:
--&gt;
&lt;p&gt;随着细粒度 &lt;code&gt;kubelet&lt;/code&gt; 鉴权现已 GA，Kubernetes 社区可以开始建议，
并最终强制要求监控与可观测性工作负载使用特定子资源，而不是 &lt;code&gt;nodes/proxy&lt;/code&gt;。
之所以需要尽快推进这一迁移，是因为已有
&lt;a href=&#34;https://grahamhelton.com/blog/nodes-proxy-rce&#34;&gt;研究表明 &lt;code&gt;nodes/proxy GET&lt;/code&gt; 可通过 WebSocket 协议被滥用，从而实现无日志记录的远程代码执行&lt;/a&gt;。
这一风险存在于数十个被广泛部署的 Helm Chart 的默认 RBAC 配置中。
随着时间推移，我们预计会出现以下变化：&lt;/p&gt;
&lt;!--
- **Ecosystem adoption:** Monitoring tools like Prometheus, Datadog agents, and
other `DaemonSets` can update their default RBAC configurations to use
`nodes/metrics`, `nodes/stats`, and `nodes/pods` instead of `nodes/proxy`. This
directly eliminates the WebSocket RCE attack surface for those workloads.
- **Policy enforcement:** Admission controllers and policy engines can flag or
reject RBAC bindings that grant `nodes/proxy` when fine-grained alternatives
exist, helping organizations adopt least-privilege access at scale.
- **Deprecation path:** As adoption grows, `nodes/proxy` may eventually be
deprecated for monitoring use cases, further reducing the attack surface of
Kubernetes clusters.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;生态系统采用&lt;/strong&gt;：Prometheus、Datadog agent 以及其他 &lt;code&gt;DaemonSet&lt;/code&gt; 等监控工具，
可以更新其默认 RBAC 配置，改用 &lt;code&gt;nodes/metrics&lt;/code&gt;、&lt;code&gt;nodes/stats&lt;/code&gt; 和 &lt;code&gt;nodes/pods&lt;/code&gt;，
而不再使用 &lt;code&gt;nodes/proxy&lt;/code&gt;。这会直接消除这些工作负载面临的 WebSocket RCE 攻击面。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;策略执行&lt;/strong&gt;：当存在细粒度替代方案时，准入控制器与策略引擎可以标记或拒绝授予
&lt;code&gt;nodes/proxy&lt;/code&gt; 的 RBAC 绑定，帮助组织以规模化方式落实最小权限访问。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;弃用路径&lt;/strong&gt;：随着采用范围扩大，&lt;code&gt;nodes/proxy&lt;/code&gt; 最终可能会在监控用途中被弃用，
从而进一步缩小 Kubernetes 集群的攻击面。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Getting involved
--&gt;
&lt;h2 id=&#34;参与其中&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e5%85%b6%e4%b8%ad&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This enhancement was driven by SIG Auth and SIG Node. If you are interested in
contributing to the security and authorization features of Kubernetes, please
join us:
--&gt;
&lt;p&gt;这一增强项由 SIG Auth 和 SIG Node 推动。
如果你有兴趣为 Kubernetes 的安全与鉴权特性贡献力量，欢迎加入我们：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-auth&#34;&gt;SIG Auth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-node&#34;&gt;SIG Node&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Slack：&lt;code&gt;#sig-auth&lt;/code&gt; 和 &lt;code&gt;#sig-node&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/enhancements/issues/2862&#34;&gt;KEP-2862：细粒度 kubelet API 鉴权&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
We look forward to hearing your feedback and experiences with this feature!
--&gt;
&lt;p&gt;期待听到你对这一特性的反馈与使用经验！&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：用户命名空间终于正式可用</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/23/userns-ga/</link>
      <pubDate>Thu, 23 Apr 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/23/userns-ga/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;User Namespaces in Kubernetes: Finally GA&#34;
date: 2026-04-23T10:35:00-08:00
slug: userns-ga
author: &gt;
  Rodrigo Campos Catelin (Amutable),
  Giuseppe Scrivano (Red Hat)
--&gt;
&lt;!--
After several years of development, User Namespaces support in
Kubernetes reached General Availability (GA) with the v1.36 release.
This is a Linux-only feature.
--&gt;
&lt;p&gt;经过数年的开发，Kubernetes 中的用户命名空间（User Namespaces）支持已随着 v1.36 发布进入正式发布（GA）阶段。
这是一个仅适用于 Linux 的特性。&lt;/p&gt;
&lt;!--
For those of us working on low level container runtimes and rootless
technologies, this has been a long awaited milestone. We finally
reached the point where &#34;rootless&#34; security isolation can be used for
Kubernetes workloads.
--&gt;
&lt;p&gt;对于从事底层容器运行时（Container Runtimes）和 rootless 技术的我们来说，
这是一个期待已久的里程碑。
我们终于走到了可以将 &lt;strong&gt;rootless&lt;/strong&gt; 安全隔离用于 Kubernetes 工作负载的阶段。&lt;/p&gt;
&lt;!--
This feature also enables a critical pattern: running workloads with
privileges and still being confined in the user namespace.  When
`hostUsers: false` is set, capabilities like `CAP_NET_ADMIN` become
**namespaced**, meaning they grant administrative power over container
local resources without affecting the host.  This effectively enables
new use cases that were not possible before without running a fully
privileged container.
--&gt;
&lt;p&gt;这一特性还开启了一种关键模式：让工作负载在拥有特权的同时，依然被限制在用户命名空间内。
当设置 &lt;code&gt;hostUsers: false&lt;/code&gt; 时，&lt;code&gt;CAP_NET_ADMIN&lt;/code&gt; 这类权能（capabilities）会变成 &lt;strong&gt;被命名空间化（namespaced）&lt;/strong&gt; 的权能，
这意味着它们只会授予容器本地资源的管理能力，而不会影响主机。
这实际上开启了此前只有运行完全特权容器（fully privileged container）才能实现的新用例。&lt;/p&gt;
&lt;!--
## The Problem with UID 0
--&gt;
&lt;h2 id=&#34;the-problem-with-uid-0&#34;&gt;UID 0 的问题&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#the-problem-with-uid-0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
A process running as root inside a container is also seen from the
kernel as root on the host.  If an attacker manages to break out of
the container, whether through a kernel vulnerability or a
misconfigured mount, they are root on the host.
--&gt;
&lt;p&gt;在容器内以 &lt;code&gt;root&lt;/code&gt; 身份运行的进程，从内核视角看，在主机上同样是 &lt;code&gt;root&lt;/code&gt;。
如果攻击者成功逃逸出容器，无论是利用内核漏洞，还是借助配置错误的挂载（misconfigured mount），
他们都会在主机上获得 &lt;code&gt;root&lt;/code&gt; 权限。&lt;/p&gt;
&lt;!--
While there are many security measures in place for running
containers, these measures don&#39;t change the underlying identity of the
process, it still has some &#34;parts&#34; of root.
--&gt;
&lt;p&gt;虽然运行容器时已经有许多安全防护措施，但这些措施并不会改变进程的底层身份，
它依然保留着 &lt;code&gt;root&lt;/code&gt; 的某些“部分能力”。&lt;/p&gt;
&lt;!--
## The engine: ID-mapped mounts
--&gt;
&lt;h2 id=&#34;the-engine-id-mapped-mounts&#34;&gt;核心机制：ID-mapped mounts&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#the-engine-id-mapped-mounts&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The road to GA wasn&#39;t just about the Kubernetes API; it was about
making the kernel work for us.  In the early stages, one of the
biggest blockers was volume ownership.  If you mapped a container to a
high UID range, the Kubelet had to recursively `chown` every file in
the attached volume so the container could read/write them.  For large
volumes, this was such an expensive operation that destroyed startup
performance.
--&gt;
&lt;p&gt;通往 GA 的道路并不只是 Kubernetes API 的演进，更关键的是让内核真正为我们所用。
在早期阶段，最大的阻碍之一是卷的所有权问题。
如果你把容器映射到较高的 UID 范围，Kubelet 就必须递归地对挂载卷中的每个文件执行 &lt;code&gt;chown&lt;/code&gt;，
这样容器才能对这些文件进行读写。
对于大型卷来说，这一操作的成本高得惊人，足以摧毁启动性能。&lt;/p&gt;
&lt;!--
The key enabler was *ID-mapped mounts* (introduced in Linux
5.12 and refined in later versions). Instead of rewriting file
ownership on disk, the kernel remaps it at mount time.
--&gt;
&lt;p&gt;实现这一目标的关键，是 &lt;strong&gt;ID-mapped mounts&lt;/strong&gt;（在 Linux 5.12 中引入，并在后续版本中持续完善）。
借助这一机制，内核可以在挂载时重映射文件所有权，而不必改写磁盘上的实际所有权信息。&lt;/p&gt;
&lt;!--
When a volume is mounted into a Pod with User Namespaces enabled, the
kernel performs a transparent translation of the UIDs (user ids) and
GIDs (group ids). To the container, the files appear owned by
UID 0. On disk, file ownership is unchanged — no `chown` is needed.
This is an `O(1)` operation, instant and efficient.
--&gt;
&lt;p&gt;当一个卷被挂载到启用了用户命名空间的 Pod 中时，内核会透明地转换 UID（user ids）和 GID（group ids）。
对容器来说，这些文件看起来像是由 UID 0 拥有。
而在磁盘上，文件所有权完全不会变化，因此不需要执行 &lt;code&gt;chown&lt;/code&gt;。
这是一个 &lt;code&gt;O(1)&lt;/code&gt; 操作，既即时又高效。&lt;/p&gt;
&lt;!--
## Using it in Kubernetes v1.36
--&gt;
&lt;h2 id=&#34;using-it-in-kubernetes-v136&#34;&gt;在 Kubernetes v1.36 中使用它&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#using-it-in-kubernetes-v136&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Using user namespaces is straightforward: all you need to do is set
`hostUsers: false` in your Pod spec. No changes to your container
images, no complex configuration. The interface remains the same one
introduced during the Alpha phase. In the `spec` for a Pod (or PodTemplate), you explicitly
opt-out of the host user namespace:
--&gt;
&lt;p&gt;使用用户命名空间非常直接：你只需要在 Pod spec 中设置 &lt;code&gt;hostUsers: false&lt;/code&gt;。
无需修改容器镜像，也不需要复杂配置。
它仍然使用 Alpha 阶段引入的同一套接口。
在 Pod（或 PodTemplate）的 &lt;code&gt;spec&lt;/code&gt; 中，你可以显式选择不使用主机用户命名空间：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;isolated-workload&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostUsers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;app&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;fedora:42&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;securityContext&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;runAsUser&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;0&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
For more details on how user namespaces work in practice and demos of
CVEs rated HIGH mitigated, see the previous blog posts:
[User Namespaces alpha](/blog/2022/10/03/userns-alpha/),
[User Namespaces stateful pods in alpha](/blog/2023/09/13/userns-alpha/),
[User Namespaces beta](/blog/2024/04/22/userns-beta/), and
[User Namespaces enabled by default](/blog/2025/04/25/userns-enabled-by-default/).
--&gt;
&lt;p&gt;如果你想进一步了解用户命名空间在实践中的工作方式，以及它如何缓解被评为 &lt;strong&gt;HIGH&lt;/strong&gt; 的 CVE，
请参阅此前的博客文章：
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2022/10/03/userns-alpha/&#34;&gt;User Namespaces alpha&lt;/a&gt;、
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2023/09/13/userns-alpha/&#34;&gt;User Namespaces stateful pods in alpha&lt;/a&gt;、
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2024/04/22/userns-beta/&#34;&gt;User Namespaces beta&lt;/a&gt;，以及
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/04/25/userns-enabled-by-default/&#34;&gt;User Namespaces enabled by default&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Getting involved
--&gt;
&lt;h2 id=&#34;getting-involved&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#getting-involved&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you&#39;re interested in user namespaces or want to contribute, here
are some useful links:
--&gt;
&lt;p&gt;如果你对用户命名空间感兴趣，或希望参与贡献，这里有一些有用的链接：&lt;/p&gt;
&lt;!--
- [User Namespaces documentation](/docs/concepts/workloads/pods/user-namespaces/)
- [KEP-127: Support User Namespaces](https://kep.k8s.io/127)
- [SIG Node](https://github.com/kubernetes/community/tree/master/sig-node)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/pods/user-namespaces/&#34;&gt;User Namespaces 文档&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/127&#34;&gt;KEP-127: Support User Namespaces&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-node&#34;&gt;SIG Node&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Acknowledgments
--&gt;
&lt;h2 id=&#34;acknowledgments&#34;&gt;致谢&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#acknowledgments&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This feature has been years in the making: the first KEP was opened
10 years ago by other contributors, and we have been actively working
on it for the last 6 years. We&#39;d like to thank everyone who
contributed across SIG Node, the container runtimes, and the Linux
kernel. Special thanks to the reviewers and early adopters who helped
shape the design through multiple alpha and beta cycles.
--&gt;
&lt;p&gt;这一特性历经多年才走到今天：第一份 KEP 在 10 年前由其他贡献者提出，
而我们在过去 6 年里一直积极推动它向前发展。
我们感谢所有在 SIG Node、容器运行时以及 Linux 内核领域参与贡献的人。
同时，也特别感谢那些在多个 Alpha 和 Beta 周期中帮助打磨设计的评审者与早期采用者。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>SELinux 卷标签变更进入 GA 阶段（以及 v1.37 中可能的影响）</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/22/breaking-changes-in-selinux-volume-labeling/</link>
      <pubDate>Wed, 22 Apr 2026 10:35:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/22/breaking-changes-in-selinux-volume-labeling/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;SELinux Volume Label Changes goes GA (and likely implications in v1.37)&#34;
date: 2026-04-22T10:35:00-08:00
slug: breaking-changes-in-selinux-volume-labeling
author: &gt;
  [Jan Šafránek](https://github.com/jsafrane) (Red Hat)
  [Swathi Rao](https://github.com/SwathiR03) (Independent)
--&gt;
&lt;!--
If you run Kubernetes on Linux with SELinux in enforcing mode, plan ahead: a future release (anticipated to be v1.37) is
expected to turn the `SELinuxMount` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) on by default. This makes volume setup faster
for most workloads, but **it can break applications** that still depend on the older recursive relabeling
model in subtle ways (for example, sharing one volume between privileged and unprivileged Pods on the same node).
Kubernetes v1.36 is the right release to audit your cluster and fix or opt out of this change.
--&gt;
&lt;p&gt;如果你在 Linux 上运行带有 SELinux 强制模式的 Kubernetes，
请提前规划：未来某个版本（预计为 v1.37）预计将默认启用 &lt;code&gt;SELinuxMount&lt;/code&gt;
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/&#34;&gt;特性门控&lt;/a&gt;。
这会使大多数工作负载的卷设置更快，但&lt;strong&gt;它可能会破坏&lt;/strong&gt;以微妙方式仍依赖于旧版递归重新标记模型的应用程序
（例如，在同一节点上的特权和非特权 Pod 之间共享一个卷）。
Kubernetes v1.36 是审计集群、修复或选择退出此更改的正确版本。&lt;/p&gt;
&lt;!--
If your nodes do not use SELinux, nothing changes for you: the kubelet skips the whole
SELinux logic when SELinux is unavailable or disabled in the Linux kernel. You can skip this article completely.
--&gt;
&lt;p&gt;如果你的节点不使用 SELinux，则没有任何变化：
当 SELinux 在 Linux 内核中不可用或被禁用时，
kubelet 会跳过整个 SELinux 逻辑。你可以完全跳过本文。&lt;/p&gt;
&lt;!--
This blog builds on the earlier work described in the
[Kubernetes 1.27: Efficient SELinux Relabeling (Beta)](https://kubernetes.io/blog/2023/04/18/kubernetes-1-27-efficient-selinux-relabeling-beta/)
post, where the `SELinuxMountReadWriteOncePod` feature gate was described. The problem to be addressed remains
the same, however, this blog extends that same approach to all volumes.
--&gt;
&lt;p&gt;本文建立在
&lt;a href=&#34;https://kubernetes.io/blog/2023/04/18/kubernetes-1-27-efficient-selinux-relabeling-beta/&#34;&gt;Kubernetes 1.27：高效的 SELinux 重新标记（Beta）&lt;/a&gt;
一文中描述的早期工作基础上，该文介绍了 &lt;code&gt;SELinuxMountReadWriteOncePod&lt;/code&gt; 特性门控。
需要解决的问题保持不变，但是本文将相同的方法扩展到所有卷。&lt;/p&gt;
&lt;!--
## The problem
--&gt;
&lt;h2 id=&#34;问题描述&#34;&gt;问题描述&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%97%ae%e9%a2%98%e6%8f%8f%e8%bf%b0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Linux systems with Security Enhanced Linux (SELinux) enabled use labels attached to objects
(for example, files and network sockets) to make access control decisions.
Historically, the container runtime applies SELinux labels to a Pod and all its volumes. Kubernetes only passes the SELinux label from a Pod&#39;s `securityContext` fields
to the container runtime.
--&gt;
&lt;p&gt;启用了安全增强 Linux（SELinux）的 Linux 系统使用附加到对象（例如文件和网络套接字）
上的标签来进行访问控制决策。
历史上，容器运行时将 SELinux 标签应用到 Pod 及其所有卷。
Kubernetes 仅将 Pod 的 &lt;code&gt;securityContext&lt;/code&gt; 字段中的 SELinux 标签传递给容器运行时。&lt;/p&gt;
&lt;!--
The container runtime then recursively changes the SELinux label on all files that
are visible to the Pod&#39;s containers. This can be time-consuming if there are
many files on the volume, especially when the volume is on a remote filesystem.
--&gt;
&lt;p&gt;然后容器运行时递归地更改对 Pod 容器可见的所有文件上的 SELinux 标签。
如果卷上有许多文件，这可能非常耗时，尤其是当卷位于远程文件系统上时。&lt;/p&gt;
&lt;div class=&#34;alert alert-caution&#34; role=&#34;note&#34;&gt;&lt;h4 class=&#34;alert-heading&#34;&gt;注意：&lt;/h4&gt;&lt;!--
If a container uses `subPath` of a volume, only that `subPath` of the whole
volume is relabeled. This allows two Pods that have two different SELinux labels
to use the same volume, as long as they use different subpaths of it.
--&gt;
&lt;p&gt;如果容器使用卷的 &lt;code&gt;subPath&lt;/code&gt;，则只重新标记整个卷的该 &lt;code&gt;subPath&lt;/code&gt;。
这允许具有两个不同 SELinux 标签的两个 Pod 使用同一个卷，只要它们使用不同的 &lt;code&gt;subpath&lt;/code&gt;。&lt;/p&gt;&lt;/div&gt;

&lt;!--
If a Pod does not have any SELinux label assigned in the Kubernetes API, the
container runtime assigns a unique random label, so a process that potentially
escapes the container boundary cannot access data of any other container on the
host. The container runtime still recursively relabels all Pod volumes with this
random SELinux label.
--&gt;
&lt;p&gt;如果 Pod 在 Kubernetes API 中没有分配任何 SELinux 标签，
容器运行时会分配一个唯一的随机标签，
这样可能逃逸容器边界的进程无法访问主机上任何其他容器中的数据。
容器运行时仍会用此随机 SELinux 标签递归地重新标记所有 Pod 卷。&lt;/p&gt;
&lt;!--
## What Kubernetes is improving
--&gt;
&lt;h2 id=&#34;kubernetes-的改进&#34;&gt;Kubernetes 的改进&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kubernetes-%e7%9a%84%e6%94%b9%e8%bf%9b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Where the stack supports it, the kubelet can mount the volume with `-o context=&lt;label&gt;` so the kernel
applies the correct label for all inodes on that mount without a recursive inode traversal. That path is
gated by feature flags and requires, among other things, that the Pod expose enough of an SELinux
label (for example `spec.securityContext.seLinuxOptions.level`) and that the volume driver opts in (for CSI,
CSIDriver field `spec.seLinuxMount: true`).
--&gt;
&lt;p&gt;在堆栈支持的情况下，kubelet 可以使用 &lt;code&gt;-o context=&amp;lt;label&amp;gt;&lt;/code&gt; 挂载卷，
以便内核为该挂载上的所有 inode 应用正确的标签，而无需递归遍历 inode。
该路径受特性门控限制，并且需要（除其他外）Pod 暴露足够的 SELinux
标签（例如 &lt;code&gt;spec.securityContext.seLinuxOptions.level&lt;/code&gt;），
并且卷驱动程序选择加入（对于 CSI，设置 CSIDriver 字段 &lt;code&gt;spec.seLinuxMount: true&lt;/code&gt;）。&lt;/p&gt;
&lt;!--
The project rolled this out in phases:
--&gt;
&lt;p&gt;项目分阶段推出此功能：&lt;/p&gt;
&lt;!--
- ReadWriteOncePod volumes were handled under the `SELinuxMountReadWriteOncePod` feature gate, on by default since v1.28 and GA in v1.36.
- Broader coverage was handled under the `SELinuxMount` flag, paired with the `spec.securityContext.seLinuxChangePolicy` field on Pods.
--&gt;
&lt;ul&gt;
&lt;li&gt;ReadWriteOncePod 卷在 &lt;code&gt;SELinuxMountReadWriteOncePod&lt;/code&gt; 特性门控下处理，
自 v1.28 起默认启用，在 v1.36 中达到 GA。&lt;/li&gt;
&lt;li&gt;更广泛的覆盖范围在 &lt;code&gt;SELinuxMount&lt;/code&gt; 标志下处理，与 Pod 上的
&lt;code&gt;spec.securityContext.seLinuxChangePolicy&lt;/code&gt; 字段配合使用。&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- a heavily edited copy from the previous blog + docs in https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ --&gt;
&lt;!--
If a Pod and its volume meet **all** of the following conditions, Kubernetes will
mount the volume directly with the right SELinux label. Such a mount will happen
in a constant time and the container runtime will not need to recursively
relabel any files on it. For such a mount to happen:
--&gt;
&lt;p&gt;如果 Pod 及其卷满足&lt;strong&gt;所有&lt;/strong&gt;以下条件，Kubernetes 将直接以正确的 SELinux 标签挂载卷。
这种挂载将在恒定时间内完成，容器运行时无需递归地重新标记其上的任何文件。
要进行此类挂载，需要满足以下条件：&lt;/p&gt;
&lt;!--
1. The operating system must support SELinux. Without SELinux support detected, the kubelet and the container runtime do not
   do anything with regard to SELinux.
--&gt;
&lt;ol&gt;
&lt;li&gt;操作系统必须支持 SELinux。在未检测到 SELinux 支持的情况下，
kubelet 和容器运行时不会对 SELinux 执行任何操作。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. The [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
   `SELinuxMountReadWriteOncePod` must be enabled.
   If you&#39;re running Kubernetes v1.36, the feature is enabled unconditionally.
--&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/&#34;&gt;特性门控&lt;/a&gt;
&lt;code&gt;SELinuxMountReadWriteOncePod&lt;/code&gt; 必须启用。
如果你运行的是 Kubernetes v1.36，则该特性无条件启用。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. The Pod must use a PersistentVolumeClaim with applicable `accessModes`:
   * Either the volume has `accessModes: [&#34;ReadWriteOncePod&#34;]`
   * or the volume can use any other access mode(s), provided that the feature gates
     `SELinuxChangePolicy` and `SELinuxMount` are both enabled
     **and** the Pod has `spec.securityContext.seLinuxChangePolicy` set to nil (default) or as `MountOption`.

   The feature gate `SELinuxMount` is Beta and disabled by default in Kubernetes 1.36.
   All other SELinux-related feature gates are now General Availability (GA).

   With any of these feature gates disabled, SELinux labels will always be
   applied by the container runtime via recursively traversing through the volume
   (or its subPaths).
--&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Pod 必须使用具有适用 &lt;code&gt;accessModes&lt;/code&gt; 的 PersistentVolumeClaim：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;要么卷具有 &lt;code&gt;accessModes: [&amp;quot;ReadWriteOncePod&amp;quot;]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;要么卷可以使用任何其他访问模式，但需要满足以下条件：
特性门控 &lt;code&gt;SELinuxChangePolicy&lt;/code&gt; 和 &lt;code&gt;SELinuxMount&lt;/code&gt; 都已启用，
&lt;strong&gt;并且&lt;/strong&gt; Pod 的 &lt;code&gt;spec.securityContext.seLinuxChangePolicy&lt;/code&gt; 设置为 nil（默认）或 &lt;code&gt;MountOption&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;特性门控 &lt;code&gt;SELinuxMount&lt;/code&gt; 在 Kubernetes 1.36 中为 Beta 阶段且默认禁用。
所有其他 SELinux 相关的特性门控现在都已达到正式发布（GA）。&lt;/p&gt;
&lt;p&gt;如果其中任何特性门控被禁用，SELinux 标签将始终通过递归遍历卷（或其 &lt;code&gt;subPath&lt;/code&gt;）由容器运行时应用。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. The Pod must have at least `seLinuxOptions.level` assigned in its
   [security context](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context)
   or all containers in that Pod must have it set in their container-level [security contexts](/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1).
   Kubernetes will read the default `user`, `role` and `type` from the operating
   system defaults (typically `system_u`, `system_r` and `container_t`).

   Without Kubernetes knowing at least the SELinux `level`, the container
   runtime will assign a random level after the volumes are mounted. The
   container runtime will still relabel the volumes recursively in that case.
--&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Pod 必须在其
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context&#34;&gt;安全上下文&lt;/a&gt;
中至少分配了 &lt;code&gt;seLinuxOptions.level&lt;/code&gt;，或者该 Pod
中的所有容器都必须在容器级别的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/kubernetes-api/workload-resources/pod-v1/#security-context-1&#34;&gt;安全上下文&lt;/a&gt;中设置它。
Kubernetes 将从操作系统默认值（通常为 &lt;code&gt;system_u&lt;/code&gt;、&lt;code&gt;system_r&lt;/code&gt; 和 &lt;code&gt;container_t&lt;/code&gt;）
中读取默认的 &lt;code&gt;user&lt;/code&gt;、&lt;code&gt;role&lt;/code&gt; 和 &lt;code&gt;type&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;如果 Kubernetes 不知道 SELinux 的“级别”，容器运行时将在卷挂载后分配一个随机级别。
在这种情况下，容器运行时仍会递归地重新标记卷。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. The volume plugin or the CSI driver responsible for the volume supports
   mounting with SELinux mount options.

   These in-tree volume plugins support mounting with SELinux mount options:
   `fc` and `iscsi`.

   CSI drivers that support mounting with SELinux mount options must declare this capability in their
   [CSIDriver](/docs/reference/kubernetes-api/config-and-storage-resources/csi-driver-v1/)
   instance by setting the `seLinuxMount` field.

   Volumes managed by other volume plugins or CSI drivers that do not
   set `seLinuxMount: true` will be recursively relabeled by the container
   runtime.
--&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;负责该卷的卷插件或 CSI 驱动程序支持使用 SELinux 挂载选项进行挂载。&lt;/p&gt;
&lt;p&gt;这些树内卷插件支持使用 SELinux 挂载选项进行挂载：&lt;code&gt;fc&lt;/code&gt; 和 &lt;code&gt;iscsi&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;支持使用 SELinux 挂载选项进行挂载的 CSI 驱动程序必须通过设置 &lt;code&gt;seLinuxMount&lt;/code&gt; 字段在其
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/csi-driver-v1/&#34;&gt;CSIDriver&lt;/a&gt;
实例中声明此功能。&lt;/p&gt;
&lt;p&gt;由其他卷插件或未设置 &lt;code&gt;seLinuxMount: true&lt;/code&gt; 的 CSI
驱动程序管理的卷将由容器运行时递归地重新标记。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
## The breaking change
--&gt;
&lt;h2 id=&#34;破坏性变更&#34;&gt;破坏性变更&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%a0%b4%e5%9d%8f%e6%80%a7%e5%8f%98%e6%9b%b4&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The `SELinuxMount` feature gate changes what volumes can be shared among multiple Pods in a subtle way.
--&gt;
&lt;p&gt;&lt;code&gt;SELinuxMount&lt;/code&gt; 特性门控以微妙的方式改变了多个 Pod 之间可以共享的卷。&lt;/p&gt;
&lt;!--
Both of these cases work with recursive relabeling:
--&gt;
&lt;p&gt;以下两种情况在递归重新标记下都能正常工作：&lt;/p&gt;
&lt;!--
1. Two Pods with different SELinux labels share the same volume, but each of them uses a different `subPath` to the volume.
--&gt;
&lt;ol&gt;
&lt;li&gt;具有不同 SELinux 标签的两个 Pod 共享同一个卷，
但它们各自使用不同的 &lt;code&gt;subPath&lt;/code&gt; 访问该卷。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. A privileged Pod and an unprivileged Pod share the same volume.
--&gt;
&lt;ol&gt;
&lt;li&gt;特权 Pod 和非特权 Pod 共享同一个卷。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
The above scenarios will not work with modern, target behavior for Kubernetes mounting when SELinux is active. Instead, one of these Pods will be stuck in `ContainerCreating` until the other Pod is terminated.
--&gt;
&lt;p&gt;当 SELinux 处于活动状态时，上述场景将不适用于 Kubernetes 挂载的现代目标行为。
相反，其中一个 Pod 将停留在 &lt;code&gt;ContainerCreating&lt;/code&gt; 状态，直到另一个 Pod 被终止。&lt;/p&gt;
&lt;!--
The first case is very niche and hasn&#39;t been seen in practice.
Although the second case is still quite rare, this setup has been observed in applications.
Kubernetes v1.36 offers metrics and events to identify these Pods and allows cluster administrators to opt out of the
mount option through the Pod field `spec.securityContext.seLinuxChangePolicy`.
--&gt;
&lt;p&gt;第一种情况非常小众，在实践中从未见过。
虽然第二种情况仍然相当罕见，但已在应用程序中观察到这种设置。
Kubernetes v1.36 提供了指标和事件来识别这些 Pod，并允许集群管理员通过
Pod 字段 &lt;code&gt;spec.securityContext.seLinuxChangePolicy&lt;/code&gt; 选择退出挂载选项。&lt;/p&gt;
&lt;h3 id=&#34;selinuxchangepolicy&#34;&gt;&lt;code&gt;seLinuxChangePolicy&lt;/code&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#selinuxchangepolicy&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The new Pod field `spec.securityContext.seLinuxChangePolicy` specifies how the SELinux label is applied to all Pod volumes.
In Kubernetes v1.36, this field is part of the stable Pod API.
--&gt;
&lt;p&gt;新的 Pod 字段 &lt;code&gt;spec.securityContext.seLinuxChangePolicy&lt;/code&gt;
指定如何将 SELinux 标签应用到所有 Pod 卷。
在 Kubernetes v1.36 中，此字段是稳定 Pod API 的一部分。&lt;/p&gt;
&lt;!--
There are three choices available:
--&gt;
&lt;p&gt;有三个可用的选项：&lt;/p&gt;
&lt;!--
_field not set_ (default)
: In Kubernetes v1.36, the behavior depends on whether the `SELinuxMount` feature gate is enabled. By default that feature gate is not enabled, and the SELinux label is applied recursively. If you enable that feature gate in your cluster, and [all other conditions](#what-kubernetes-is-improving) are met, labelling will be applied using the mount option.
--&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;strong&gt;字段未设置&lt;/strong&gt;（默认）&lt;/dt&gt;
&lt;dd&gt;在 Kubernetes v1.36 中，行为取决于 &lt;code&gt;SELinuxMount&lt;/code&gt; 特性门控是否启用。
默认情况下，该特性门控未启用，SELinux 标签递归应用。
如果你在集群中启用了该特性门控，并且满足&lt;a href=&#34;#what-kubernetes-is-improving&#34;&gt;所有其他条件&lt;/a&gt;，
则将使用挂载选项应用标签。&lt;/dd&gt;
&lt;/dl&gt;
&lt;!--
`Recursive`
: the SELinux label is applied recursively. This opts out from using the mount option.
--&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;Recursive&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;SELinux 标签递归应用。这选择退出使用挂载选项。&lt;/dd&gt;
&lt;/dl&gt;
&lt;!--
`MountOption`
: the SELinux label is applied using the mount option, if [all other conditions](#what-kubernetes-is-improving) are met.
  This choice is available only when the `SELinuxMount` feature gate is enabled.
--&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;MountOption&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;如果满足&lt;a href=&#34;#what-kubernetes-is-improving&#34;&gt;所有其他条件&lt;/a&gt;，则使用挂载选项应用 SELinux 标签。
此选项仅在 &lt;code&gt;SELinuxMount&lt;/code&gt; 特性门控启用时可用。&lt;/dd&gt;
&lt;/dl&gt;
&lt;!--
## SELinux warning controller (optional) {#selinux-warning-controller}
--&gt;
&lt;h2 id=&#34;selinux-warning-controller&#34;&gt;SELinux 警告控制器（可选）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#selinux-warning-controller&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes v1.36 provides a new controller within the control plane, `selinux-warning-controller`.
This controller runs within the kube-controller-manager controller.
To use it, you pass `--controllers=*,selinux-warning-controller` on the kube-controller-manager command line;
you also must not have explicitly overridden the `SELinuxChangePolicy` feature gate to be disabled.
--&gt;
&lt;p&gt;Kubernetes v1.36 在控制平面中提供了一个新的控制器 &lt;code&gt;selinux-warning-controller&lt;/code&gt;。
此控制器在 kube-controller-manager 控制器内运行。
要使用它，你需要在 kube-controller-manager 命令行上传递 &lt;code&gt;--controllers=*,selinux-warning-controller&lt;/code&gt;；
你还不能明确地将 &lt;code&gt;SELinuxChangePolicy&lt;/code&gt; 特性门控覆盖为禁用。&lt;/p&gt;
&lt;!--
The controller watches all Pods in the cluster and emits an Event when it finds two Pods that share the same
volume in a way that is not compatible with the `SELinuxMount` feature gate.
All such conflicting Pods will receive an event, such as:
--&gt;
&lt;p&gt;控制器监视集群中的所有 Pod，当发现两个 Pod 以与 &lt;code&gt;SELinuxMount&lt;/code&gt;
特性门控不兼容的方式共享同一卷时会发出事件。
所有此类冲突的 Pod 将收到一个事件，例如：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;SELinuxLabel &amp;#34;system_u:system_r:container_t:s0:c98,c99&amp;#34; conflicts with pod my-other-pod that uses the same volume as this pod with SELinuxLabel &amp;#34;system_u:system_r:container_t:s0:c0,c1&amp;#34;. If both pods land on the same node, only one of them may access the volume.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;当冲突的 Pod 运行在不同名字空间时，实际的 Pod 名称可能会被隐藏，
以防止跨名字空间边界泄露信息。&lt;/p&gt;
&lt;!--
The controller reports such an event even when these Pods don&#39;t run on the same node, to make sure all Pods work
regardless of the Kubernetes scheduler decision. They could run on the same node next time.
--&gt;
&lt;p&gt;即使这些 Pod 不在同一节点上运行，控制器也会报告此类事件，
以确保所有 Pod 都能正常工作，而不考虑 Kubernetes 调度器的决定。
它们下次可能会在同一节点上运行。&lt;/p&gt;
&lt;!--
In addition, the controller emits the metric `selinux_warning_controller_selinux_volume_conflict` that lists all current conflicts among Pods.
The metric has labels that identify the conflicting Pods and their SELinux labels, such as:
--&gt;
&lt;p&gt;此外，控制器发出指标 &lt;code&gt;selinux_warning_controller_selinux_volume_conflict&lt;/code&gt;，
列出 Pod 之间所有当前的冲突。
该指标具有用于识别冲突 Pod 及其 SELinux 标签的标签，例如：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;selinux_warning_controller_selinux_volume_conflict{pod1_name=&amp;#34;my-other-pod&amp;#34;,pod1_namespace=&amp;#34;default&amp;#34;,pod1_value=&amp;#34;system_u:object_r:container_file_t:s0:c0,c1&amp;#34;,pod2_name=&amp;#34;my-pod&amp;#34;,pod2_namespace=&amp;#34;default&amp;#34;,pod2_value=&amp;#34;system_u:object_r:container_file_t:s0:c0,c2&amp;#34;,property=&amp;#34;SELinuxLabel&amp;#34;} 1
&lt;/code&gt;&lt;/pre&gt;&lt;!--
There is a security consequence from enabling this opt-in controller: it may reveal namespace names, which are always present in the metric.
The Kubernetes project assumes only cluster administrators can access kube-controller-manager metrics.
--&gt;
&lt;p&gt;启用此选择性加入控制器存在安全后果：它可能泄露名字空间名称，这些名称始终存在于指标中。
Kubernetes 项目假定只有集群管理员可以访问 kube-controller-manager 指标。&lt;/p&gt;
&lt;!--
## Suggested upgrade path
--&gt;
&lt;h2 id=&#34;建议的升级路径&#34;&gt;建议的升级路径&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bb%ba%e8%ae%ae%e7%9a%84%e5%8d%87%e7%ba%a7%e8%b7%af%e5%be%84&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To ensure a smooth upgrade path from v1.36 to a release with `SELinuxMount` enabled (anticipated to be v1.37), we suggest you follow these steps:
--&gt;
&lt;p&gt;为确保从 v1.36 平滑升级到启用 &lt;code&gt;SELinuxMount&lt;/code&gt; 的版本（预计为 v1.37），
我们建议你按照以下步骤操作：&lt;/p&gt;
&lt;!--
1. Enable selinux-warning-controller in the kube-controller-manager.
--&gt;
&lt;ol&gt;
&lt;li&gt;在 kube-controller-manager 中启用 selinux-warning-controller。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. Check the `selinux_warning_controller_selinux_volume_conflict` metric. It shows all *potential* conflicts between Pods.
   For each conflicting Pod (Deployment, StatefulSet, etc.), either apply the opt-out (set Pod&#39;s `spec.securityContext.seLinuxChangePolicy: Recursive`)
   or re-architect the application to remove such a conflict. For example, do your Pods really need to run as privileged?
--&gt;
&lt;ol&gt;
&lt;li&gt;检查 &lt;code&gt;selinux_warning_controller_selinux_volume_conflict&lt;/code&gt; 指标。
它显示 Pod 之间的所有&lt;strong&gt;潜在&lt;/strong&gt;冲突。
对于每个冲突的 Pod（Deployment、StatefulSet 等），
要么应用选择退出（设置 Pod 的 &lt;code&gt;spec.securityContext.seLinuxChangePolicy: Recursive&lt;/code&gt;），
要么重新设计应用程序以消除此类冲突。例如，你的 Pod 真的需要以特权身份运行吗？&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. Check the `volume_manager_selinux_volume_context_mismatch_warnings_total` metric. This metric is emitted by the kubelet when it actually
   starts a Pod that runs when `SELinuxMount` is disabled, but such a Pod won&#39;t start when `SELinuxMount` is enabled.
   This metric lists the number of Pods that will experience a true conflict. Unfortunately, this metric does not expose the exact Pod name as a label.
   The full Pod name is available only in the `selinux_warning_controller_selinux_volume_conflict` metric.
--&gt;
&lt;ol&gt;
&lt;li&gt;检查 &lt;code&gt;volume_manager_selinux_volume_context_mismatch_warnings_total&lt;/code&gt; 指标。
当实际启动在 &lt;code&gt;SELinuxMount&lt;/code&gt; 被禁用时运行的 Pod 时，此指标由 kubelet 发出，
但此类 Pod 在 &lt;code&gt;SELinuxMount&lt;/code&gt; 启用时将无法启动。
此指标列出了将经历真正冲突的 Pod 数量。不幸的是，此指标不会将确切的 Pod 名称公开为标签。
完整的 Pod 名称仅在 &lt;code&gt;selinux_warning_controller_selinux_volume_conflict&lt;/code&gt; 指标中可用。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. Once both metrics have been accounted for, upgrade to a Kubernetes version that has `SELinuxMount` enabled.
--&gt;
&lt;ol&gt;
&lt;li&gt;一旦两个指标都被考虑在内，升级到启用了 &lt;code&gt;SELinuxMount&lt;/code&gt; 的 Kubernetes 版本。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
Consider using a [MutatingAdmissionPolicy](/docs/reference/access-authn-authz/mutating-admission-policy/),
a [mutating webhook](/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks_),
or a policy engine like [Kyverno](https://github.com/kyverno/kyverno/) or [Gatekeeper](https://github.com/open-policy-agent/gatekeeper)
to apply the opt-out to all Pods in a namespace or across the entire cluster.
--&gt;
&lt;p&gt;考虑使用 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/access-authn-authz/mutating-admission-policy/&#34;&gt;MutatingAdmissionPolicy&lt;/a&gt;、
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/#what-are-admission-webhooks_&#34;&gt;变更性 Webhook&lt;/a&gt;
或策略引擎如 &lt;a href=&#34;https://github.com/kyverno/kyverno/&#34;&gt;Kyverno&lt;/a&gt;
或 &lt;a href=&#34;https://github.com/open-policy-agent/gatekeeper&#34;&gt;Gatekeeper&lt;/a&gt;
来将选择退出应用到名字空间或整个集群中的所有 Pod。&lt;/p&gt;
&lt;!--
When `SELinuxMount` is enabled, the kubelet will emit the metric `volume_manager_selinux_volume_context_mismatch_errors_total` with the number of
Pods that could not start because their SELinux label conflicts with an existing Pod that uses the same volume.
The exact Pod names should still be available in the `selinux_warning_controller_selinux_volume_conflict` metric,
if the selinux-warning-controller is enabled.
--&gt;
&lt;p&gt;当 &lt;code&gt;SELinuxMount&lt;/code&gt; 启用时，kubelet 将发出指标
&lt;code&gt;volume_manager_selinux_volume_context_mismatch_errors_total&lt;/code&gt;，
其中包含因 SELinux 标签与使用同一卷的现有 Pod 冲突而无法启动的 Pod 数量。
如果 selinux-warning-controller 被启用，确切的 Pod 名称仍应在
&lt;code&gt;selinux_warning_controller_selinux_volume_conflict&lt;/code&gt; 指标中可用。&lt;/p&gt;
&lt;!--
## Further reading
--&gt;
&lt;h2 id=&#34;进一步阅读&#34;&gt;进一步阅读&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%bf%9b%e4%b8%80%e6%ad%a5%e9%98%85%e8%af%bb&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
- KEP: [Speed up SELinux volume relabeling using mounts](https://kep.k8s.io/1710)
- [SELinux Volume Relabeling Feature Gates](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#feature-gates)
- [Story 3: cluster upgrade](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1710-selinux-relabeling#story-3-cluster-upgrade)
- [Configure a security context for a Pod](/docs/tasks/configure-pod-container/security-context/) — Efficient SELinux volume relabeling and selinux-warning-controller
--&gt;
&lt;ul&gt;
&lt;li&gt;KEP：&lt;a href=&#34;https://kep.k8s.io/1710&#34;&gt;使用挂载加速 SELinux 卷重新标记&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#feature-gates&#34;&gt;SELinux 卷重新标记特性门控&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1710-selinux-relabeling#story-3-cluster-upgrade&#34;&gt;故事 3：集群升级&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/configure-pod-container/security-context/&#34;&gt;为 Pod 配置安全上下文&lt;/a&gt; — 高效的 SELinux 卷重新标记和 selinux-warning-controller&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Acknowledgements
--&gt;
&lt;h2 id=&#34;致谢&#34;&gt;致谢&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%87%b4%e8%b0%a2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you run into issues, have feedback, or want to contribute, find us
on the Kubernetes Slack in `#sig-node` and `#sig-storage` or join a
[SIG Node](https://github.com/kubernetes/community/tree/main/sig-node) or [SIG Storage](https://github.com/kubernetes/community/tree/main/sig-storage) meetings.
--&gt;
&lt;p&gt;如果你遇到问题、有反馈或想要贡献，请在 Kubernetes Slack 的
&lt;code&gt;#sig-node&lt;/code&gt; 和 &lt;code&gt;#sig-storage&lt;/code&gt; 中找到我们，或加入
&lt;a href=&#34;https://github.com/kubernetes/community/tree/main/sig-node&#34;&gt;SIG Node&lt;/a&gt; 或
&lt;a href=&#34;https://github.com/kubernetes/community/tree/main/sig-storage&#34;&gt;SIG Storage&lt;/a&gt; 会议。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36：ハル (Haru)</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/22/kubernetes-v1-36-release/</link>
      <pubDate>Wed, 22 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/22/kubernetes-v1-36-release/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.36: ハル (Haru)&#34;
date: 2026-04-22
evergreen: true
slug: kubernetes-v1-36-release
release_announcement:
  minor_version: &#34;1.36&#34;
author: &gt;
  [Kubernetes v1.36 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.36/release-team.md)
--&gt;
&lt;!--
**Editors:** Chad M. Crowell, Kirti Goyal, Sophia Ugochukwu, Swathi Rao, Utkarsh Umre
--&gt;
&lt;p&gt;&lt;strong&gt;编辑&lt;/strong&gt;：Chad M. Crowell、Kirti Goyal、Sophia Ugochukwu、Swathi Rao、Utkarsh Umre&lt;/p&gt;
&lt;!--
Similar to previous releases, the release of Kubernetes v1.36 introduces new stable, beta, and alpha features. The consistent delivery of high-quality releases underscores the strength of our development cycle and the vibrant support from our community.
--&gt;
&lt;p&gt;与之前的版本类似，Kubernetes v1.36 的发布引入了新的稳定（GA）、Beta 和 Alpha 特性。
持续交付高质量版本，凸显了我们开发周期的韧性，以及社区充满活力的支持。&lt;/p&gt;
&lt;!--
This release consists of 70 enhancements. Of those enhancements, 18 have graduated to Stable, 25 are entering Beta, and 25 have graduated to Alpha.
--&gt;
&lt;p&gt;此版本包含 70 项增强。其中，18 项已进阶至稳定阶段，25 项进入 Beta 阶段，25 项进阶至 Alpha 阶段。&lt;/p&gt;
&lt;!--
There are also some [deprecations and removals](#deprecations-removals-and-community-updates) in this release; make sure to read about those.
--&gt;
&lt;p&gt;本次发布还包含一些&lt;a href=&#34;#deprecations-removals-and-community-updates&#34;&gt;弃用与移除&lt;/a&gt;内容，请务必阅读相关说明。&lt;/p&gt;
&lt;!--
## Release theme and logo
--&gt;
&lt;h2 id=&#34;release-theme-and-logo&#34;&gt;发布主题与徽标  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#release-theme-and-logo&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Figure src=&#34;k8s-v1.36.svg&#34; alt=&#34;Kubernetes v1.36 Haru logo: a hex badge with the title Haru in flowing script beneath v1.36; Mount Fuji rises on the right, its peak lit red with streaks of pale snow, the Japanese calligraphy 晴れに翔け brushed down its slope; a white Kubernetes helm floats in the blue sky to the left among stylised clouds in the ukiyo-e manner; in the foreground stand two cats as paired guardians, a grey-and-white cat on the left and a ginger tabby on the right, each wearing a collar with a small blue Kubernetes helm charm&#34; class=&#34;release-logo&#34;
--&gt;


&lt;figure class=&#34;release-logo &#34;&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/04/22/kubernetes-v1-36-release/k8s-v1.36.svg&#34;
         alt=&#34;Kubernetes v1.36 Haru 徽标：一个六边形徽章，v1.36 下方以流畅字体写着 Haru；富士山耸立在右侧，山顶呈红色并有淡雪纹理，日文书法“晴れに翔け”沿山坡书写；左侧蓝天中漂浮着白色 Kubernetes 舵轮，周围是浮世绘风格的云；前景中有两只作为成对守护者的猫，左侧为灰白猫，右侧为姜黄色虎斑猫，各自戴着带有蓝色 Kubernetes 舵轮小饰物的项圈&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
We open 2026 with Kubernetes v1.36, a release that arrives as the season turns and the light shifts on the mountain. ハル (_Haru_) is a sound in Japanese that carries many meanings; among those we hold closest are 春 (spring), 晴れ (_hare_, clear skies), and 遥か (_haruka_, far-off, distant). A season, a sky, and a horizon. You will find all three in what follows.
--&gt;
&lt;p&gt;我们以 Kubernetes v1.36 开启 2026 年。
这个版本到来之时，季节更迭，山间光影流转。
ハル（&lt;strong&gt;Haru&lt;/strong&gt;）在日语中富含多重意象；
其中我们最贴近的含义包括：春（&lt;strong&gt;spring&lt;/strong&gt;）、晴れ（&lt;strong&gt;hare&lt;/strong&gt;，晴空）和遥か（&lt;strong&gt;haruka&lt;/strong&gt;，遥远）。
一个季节、一片天空和一条地平线。你将在接下来的内容中看到这三者。&lt;/p&gt;
&lt;!--
The logo, created by [avocadoneko / Natsuho Ide](https://x.com/avocadoneko), draws inspiration from [Katsushika Hokusai](https://en.wikipedia.org/wiki/Hokusai)&#39;s [_Thirty-six Views of Mount Fuji_](https://en.wikipedia.org/wiki/Thirty-six_Views_of_Mount_Fuji) (富嶽三十六景, _Fugaku Sanjūrokkei_), the same series that gave the world [_The Great Wave off Kanagawa_](https://en.wikipedia.org/wiki/The_Great_Wave_off_Kanagawa). Our v1.36 logo reimagines one of the series&#39; most celebrated prints, [_Fine Wind, Clear Morning_](https://en.wikipedia.org/wiki/Fine_Wind,_Clear_Morning) (凱風快晴, _Gaifū Kaisei_), also known as Red Fuji (赤富士, _Aka Fuji_): the mountain lit red in a summer dawn, bare of snow after the long thaw. Thirty-six views felt like a fitting number to sit with at v1.36, and a reminder that even Hokusai didn&#39;t stop there.&lt;sup&gt;1&lt;/sup&gt; Keeping watch over the scene is the Kubernetes helm, set into the sky alongside the mountain.
--&gt;
&lt;p&gt;该版本徽标由 &lt;a href=&#34;https://x.com/avocadoneko&#34;&gt;avocadoneko / Natsuho Ide&lt;/a&gt; 创作，
灵感来自&lt;a href=&#34;https://en.wikipedia.org/wiki/Hokusai&#34;&gt;葛饰北斋&lt;/a&gt;的
&lt;a href=&#34;https://en.wikipedia.org/wiki/Thirty-six_Views_of_Mount_Fuji&#34;&gt;《富嶽岳三十六景》&lt;/a&gt;
（富三十六景，&lt;strong&gt;Fugaku Sanjūrokkei&lt;/strong&gt;）。
这一系列也诞生了了&lt;a href=&#34;https://en.wikipedia.org/wiki/The_Great_Wave_off_Kanagawa&#34;&gt;&lt;strong&gt;神奈川冲浪里&lt;/strong&gt;&lt;/a&gt;这样的传世杰作。
我们的 v1.36 徽标重新诠释了这个系列中最著名的作品之一：
&lt;a href=&#34;https://en.wikipedia.org/wiki/Fine_Wind,_Clear_Morning&#34;&gt;《凯风快晴》&lt;/a&gt;
（凱風快晴，&lt;strong&gt;Gaifū Kaisei&lt;/strong&gt;），又名赤富士（&lt;strong&gt;Aka Fuji&lt;/strong&gt;）：
夏日黎明中被照亮成红色、经历漫长融雪后已不覆雪的山。
三十六景与 v1.36 相映成趣，也提醒我们即便是北斋也没有止步于此。&lt;sup&gt;1&lt;/sup&gt;
Kubernetes 舵轮守望着这一幕，与山一同融入天空。&lt;/p&gt;
&lt;!--
At the foot of Fuji sit Stella (left) and Nacho (right), two cats with the Kubernetes helm on their collars, standing in for the role of [_komainu_](https://en.wikipedia.org/wiki/Komainu), the paired lion-dog guardians that watch over Japanese shrines. Paired, because nothing is guarded alone. Stella and Nacho stand in for a very much larger set of paws: the SIGs and working groups, the maintainers and reviewers, the people behind docs, blogs, and translations, the release team, first-time contributors taking their first steps, and lifelong contributors returning season after season. Kubernetes v1.36 is, as always, held up by many hands.
--&gt;
&lt;p&gt;富士山脚下坐着 Stella（左）和 Nacho（右），
两只猫的项圈上带有 Kubernetes 舵轮，
象征着&lt;a href=&#34;https://en.wikipedia.org/wiki/Komainu&#34;&gt;&lt;strong&gt;狛犬&lt;/strong&gt;&lt;/a&gt;的角色：
守护日本神社的一对狮犬守护像。
它们成对出现，因为没有什么是独自守护的。
Stella 和 Nacho 代表着远比这两对爪子庞大得多的群体：
SIG 和工作组、维护者和评审者、文档、博客与翻译背后的人们、发布团队、
迈出第一步的首次贡献者，以及年复一年回归的长期贡献者。
一如既往，Kubernetes v1.36 由众多双手托举。&lt;/p&gt;
&lt;!--
Brushed across Red Fuji in the logo is the calligraphy 晴れに翔け (_hare ni kake_), &#34;soar into clear skies&#34;. It is the first half of a couplet that was too long to fit on the mountain:
--&gt;
&lt;p&gt;徽标中横跨赤富士的书法是“晴れに翔け”（&lt;strong&gt;hare ni kake&lt;/strong&gt;），
意为“翱翔于晴空”。
这是一个对句的前半句，完整对句太长，无法完全放在山上：&lt;/p&gt;
&lt;!--
&gt; **晴れに翔け、未来よ明け**\
&gt; _hare ni kake, asu yo ake_\
&gt; &#34;Soar into clear skies; toward tomorrow&#39;s sunrise.&#34;&lt;sup&gt;2&lt;/sup&gt;
--&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;晴れに翔け、未来よ明け&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;hare ni kake, asu yo ake&lt;/em&gt;&lt;br&gt;
“翱翔于晴空；迎向明日朝阳。”&lt;sup&gt;2&lt;/sup&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;!--
That is the wish we carry for this release: to soar into clear skies, for the release itself, for the project, and for everyone who ships it together. The dawn breaking over Red Fuji is not an ending but a passage: this release carries us to the next, and that one to the one after, on toward horizons far beyond what any single view can hold.
--&gt;
&lt;p&gt;这就是我们寄托于此版本的愿望：
让这个版本、这个项目，以及共同交付它的每个人，都能翱翔于晴空。
赤富士上破晓的晨光不是终点，而是一条通往未来的道路：
这个版本把我们带向下一个版本，而下一个版本又会通向再下一个版本，
一路迈向任何单一视角都无法穷尽的遥远地平线。&lt;/p&gt;
&lt;!--
&lt;sub&gt;1. The series was so popular that Hokusai added ten more prints, bringing the total to forty-six.&lt;/sub&gt;\
&lt;sub&gt;2. 未来 means &#34;the future&#34; in its widest sense, not just tomorrow but everything still to come. It is usually read _mirai_; here it takes the informal reading _asu_.&lt;/sub&gt;
--&gt;
&lt;p&gt;&lt;sub&gt;1. 这个系列非常受欢迎，北斋又增加了十幅版画，使总数达到四十六幅。&lt;/sub&gt;&lt;br&gt;
&lt;sub&gt;2. “未来”表示最宽泛意义上的“未来”，不只是明天，还包括一切尚未到来的事物。它通常读作 &lt;strong&gt;mirai&lt;/strong&gt;；这里采用非正式读法 &lt;strong&gt;asu&lt;/strong&gt;。&lt;/sub&gt;&lt;/p&gt;
&lt;!--
## Spotlight on key updates
--&gt;
&lt;h2 id=&#34;spotlight-on-key-updates&#34;&gt;重点更新速览  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#spotlight-on-key-updates&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes v1.36 is packed with new features and improvements. Here are a
few select updates the Release Team would like to highlight!
--&gt;
&lt;p&gt;Kubernetes v1.36 带来了大量新特性与改进。下面是发布团队希望重点介绍的几个更新！&lt;/p&gt;
&lt;!--
### Stable: Fine-grained API authorization
--&gt;
&lt;h3 id=&#34;stable-fine-grained-api-authorization&#34;&gt;稳定（GA）阶段：细粒度 API 鉴权  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#stable-fine-grained-api-authorization&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
On behalf of Kubernetes SIG Auth and SIG Node, we are pleased to announce the
graduation of fine-grained `kubelet` API authorization to General Availability
(GA) in Kubernetes v1.36!
--&gt;
&lt;p&gt;我们很高兴代表 Kubernetes SIG Auth 和 SIG Node 宣布：
细粒度 &lt;code&gt;kubelet&lt;/code&gt; API 鉴权在 Kubernetes v1.36 中进阶至正式发布（GA）！&lt;/p&gt;
&lt;!--
The `KubeletFineGrainedAuthz` feature gate was introduced as an opt-in alpha feature
in Kubernetes v1.32, then graduated to beta (enabled by default) in v1.33.
Now, the feature is generally available.
This feature enables more precise, least-privilege access control over the kubelet&#39;s
HTTPS API replacing the need to grant the overly broad nodes/proxy permission for
common monitoring and observability use cases.
--&gt;
&lt;p&gt;&lt;code&gt;KubeletFineGrainedAuthz&lt;/code&gt; 特性门控在 Kubernetes v1.32 中作为可选的 Alpha 特性引入，
随后在 v1.33 中进阶为 Beta（默认启用）。
现在，此特性已正式发布（GA）。
该特性针对 kubelet 的 HTTPS API 实现了更精确、符合最小权限原则的访问控制，
替代了在常见监控和可观测性用例中授予过于宽泛的 nodes/proxy 权限的需求。&lt;/p&gt;
&lt;!--
​​This work was done as a part of [KEP #2862](https://kep.k8s.io/2862) led by SIG Auth and SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/2862&#34;&gt;KEP #2862&lt;/a&gt; 的一部分，由 SIG Auth 和 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Beta: Resource health status
--&gt;
&lt;h3 id=&#34;beta-resource-health-status&#34;&gt;Beta：资源健康状态  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#beta-resource-health-status&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Before the v1.34 release, Kubernetes lacked a native way to report the health of allocated devices,
making it difficult to diagnose Pod crashes caused by hardware failures.
Building on the initial alpha release in v1.31 which focused on Device Plugins,
Kubernetes v1.36 expands this feature by promoting the `allocatedResourcesStatus`
field within the `.status` for each Pod (to beta). This field provides a unified health
reporting mechanism for all specialized hardware.
--&gt;
&lt;p&gt;在 v1.34 发布之前，Kubernetes 缺少一种原生方式来报告已分配设备的健康状况，
这使得诊断由硬件故障导致的 Pod 崩溃变得困难。
在 v1.31 中聚焦于设备插件的初始 Alpha 版本基础上，
Kubernetes v1.36 通过将每个 Pod 的 &lt;code&gt;.status&lt;/code&gt; 中的 &lt;code&gt;allocatedResourcesStatus&lt;/code&gt;
字段提升至 Beta，扩展了这一特性。
此字段为所有专用硬件提供统一的健康报告机制。&lt;/p&gt;
&lt;!--
Users can now run `kubectl describe pod` to determine if a container&#39;s crash loop is
due to an `Unhealthy` or `Unknown` device status, regardless of whether the hardware was
provisioned via traditional plugins or the newer DRA framework.
This enhanced visibility allows administrators and automated controllers to
quickly identify faulty hardware and streamline the recovery of high-performance workloads.
--&gt;
&lt;p&gt;用户现在可以运行 &lt;code&gt;kubectl describe pod&lt;/code&gt; 来判断容器的崩溃循环是否由
&lt;code&gt;Unhealthy&lt;/code&gt; 或 &lt;code&gt;Unknown&lt;/code&gt; 设备状态导致，无论相关硬件是通过传统插件还是较新的 DRA 框架制备。
这种增强的可见性使管理员和自动化控制器能够快速识别故障硬件，
并简化高性能工作负载的恢复流程。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4680](https://kep.k8s.io/4680) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4680&#34;&gt;KEP #4680&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Alpha: Workload Aware Scheduling (WAS) features
--&gt;
&lt;h3 id=&#34;alpha-workload-aware-scheduling-was-features&#34;&gt;Alpha：工作负载感知调度（WAS）特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#alpha-workload-aware-scheduling-was-features&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Previously, the Kubernetes scheduler and job controllers managed pods as independent units,
often leading to fragmented scheduling or resource waste for complex, distributed workloads.
Kubernetes v1.36 introduces a comprehensive suite of Workload Aware Scheduling (WAS) features in Alpha,
natively integrating the Job controller with a revised [Workload](/docs/concepts/workloads/workload-api/)
API and a new decoupled PodGroup API,
to treat related pods as a single logical entity.
--&gt;
&lt;p&gt;此前，Kubernetes 调度器和 Job 控制器将 Pod 作为独立单元进行管理，
这常常会导致复杂分布式工作负载出现碎片化调度或资源浪费。
Kubernetes v1.36 引入了一整套 Alpha 阶段的工作负载感知调度（Workload-Aware Scheduling，WAS）特性，
将 Job 控制器与修订后的 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/workload-api/&#34;&gt;Workload&lt;/a&gt;
API 以及新的解耦 PodGroup API 原生集成，
从而把相关 Pod 作为单个逻辑实体处理。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 already supported [gang scheduling](/docs/concepts/scheduling-eviction/gang-scheduling/) by requiring
a minimum number of pods to be schedulable before any were bound to nodes.
v1.36 goes further with a new PodGroup scheduling cycle that evaluates the entire group atomically,
either all pods in the group are bound together, or none are.
--&gt;
&lt;p&gt;Kubernetes v1.35 已经支持&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/gang-scheduling/&#34;&gt;编组调度&lt;/a&gt;：
它要求在任何 Pod 绑定到节点之前，至少有指定数量的 Pod 可被调度。
v1.36 更进一步，引入新的 PodGroup 调度周期，以原子方式评估整个组：
组内所有 Pod 要么一起绑定，要么一个都不绑定。&lt;/p&gt;
&lt;!--
This work was done across several KEPs (including [#4671](https://kep.k8s.io/4671), [#5547](https://kep.k8s.io/5547), [#5832](https://kep.k8s.io/5832), [#5732](https://kep.k8s.io/5732), and [#5710](https://kep.k8s.io/5710)) led by SIG Scheduling and SIG Apps.
--&gt;
&lt;p&gt;此项工作跨越多个 KEP（包括 &lt;a href=&#34;https://kep.k8s.io/4671&#34;&gt;#4671&lt;/a&gt;、&lt;a href=&#34;https://kep.k8s.io/5547&#34;&gt;#5547&lt;/a&gt;、
&lt;a href=&#34;https://kep.k8s.io/5832&#34;&gt;#5832&lt;/a&gt;、&lt;a href=&#34;https://kep.k8s.io/5732&#34;&gt;#5732&lt;/a&gt; 和 &lt;a href=&#34;https://kep.k8s.io/5710&#34;&gt;#5710&lt;/a&gt;），
由 SIG Scheduling 和 SIG Apps 牵头完成。&lt;/p&gt;
&lt;!--
## Features graduating to Stable
--&gt;
&lt;h2 id=&#34;features-graduating-to-stable&#34;&gt;进阶至稳定阶段的特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#features-graduating-to-stable&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
_This is a selection of some of the improvements that are now stable following the v1.36 release._
--&gt;
&lt;p&gt;&lt;strong&gt;以下列出 v1.36 发布后进入稳定（GA）阶段的一些改进。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
### Volume group snapshots
--&gt;
&lt;h3 id=&#34;volume-group-snapshots&#34;&gt;卷组快照  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#volume-group-snapshots&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
After several cycles in beta, VolumeGroupSnapshot support reaches General Availability (GA) in Kubernetes v1.36.
This feature allows you to take crash-consistent snapshots across multiple PersistentVolumeClaims simultaneously.
The support for volume group snapshots relies on a set of [extension APIs for group snapshots](https://kubernetes-csi.github.io/docs/group-snapshot-restore-feature.html#volume-group-snapshot-apis).
These APIs allow users to take crash consistent snapshots for a set of volumes.
A key aim is to allow you to restore that set of snapshots to new volumes and recover your workload based on
a crash consistent recovery point.
--&gt;
&lt;p&gt;经过数个 Beta 周期后，VolumeGroupSnapshot 支持在 Kubernetes v1.36 中达到正式发布（GA）。
此特性允许你同时为多个 PersistentVolumeClaim 创建崩溃一致性快照。
卷组快照支持依赖一组用于组快照的&lt;a href=&#34;https://kubernetes-csi.github.io/docs/group-snapshot-restore-feature.html#volume-group-snapshot-apis&#34;&gt;扩展 API&lt;/a&gt;。
这些 API 允许用户为一组卷创建崩溃一致性快照。
一个关键目标是允许你将这组快照恢复到新卷，
并基于某个崩溃一致性恢复点恢复工作负载。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #3476](https://kep.k8s.io/3476) led by SIG Storage.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/3476&#34;&gt;KEP #3476&lt;/a&gt; 的一部分，由 SIG Storage 牵头完成。&lt;/p&gt;
&lt;!--
### Mutable volume attach limits
--&gt;
&lt;h3 id=&#34;mutable-volume-attach-limits&#34;&gt;可变卷挂载限制  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#mutable-volume-attach-limits&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.36, the _mutable `CSINode` allocatable_ feature graduates to stable.
This enhancement allows [Container Storage Interface (CSI)](https://kubernetes-csi.github.io/docs/introduction.html) drivers to
dynamically update the reported maximum number of volumes that a node can handle.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，&lt;strong&gt;可变 &lt;code&gt;CSINode&lt;/code&gt; 可分配数量&lt;/strong&gt;特性进阶至稳定（GA）阶段。
这一增强允许&lt;a href=&#34;https://kubernetes-csi.github.io/docs/introduction.html&#34;&gt;容器存储接口（CSI）&lt;/a&gt;驱动
动态更新所报告的某个节点可处理的最大卷数量。&lt;/p&gt;
&lt;!--
With this update, the `kubelet` can dynamically update a node&#39;s volume limits and capacity information.
The `kubelet` adjusts these limits based on periodic checks or in response to
resource exhaustion errors from the CSI driver, without requiring a component restart.
This ensures the Kubernetes scheduler maintains an accurate view of storage availability,
preventing pod scheduling failures caused by outdated volume limits.
--&gt;
&lt;p&gt;通过这项更新，&lt;code&gt;kubelet&lt;/code&gt; 可以动态更新节点的卷限制和容量信息。
&lt;code&gt;kubelet&lt;/code&gt; 会基于周期性检查，或响应来自 CSI 驱动的资源耗尽错误来调整这些限制，
且无需重启组件。
这确保 Kubernetes 调度器能保持对存储可用性的准确视图，
避免因过期的卷限制导致 Pod 调度失败。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4876](https://kep.k8s.io/4876) led by SIG Storage.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4876&#34;&gt;KEP #4876&lt;/a&gt; 的一部分，由 SIG Storage 牵头完成。&lt;/p&gt;
&lt;!--
### API for external signing of ServiceAccount tokens {#api-for-external-signing-of-service-account-tokens}
--&gt;
&lt;h3 id=&#34;api-for-external-signing-of-service-account-tokens&#34;&gt;ServiceAccount 令牌外部签名 API  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#api-for-external-signing-of-service-account-tokens&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.36, the _external ServiceAccount token signer_ feature for service accounts graduates to stable,
making it possible to offload token signing to an external system while still integrating cleanly with the Kubernetes API.
Clusters can now rely on an external JWT signer for issuing projected service account tokens that
follow the standard service account token format, including support for extended expiration when needed.
This is especially useful for clusters that already rely on external identity or key management systems,
allowing Kubernetes to integrate without duplicating key management inside the control plane.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，面向 ServiceAccount 的&lt;strong&gt;外部 ServiceAccount 令牌签名器&lt;/strong&gt;特性进阶至稳定（GA）阶段，
使集群可以将令牌签名卸载到外部系统，同时仍能与 Kubernetes API 清晰集成。
集群现在可以依赖外部 JWT 签名器签发投射的服务账户令牌，
这些令牌遵循标准的服务账户令牌格式，并在需要时支持延长过期时间。
这对已经依赖外部身份或密钥管理系统的集群尤其有用，
因为 Kubernetes 可以与其集成，而不必在控制平面内重复管理密钥。&lt;/p&gt;
&lt;!--
The kube-apiserver is wired to discover public keys from the external signer,
cache them, and validate tokens it did not sign itself,
so existing authentication and authorization flows continue to work as expected.
Over the alpha and beta phases, the API and configuration for the external signer plugin,
path validation, and OIDC discovery were hardened to handle real-world deployments and rotation patterns safely.
--&gt;
&lt;p&gt;kube-apiserver 已被连接到外部签名器，以发现并缓存其公钥，
并验证并非由 kube-apiserver 自身签发的令牌，
因此现有身份认证与鉴权流程会继续按预期工作。
在 Alpha 和 Beta 阶段，外部签名器插件的 API 与配置、路径验证以及 OIDC 发现
都经过了加固，以便安全处理真实部署和轮换模式。&lt;/p&gt;
&lt;!--
With GA in v1.36, external ServiceAccount token signing is now a fully supported option for platforms that
centralize identity and signing, simplifying integration with external IAM systems and
reducing the need to manage signing keys directly inside the control plane.
--&gt;
&lt;p&gt;随着 v1.36 中进入 GA，外部 ServiceAccount 令牌签名现在成为一种完全受支持的选项，
可供集中管理身份和签名的平台使用，
简化与外部 IAM 系统的集成，并减少在控制平面内直接管理签名密钥的需求。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #740](https://kep.k8s.io/740) led by SIG Auth.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/740&#34;&gt;KEP #740&lt;/a&gt; 的一部分，由 SIG Auth 牵头完成。&lt;/p&gt;
&lt;!--
### DRA features graduating to Stable
--&gt;
&lt;h3 id=&#34;dra-features-graduating-to-stable&#34;&gt;进阶至稳定阶段的 DRA 特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#dra-features-graduating-to-stable&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Part of the Dynamic Resource Allocation (DRA) ecosystem reaches full production maturity in
Kubernetes v1.36 as key governance and selection features graduate to Stable.
The transition of _DRA admin access_ to GA provides a permanent, secure framework for cluster administrators
to access and manage hardware resources globally, while the stabilization of _prioritized lists_ ensures that
resource selection logic remains consistent and predictable across all cluster environments.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，随着关键治理和选择特性进阶至稳定（GA）阶段，
动态资源分配（DRA）生态的一部分已经达到完整的生产成熟度。
&lt;strong&gt;DRA 管理员访问&lt;/strong&gt;进阶至 GA，
为集群管理员全局访问和管理硬件资源提供了永久且安全的框架；
同时，&lt;strong&gt;优先级列表&lt;/strong&gt;的稳定化确保资源选择逻辑在所有集群环境中保持一致且可预测。&lt;/p&gt;
&lt;!--
Now, organizations can confidently deploy mission-critical hardware automation with the guarantee
of long-term API stability and backward compatibility. These features empower users to implement
sophisticated resource-sharing policies and administrative overrides that are essential for
large-scale GPU clusters and multi-tenant AI platforms, marking the completion of the
core architectural foundation for next-generation resource management.
--&gt;
&lt;p&gt;现在，组织可以在长期 API 稳定性和向后兼容性的保障下，
放心部署任务关键型硬件自动化。
这些特性使用户能够实现复杂的资源共享策略和管理性覆盖，
而这些能力对大规模 GPU 集群和多租户 AI 平台至关重要；
这也标志着下一代资源管理的核心架构基础已经完成。&lt;/p&gt;
&lt;!--
This work was done as part of KEPs [#5018](https://kep.k8s.io/5018) and [#4816](https://kep.k8s.io/4816) led by SIG Auth and SIG Scheduling.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5018&#34;&gt;KEP #5018&lt;/a&gt; 和 &lt;a href=&#34;https://kep.k8s.io/4816&#34;&gt;KEP #4816&lt;/a&gt;
的一部分，由 SIG Auth 和 SIG Scheduling 牵头完成。&lt;/p&gt;
&lt;!--
### Mutating admission policies
--&gt;
&lt;h3 id=&#34;mutating-admission-policies&#34;&gt;变更性准入策略  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#mutating-admission-policies&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Declarative cluster management reaches a new level of sophistication in Kubernetes v1.36 with the
graduation of [MutatingAdmissionPolicies](/docs/reference/access-authn-authz/mutating-admission-policy/) to Stable. This milestone provides a native,
high-performance alternative to traditional webhooks by allowing administrators to
define resource mutations directly in the API server using the Common Expression Language (CEL),
fully replacing the need for external infrastructure for many common use cases.
--&gt;
&lt;p&gt;随着 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/access-authn-authz/mutating-admission-policy/&#34;&gt;MutatingAdmissionPolicy（变更准入策略）&lt;/a&gt;
在 Kubernetes v1.36 中进阶至稳定（GA），声明式集群管理的成熟度达到新高度。
这一里程碑为传统 Webhook 提供了原生、高性能的替代方案：
管理员可以使用通用表达式语言（CEL）直接在 API 服务器中定义资源变更，
在许多常见用例中完全替代对外部基础设施的需求。&lt;/p&gt;
&lt;!--
Now, cluster operators can modify incoming requests without the latency and operational
complexity associated with managing custom admission webhooks.
By moving mutation logic into a declarative, versioned policy, organizations can achieve
more predictable cluster behavior, reduced network overhead,
and a hardened security model with the full guarantee of long-term API stability.
--&gt;
&lt;p&gt;现在，集群操作人员可以修改传入请求，
而无需承担管理自定义准入 Webhook 所带来的延迟和运维复杂性。
通过将变更逻辑迁移到声明式、版本化的策略中，
组织可以获得更可预测的集群行为、更低的网络开销，
以及在长期 API 稳定性完整保障下的强化安全模型。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #3962](https://kep.k8s.io/3962) led by SIG API Machinery.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/3962&#34;&gt;KEP #3962&lt;/a&gt; 的一部分，由 SIG API Machinery 牵头完成。&lt;/p&gt;
&lt;!--
### Declarative validation of Kubernetes native types with `validation-gen` {#declarative-validation-of-kubernetes-native-types-with-validation-gen}
--&gt;
&lt;h3 id=&#34;declarative-validation-of-kubernetes-native-types-with-validation-gen&#34;&gt;使用 &lt;code&gt;validation-gen&lt;/code&gt; 对 Kubernetes 原生类型进行声明式验证  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#declarative-validation-of-kubernetes-native-types-with-validation-gen&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The development of custom resources reaches a new level of efficiency in Kubernetes v1.36
as _declarative validation_ (with `validation-gen`) graduates to Stable.
This milestone replaces the manual and often error-prone task of writing complex
OpenAPI schemas by allowing developers to define sophisticated validation logic directly
within Go struct tags using the Common Expression Language (CEL).
--&gt;
&lt;p&gt;随着&lt;strong&gt;声明式验证&lt;/strong&gt;（使用 &lt;code&gt;validation-gen&lt;/code&gt;）在 Kubernetes v1.36 中进阶至稳定（GA），
自定义资源的开发效率达到新水平。
这一里程碑允许开发者使用通用表达式语言（CEL），
直接在 Go 结构体标签中定义复杂验证逻辑，
从而替代手动编写复杂 OpenAPI 模式这一通常容易出错的任务。&lt;/p&gt;
&lt;!--
Instead of writing custom validation functions, Kubernetes contributors can now define validation
rules using IDL marker comments (such as `+k8s:minimum` or `+k8s:enum`) directly
within the API type definitions (`types.go`). The `validation-gen` tool parses these
comments to automatically generate robust API validation code at compile-time.
This reduces maintenance overhead and ensures that API validation
remains consistent and synchronized with the source code.
--&gt;
&lt;p&gt;现在，Kubernetes 贡献者无需编写自定义验证函数，
而是可以直接在 API 类型定义（&lt;code&gt;types.go&lt;/code&gt;）中使用 IDL 标记注释
（例如 &lt;code&gt;+k8s:minimum&lt;/code&gt; 或 &lt;code&gt;+k8s:enum&lt;/code&gt;）定义验证规则。
&lt;code&gt;validation-gen&lt;/code&gt; 工具会解析这些注释，并在编译时自动生成稳健的 API 验证代码。
这降低了维护开销，并确保 API 验证与源代码保持一致和同步。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5073](https://kep.k8s.io/5073) led by SIG API Machinery.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5073&#34;&gt;KEP #5073&lt;/a&gt; 的一部分，由 SIG API Machinery 牵头完成。&lt;/p&gt;
&lt;!--
### Removal of gogo protobuf dependency for Kubernetes API types {#remove-gogo-protobuf-dependency-for-kubernetes-api-types}
--&gt;
&lt;h3 id=&#34;remove-gogo-protobuf-dependency-for-kubernetes-api-types&#34;&gt;移除 Kubernetes API 类型对 gogo protobuf 的依赖  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#remove-gogo-protobuf-dependency-for-kubernetes-api-types&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Security and long-term maintainability for the Kubernetes codebase take a major step forward
in Kubernetes v1.36 with the completion of the `gogoprotobuf` removal.
This initiative has eliminated a significant dependency on the unmaintained `gogoprotobuf` library,
which had become a source of potential security vulnerabilities and
a blocker for adopting modern Go language features.
--&gt;
&lt;p&gt;随着 &lt;code&gt;gogoprotobuf&lt;/code&gt; 移除工作的完成，
Kubernetes 代码库的安全性和长期可维护性在 Kubernetes v1.36 中迈出重要一步。
这项工作消除了对无人维护的 &lt;code&gt;gogoprotobuf&lt;/code&gt; 库的重要依赖；
该库已经成为潜在安全漏洞的来源，也阻碍了现代 Go 语言特性的采用。&lt;/p&gt;
&lt;!--
Instead of migrating to standard Protobuf generation, which presented compatibility risks
for Kubernetes API types, the project opted to fork and internalize the required
generation logic within `k8s.io/code-generator`. This approach successfully eliminates
the unmaintained runtime dependencies from the Kubernetes dependency graph
while preserving existing API behavior and serialization compatibility.
For consumers of Kubernetes API Go types, this change reduces technical debt and
prevents accidental misuse with standard protobuf libraries.
--&gt;
&lt;p&gt;项目没有迁移到标准 Protobuf 生成方式，因为这会给 Kubernetes API 类型带来兼容性风险；
相反，项目选择对所需的生成逻辑进行 fork，并将其内置到 &lt;code&gt;k8s.io/code-generator&lt;/code&gt; 中。
这种方式在保留现有 API 行为和序列化兼容性的同时，
成功从 Kubernetes 依赖图中消除了无人维护的运行时依赖。
对于 Kubernetes API Go 类型的使用者而言，
这一变更降低了技术债，并避免了与标准 protobuf 库的意外误用。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5589](https://kep.k8s.io/5589) led by SIG API Machinery.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5589&#34;&gt;KEP #5589&lt;/a&gt; 的一部分，由 SIG API Machinery 牵头完成。&lt;/p&gt;
&lt;!--
### Node log query
--&gt;
&lt;h3 id=&#34;node-log-query&#34;&gt;节点日志查询  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#node-log-query&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Previously, Kubernetes required cluster administrators to log into nodes via SSH or implement a
client-side reader for debugging issues pertaining to control-plane or worker nodes.
While certain issues still require direct node access, issues with the kube-proxy or kubelet
can be diagnosed by inspecting their logs. Node logs offer cluster administrators
a method to view these logs using the kubelet API and kubectl plugin
to simplify troubleshooting without logging into nodes, similar to debugging issues
related to a pod or container. This method is operating system agnostic and
requires the services or nodes to log to `/var/log`.
--&gt;
&lt;p&gt;过去，Kubernetes 要求集群管理员通过 SSH 登录节点，
或实现客户端读取器，以调试与控制平面节点或工作节点相关的问题。
虽然某些问题仍然需要直接访问节点，
但与 kube-proxy 或 kubelet 有关的问题可以通过检查其日志来诊断。
节点日志为集群管理员提供了一种方法：
使用 kubelet API 和 kubectl 插件查看这些日志，
从而简化故障排查，无需登录节点；
这类似于调试与 Pod 或容器相关的问题。
这种方法与操作系统无关，并要求服务或节点将日志写入 &lt;code&gt;/var/log&lt;/code&gt;。&lt;/p&gt;
&lt;!--
As this feature reaches GA in Kubernetes 1.36 after thorough performance validation on production workloads,
it is enabled by default on the kubelet through the `NodeLogQuery` feature gate.
In addition, the `enableSystemLogQuery` kubelet configuration option must also be enabled.
--&gt;
&lt;p&gt;此特性在生产工作负载上经过充分性能验证后，于 Kubernetes 1.36 中达到 GA。
它通过 &lt;code&gt;NodeLogQuery&lt;/code&gt; 特性门控在 kubelet 上默认启用。
此外，还必须启用 &lt;code&gt;enableSystemLogQuery&lt;/code&gt; kubelet 配置选项。&lt;/p&gt;
&lt;!--
This work was done as a part of [KEP #2258](https://kep.k8s.io/2258) led by SIG Windows.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/2258&#34;&gt;KEP #2258&lt;/a&gt; 的一部分，由 SIG Windows 牵头完成。&lt;/p&gt;
&lt;!--
### Support User Namespaces in pods
--&gt;
&lt;h3 id=&#34;support-user-namespaces-in-pods&#34;&gt;支持 Pod 中的用户命名空间  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#support-user-namespaces-in-pods&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Container isolation and node security reach a major maturity milestone in Kubernetes v1.36 as
support for User Namespaces graduates to Stable.
This long-awaited feature provides a critical layer of defense-in-depth by allowing the
mapping of a container&#39;s root user to a non-privileged user on the host,
ensuring that even if a process escapes the container,
it possesses no administrative power over the underlying node.
--&gt;
&lt;p&gt;随着对用户命名空间的支持进阶至稳定（GA），
容器隔离与节点安全在 Kubernetes v1.36 中达到重要成熟度里程碑。
这一期待已久的特性允许将容器的 root 用户映射到主机上的非特权用户，
从而提供关键的纵深防御层：
即使某个进程逃逸出容器，它也不会对底层节点拥有管理权限。&lt;/p&gt;
&lt;!--
Now, cluster operators can confidently enable this hardened isolation for production
workloads to mitigate the impact of container breakout vulnerabilities.
By decoupling the container&#39;s internal identity from the host&#39;s identity,
Kubernetes provides a robust, standardized mechanism to protect multi-tenant
environments and sensitive infrastructure from unauthorized access,
all with the full guarantee of long-term API stability.
--&gt;
&lt;p&gt;现在，集群操作人员可以放心地为生产工作负载启用这种加固隔离，
以缓解容器逃逸漏洞的影响。
通过将容器内部身份与主机身份解耦，
Kubernetes 提供了一种稳健、标准化的机制，
在长期 API 稳定性的完整保障下，保护多租户环境和敏感基础设施免受未授权访问。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #127](https://kep.k8s.io/127) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/127&#34;&gt;KEP #127&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Support PSI based on cgroupv2
--&gt;
&lt;h3 id=&#34;support-psi-based-on-cgroupv2&#34;&gt;支持基于 cgroup v2 的 PSI  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#support-psi-based-on-cgroupv2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Node resource management and observability become more precise in Kubernetes v1.36
as the export of Pressure Stall Information (PSI) metrics graduates to Stable.
This feature provides the kubelet with the ability to report &#34;pressure&#34; metrics for CPU,
memory, and I/O, offering a more granular view of resource contention than
traditional utilization metrics.
--&gt;
&lt;p&gt;随着压力停滞信息（PSI）指标导出进阶至稳定（GA），
节点资源管理和可观测性在 Kubernetes v1.36 中变得更加精确。
此特性使 kubelet 能够报告 CPU、内存和 I/O 的“压力”指标，
相比传统利用率指标，它提供了关于资源竞争的更细粒度视图。&lt;/p&gt;
&lt;!--
Cluster operators and autoscalers can use these metrics to distinguish between a system that is
simply busy and one that is actively stalling due to resource exhaustion.
By leveraging these signals, users can more accurately tune pod resource requests,
improve the reliability of vertical autoscaling, and detect noisy neighbor
effects before they lead to application performance degradation or node instability.
--&gt;
&lt;p&gt;集群操作人员和自动伸缩器可以使用这些指标区分两类系统：
一种只是繁忙，另一种则因资源耗尽而出现停滞。
借助这些信号，用户可以更准确地调整 Pod 资源请求，
提升垂直自动伸缩的可靠性，
并在“吵闹邻居”效应导致应用性能下降或节点不稳定之前发现它们。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4205](https://kep.k8s.io/4205) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4205&#34;&gt;KEP #4205&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Volume source: OCI artifact and/or image {#volumesource-oci-artifact-and-or-image}
--&gt;
&lt;h3 id=&#34;volumesource-oci-artifact-and-or-image&#34;&gt;VolumeSource：OCI 制品和/或镜像  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#volumesource-oci-artifact-and-or-image&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The distribution of container data becomes more flexible in Kubernetes v1.36 as _OCI volume source_ support graduates to Stable.
This feature moves beyond the traditional requirement of mounting volumes from external storage providers
or config maps by allowing the kubelet to pull and mount content directly from any OCI-compliant registry,
such as a container image or an artifact repository.
--&gt;
&lt;p&gt;随着 &lt;strong&gt;OCI 卷源&lt;/strong&gt;支持进阶至稳定（GA），
容器数据分发在 Kubernetes v1.36 中变得更加灵活。
此特性允许 kubelet 直接从任何符合 OCI 标准的仓库拉取和挂载内容，
例如容器镜像或制品仓库，
从而突破了从外部存储提供商或 ConfigMap 挂载卷这一传统要求。&lt;/p&gt;
&lt;!--
Now, developers and platform engineers can package application data, models, or static assets as OCI artifacts
and deliver them to pods using the same registries and versioning workflows they already use for container images.
This convergence of image and volume management simplifies CI/CD pipelines,
reduces dependency on specialized storage backends for read-only content,
and ensures that data remains portable and securely accessible across any environment.
--&gt;
&lt;p&gt;现在，开发者和平台工程师可以将应用数据、模型或静态资产打包为 OCI 制品，
并使用他们已经用于容器镜像的同一套仓库和版本控制工作流将其交付给 Pod。
镜像与卷管理的这种融合简化了 CI/CD 流水线，
减少了只读内容对专用存储后端的依赖，
并确保数据在任何环境中都保持可移植且可安全访问。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4639](https://kep.k8s.io/4639) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4639&#34;&gt;KEP #4639&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
## New features in Beta
--&gt;
&lt;h2 id=&#34;new-features-in-beta&#34;&gt;Beta 阶段的新特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#new-features-in-beta&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
_This is a selection of some of the improvements that are now beta following the v1.36 release._
--&gt;
&lt;p&gt;&lt;strong&gt;以下列出 v1.36 发布后进入 Beta 阶段的一些改进。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
### Staleness mitigation for controllers
--&gt;
&lt;h3 id=&#34;staleness-mitigation-for-controllers&#34;&gt;缓解控制器陈旧状态  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#staleness-mitigation-for-controllers&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Staleness in Kubernetes controllers is a problem that affects many controllers and can subtly affect controller behavior.
It is usually not until it is too late, when a controller in production has already taken incorrect action,
that staleness is found to be an issue due to some underlying assumption made by the controller author.
This could lead to conflicting updates or data corruption upon controller reconciliation during times of cache staleness.
--&gt;
&lt;p&gt;Kubernetes 控制器中的陈旧状态是一个会影响许多控制器的问题，
并可能以细微方式影响控制器行为。
通常要等到为时已晚，即生产环境中的控制器已经采取了错误操作之后，
人们才会发现，由控制器作者某些底层假设导致的陈旧状态已经成为问题。
这可能会在缓存陈旧期间进行控制器调谐时导致冲突更新或数据损坏。&lt;/p&gt;
&lt;!--
We are excited to announce that Kubernetes v1.36 includes new features that help mitigate controller staleness and
provide better observability of controller behavior.
This prevents reconciliation based on an outdated view of cluster state that can often lead to harmful behavior.
--&gt;
&lt;p&gt;我们很高兴地宣布，Kubernetes v1.36 包含一些新特性，
有助于缓解控制器陈旧状态，并为控制器行为提供更好的可观测性。
这可以防止基于过时的集群状态视图执行调谐，
而这种调谐往往会导致有害行为。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5647](https://kep.k8s.io/5647) led by SIG API Machinery.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5647&#34;&gt;KEP #5647&lt;/a&gt; 的一部分，由 SIG API Machinery 牵头完成。&lt;/p&gt;
&lt;!--
### IP/CIDR validation improvements
--&gt;
&lt;h3 id=&#34;ipcidr-validation-improvements&#34;&gt;IP/CIDR 验证改进  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ipcidr-validation-improvements&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.36, the `StrictIPCIDRValidation` feature for API IP and CIDR fields graduates to beta,
tightening validation to catch malformed addresses and prefixes that previously slipped through.
This helps prevent subtle configuration bugs where Services, Pods, NetworkPolicies,
or other resources reference invalid IPs, which could otherwise lead to
confusing runtime behavior or security surprises.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，面向 API IP 和 CIDR 字段的 &lt;code&gt;StrictIPCIDRValidation&lt;/code&gt;
特性进阶至 Beta，收紧验证以捕获此前可能漏过的格式错误地址和前缀。
这有助于防止 Service、Pod、NetworkPolicy 或其他资源引用无效 IP 时产生隐蔽配置缺陷；
否则这些缺陷可能导致令人困惑的运行时行为或安全意外。&lt;/p&gt;
&lt;!--
Controllers are updated to canonicalize IPs they write back into objects and to warn when they
encounter bad values that were already stored, so clusters can gradually converge on clean,
consistent data. With beta, `StrictIPCIDRValidation` is ready for wider use,
giving operators more reliable guardrails around IP-related configuration
as they evolve networks and policies over time.
--&gt;
&lt;p&gt;控制器已经更新，会对写回对象的 IP 进行规范化，
并在遇到已经存储的错误值时发出警告，
因此集群可以逐步收敛到干净、一致的数据。
进入 Beta 后，&lt;code&gt;StrictIPCIDRValidation&lt;/code&gt; 已准备好进行更广泛的使用，
随着网络与策略不断演进，它可为操作人员提供更可靠的 IP 相关配置防护。&lt;/p&gt;
&lt;!--
This work was done as a part of [KEP #4858](https://kep.k8s.io/4858) led by SIG Network.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4858&#34;&gt;KEP #4858&lt;/a&gt; 的一部分，由 SIG Network 牵头完成。&lt;/p&gt;
&lt;!--
### Separate kubectl user preferences from cluster configs
--&gt;
&lt;h3 id=&#34;separate-kubectl-user-preferences-from-cluster-configs&#34;&gt;将 kubectl 用户偏好与集群配置分离  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#separate-kubectl-user-preferences-from-cluster-configs&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The `.kuberc` feature for customizing `kubectl` user preferences continues to be beta
and is enabled by default. The `~/.kube/kuberc` file allows users to store aliases, default flags,
and other personal settings separately from `kubeconfig` files, which hold cluster endpoints and credentials.
This separation prevents personal preferences from interfering with CI pipelines or shared `kubeconfig` files,
while maintaining a consistent `kubectl` experience across different clusters and contexts.
--&gt;
&lt;p&gt;用于自定义 &lt;code&gt;kubectl&lt;/code&gt; 用户偏好的 &lt;code&gt;.kuberc&lt;/code&gt; 特性继续处于 Beta 阶段，并默认启用。
&lt;code&gt;~/.kube/kuberc&lt;/code&gt; 文件允许用户将别名、默认命令行参数和其他个人设置
与保存集群端点和凭据的 &lt;code&gt;kubeconfig&lt;/code&gt; 文件分开存放。
这种分离可以防止个人偏好干扰 CI 流水线或共享的 &lt;code&gt;kubeconfig&lt;/code&gt; 文件，
同时在不同集群和上下文中保持一致的 &lt;code&gt;kubectl&lt;/code&gt; 体验。&lt;/p&gt;
&lt;!--
In Kubernetes v1.36, `.kuberc` was expanded with the ability to define policies for credential plugins
(allowlists or denylists) to enforce safer authentication practicies.
Users can disable this functionality if needed by setting the `KUBECTL_KUBERC=false` or `KUBERC=off` environment variables.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，&lt;code&gt;.kuberc&lt;/code&gt; 得到扩展，
能够为凭据插件定义策略（允许列表或拒绝列表），以强制实施更安全的身份认证实践。
如有需要，用户可以通过设置 &lt;code&gt;KUBECTL_KUBERC=false&lt;/code&gt; 或 &lt;code&gt;KUBERC=off&lt;/code&gt; 环境变量来禁用此功能。&lt;/p&gt;
&lt;!--
This work was done as a part of [KEP #3104](https://kep.k8s.io/3104) led by SIG CLI, with the help from SIG Auth.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/3104&#34;&gt;KEP #3104&lt;/a&gt; 的一部分，
由 SIG CLI 牵头，并得到了 SIG Auth 的帮助。&lt;/p&gt;
&lt;!--
### Mutable container resources when Job is suspended
--&gt;
&lt;h3 id=&#34;mutable-container-resources-when-job-is-suspended&#34;&gt;Job 挂起时可变更的容器资源  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#mutable-container-resources-when-job-is-suspended&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.36, the `MutablePodResourcesForSuspendedJobs` feature graduates to beta and is enabled by default.
This update This update relaxes Job validation to allow updates to container CPU, memory,
GPU, and extended resource requests and limits while a Job is suspended.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，&lt;code&gt;MutablePodResourcesForSuspendedJobs&lt;/code&gt; 特性进阶至 Beta 并默认启用。
这项更新放宽了 Job 验证，允许在 Job 挂起期间更新容器的 CPU、内存、
GPU 以及扩展资源的请求和限制。&lt;/p&gt;
&lt;!--
This capability allows queue controllers and operators to adjust batch workload requirements based on
real‑time cluster conditions. For example, a queueing system can suspend incoming Jobs,
adjust their resource requirements to match available capacity or quota, and then unsuspend them.
The feature strictly limits mutability to suspended Jobs (or Jobs whose pods have been terminated upon suspension)
to prevent disruptive changes to actively running pods.
--&gt;
&lt;p&gt;这一能力允许队列控制器和操作人员根据实时集群状况调整批处理工作负载需求。
例如，排队系统可以挂起传入的 Job，
调整其资源需求以匹配可用容量或配额，然后取消挂起。
此特性严格将可变性限制在已挂起的 Job
（或其 Pod 已在挂起时终止的 Job）上，
以防止对正在运行的 Pod 造成破坏性变更。&lt;/p&gt;
&lt;!--
This work was done as a part of [KEP #5440](https://kep.k8s.io/5440) led by SIG Apps.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5440&#34;&gt;KEP #5440&lt;/a&gt; 的一部分，由 SIG Apps 牵头完成。&lt;/p&gt;
&lt;!--
### Constrained impersonation
--&gt;
&lt;h3 id=&#34;constrained-impersonation&#34;&gt;受限的身份扮演（Impersonation） &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#constrained-impersonation&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.36, the `ConstrainedImpersonation` feature for user impersonation graduates to beta,
tightening a historically all‑or‑nothing mechanism into something that can actually follow least‑privilege principles.
When this feature is enabled, an impersonator must have two distinct sets of permissions:
one to impersonate a given identity, and another to perform specific actions on that identity’s behalf.
This prevents support tools, controllers, or node agents from using impersonation to gain broader access
than they themselves are allowed, even if their impersonation RBAC is misconfigured.
Existing impersonate rules keep working, but the API server prefers the new constrained checks first,
making the transition incremental instead of a flag day. With beta in v1.36, `ConstrainedImpersonation` is tested,
documented, and ready for wider adoption by platform teams that rely on impersonation for debugging, proxying,
or node‑level controllers.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，用于用户身份扮演的 &lt;code&gt;ConstrainedImpersonation&lt;/code&gt;
特性进阶至 Beta，将历史上“全有或全无”的机制收紧为真正能够遵循最小权限原则的机制。
启用此特性时，身份扮演者必须拥有两组不同的权限：
一组用于扮演给定身份，另一组用于代表该身份执行特定操作。
这可以防止支持工具、控制器或节点代理即使在身份扮演 RBAC 配置错误的情况下，
也通过身份扮演获得超出其自身被允许范围的访问权限。
现有的 impersonate 规则会继续工作，
但 API 服务器会优先使用新的受限检查，
使迁移成为增量过程，而不是一次性切换。
随着 v1.36 中进入 Beta，&lt;code&gt;ConstrainedImpersonation&lt;/code&gt; 已经过测试、具备文档，
并已准备好被依赖身份扮演进行调试、代理或节点级控制器的平台团队更广泛采用。&lt;/p&gt;
&lt;!--
This work was done as a part of [KEP #5284](https://kep.k8s.io/5284) led by SIG Auth.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5284&#34;&gt;KEP #5284&lt;/a&gt; 的一部分，由 SIG Auth 牵头完成。&lt;/p&gt;
&lt;!--
### DRA features in beta
--&gt;
&lt;h3 id=&#34;dra-features-in-beta&#34;&gt;Beta 阶段的 DRA 特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#dra-features-in-beta&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The [Dynamic Resource Allocation (DRA)](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/) framework reaches another maturity milestone in Kubernetes v1.36 as several core features graduate to beta and are enabled by default.
This transition moves DRA beyond basic allocation by graduating [partitionable devices](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#partitionable-devices) and [consumable capacity](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#consumable-capacity), allowing for more granular sharing of hardware like GPUs,
while [device taints and tolerations](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-taints-and-tolerations) ensure that specialized resources are only utilized by the appropriate workloads.
--&gt;
&lt;p&gt;随着若干核心特性进阶至 Beta 并默认启用，
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/&#34;&gt;动态资源分配（DRA）&lt;/a&gt;框架
在 Kubernetes v1.36 中达到又一个成熟度里程碑。
通过推进&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#partitionable-devices&#34;&gt;可分区设备&lt;/a&gt;
和&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#consumable-capacity&#34;&gt;可消耗容量&lt;/a&gt;，
这次转变让 DRA 超越了基础分配，允许对 GPU 等硬件进行更细粒度的共享；
同时，&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-taints-and-tolerations&#34;&gt;设备污点和容忍&lt;/a&gt;
确保专用资源只被合适的工作负载使用。&lt;/p&gt;
&lt;!--
Now, users benefit from a much more reliable and observable resource lifecycle through [ResourceClaim device status](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#resourceclaim-device-status)
and the ability to ensure device attachment before Pod scheduling.
By integrating these features with [extended resource](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource) support,
Kubernetes provides a robust production-ready alternative to the legacy device plugin system,
enabling complex AI and HPC workloads to manage hardware with unprecedented precision and operational safety.
--&gt;
&lt;p&gt;现在，用户可以通过 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#resourceclaim-device-status&#34;&gt;ResourceClaim 设备状态&lt;/a&gt;
以及在 Pod 调度前确保设备挂接的能力，
受益于更可靠且更可观测的资源生命周期。
通过将这些特性与&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#extended-resource&#34;&gt;扩展资源&lt;/a&gt;支持集成，
Kubernetes 为传统设备插件系统提供了一个稳健、生产就绪的替代方案，
使复杂的 AI 与 HPC 工作负载能够以前所未有的精度和运维安全性管理硬件。&lt;/p&gt;
&lt;!--
This work was done across several KEPs (including [#5004](https://kep.k8s.io/5004), [#4817](https://kep.k8s.io/4817), [#5055](https://kep.k8s.io/5055), [#5075](https://kep.k8s.io/5075), [#4815](https://kep.k8s.io/4815), and [#5007](https://kep.k8s.io/issues/5007)) led by SIG Scheduling and SIG Node.
--&gt;
&lt;p&gt;此项工作跨越多个 KEP（包括 &lt;a href=&#34;https://kep.k8s.io/5004&#34;&gt;#5004&lt;/a&gt;、&lt;a href=&#34;https://kep.k8s.io/4817&#34;&gt;#4817&lt;/a&gt;、
&lt;a href=&#34;https://kep.k8s.io/5055&#34;&gt;#5055&lt;/a&gt;、&lt;a href=&#34;https://kep.k8s.io/5075&#34;&gt;#5075&lt;/a&gt;、&lt;a href=&#34;https://kep.k8s.io/4815&#34;&gt;#4815&lt;/a&gt;
和 &lt;a href=&#34;https://kep.k8s.io/issues/5007&#34;&gt;#5007&lt;/a&gt;），由 SIG Scheduling 和 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Statusz for Kubernetes components
--&gt;
&lt;h3 id=&#34;statusz-for-kubernetes-components&#34;&gt;Kubernetes 组件的 Statusz  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#statusz-for-kubernetes-components&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.36, the `ComponentStatusz` feature gate for core Kubernetes components graduates to beta,
providing a `/statusz` endpoint (enabled by default) that surfaces real‑time build and version details for each component.
This low‑overhead [z-page](/docs/reference/instrumentation/zpages/) exposes information like start time, uptime, Go version, binary version,
emulation version, and minimum compatibility version, so operators and developers can quickly see exactly
what is running without digging through logs or configs.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，面向核心 Kubernetes 组件的 &lt;code&gt;ComponentStatusz&lt;/code&gt; 特性门控进阶至 Beta，
提供一个默认启用的 &lt;code&gt;/statusz&lt;/code&gt; 端点，用于呈现每个组件的实时构建和版本细节。
这个低开销的 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/instrumentation/zpages/&#34;&gt;z-page&lt;/a&gt; 会公开启动时间、运行时长、
Go 版本、二进制版本、仿真版本和最低兼容版本等信息，
使操作人员和开发者无需深入日志或配置，就能快速准确了解正在运行的内容。&lt;/p&gt;
&lt;!--
The endpoint offers a human‑readable text view by default, plus a versioned structured API (`config.k8s.io/v1beta1`)
for programmatic access in JSON, YAML, or CBOR via explicit content negotiation.
Access is granted to the `system:monitoring` group, keeping it aligned with existing protections on
health and metrics endpoints and avoiding exposure of sensitive data.
--&gt;
&lt;p&gt;此端点默认提供人类可读的文本视图，
并通过显式内容协商提供一个版本化的结构化 API（&lt;code&gt;config.k8s.io/v1beta1&lt;/code&gt;），
以 JSON、YAML 或 CBOR 形式供程序访问。
访问权限授予 &lt;code&gt;system:monitoring&lt;/code&gt; 组，
使其与健康和指标端点上的现有保护保持一致，并避免暴露敏感数据。&lt;/p&gt;
&lt;!--
With beta, `ComponentStatusz` is enabled by default across all core control‑plane components and node agents,
backed by unit, integration, and end‑to‑end tests so it can be safely used in production for
observability and debugging workflows.
--&gt;
&lt;p&gt;进入 Beta 后，&lt;code&gt;ComponentStatusz&lt;/code&gt; 在所有核心控制平面组件和节点代理程序上默认启用，
并由单元测试、集成测试和端到端测试提供支撑，
因此可以安全地用于生产环境中的可观测性和调试工作流。&lt;/p&gt;
&lt;!--
This work was done as a part of [KEP #4827](https://kep.k8s.io/4827) led by SIG Instrumentation.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4827&#34;&gt;KEP #4827&lt;/a&gt; 的一部分，由 SIG Instrumentation 牵头完成。&lt;/p&gt;
&lt;!--
### Flagz for Kubernetes components
--&gt;
&lt;h3 id=&#34;flagz-for-kubernetes-components&#34;&gt;Kubernetes 组件的 Flagz  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#flagz-for-kubernetes-components&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.36, the `ComponentFlagz` feature gate for core Kubernetes components graduates to beta,
standardizing a `/flagz` endpoint that exposes the effective command‑line flags each component was started with.
This gives cluster operators and developers real‑time, in‑cluster visibility into component configuration,
making it much easier to debug unexpected behavior or verify that a flag rollout actually took effect after a restart.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，面向核心 Kubernetes 组件的 &lt;code&gt;ComponentFlagz&lt;/code&gt; 特性门控进阶至 Beta，
标准化了 &lt;code&gt;/flagz&lt;/code&gt; 端点，用于公开每个组件启动时实际生效的命令行标志。
这为集群操作人员和开发者提供了组件配置的实时集群内可见性，
使调试意外行为或验证某个标志发布在重启后是否真正生效变得容易得多。&lt;/p&gt;
&lt;!--
The endpoint supports both a human‑readable text view and a versioned structured API (initially `config.k8s.io/v1beta1`),
so you can either `curl` it during an incident or wire it into automated tooling once you are ready.
Access is granted to the `system:monitoring` group and sensitive values can be redacted,
keeping configuration insight aligned with existing security practices around health and status endpoints.
--&gt;
&lt;p&gt;此端点同时支持人类可读的文本视图和版本化的结构化 API（初始为 &lt;code&gt;config.k8s.io/v1beta1&lt;/code&gt;），
因此你既可以在事故期间用 &lt;code&gt;curl&lt;/code&gt; 查看它，也可以在准备好后将其接入自动化工具。
访问权限授予 &lt;code&gt;system:monitoring&lt;/code&gt; 组，且敏感值可以被遮蔽，
使配置可见性与健康和状态端点周边的现有安全实践保持一致。&lt;/p&gt;
&lt;!--
With beta, `ComponentFlagz` is now enabled by default and implemented across all core control‑plane components
and node agents, backed by unit, integration, and end‑to‑end tests to ensure the endpoint is reliable in production clusters.
--&gt;
&lt;p&gt;进入 Beta 后，&lt;code&gt;ComponentFlagz&lt;/code&gt; 现在默认启用，并已在所有核心控制平面组件和节点代理程序中实现；
单元测试、集成测试和端到端测试为其提供支撑，以确保该端点在生产集群中可靠。&lt;/p&gt;
&lt;!--
This work was done as a part of [KEP #4828](https://kep.k8s.io/4828) led by SIG Instrumentation.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4828&#34;&gt;KEP #4828&lt;/a&gt; 的一部分，由 SIG Instrumentation 牵头完成。&lt;/p&gt;
&lt;!--
### Mixed version proxy (aka _unknown version interoperability proxy_) {#mixed-version-proxy}
--&gt;
&lt;h3 id=&#34;mixed-version-proxy&#34;&gt;混合版本代理（又称&lt;strong&gt;未知版本互操作代理&lt;/strong&gt;）  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#mixed-version-proxy&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.36, the _mixed version proxy_ feature graduates to beta, building on its alpha introduction in v1.28
to provide safer control-plane upgrades for mixed-version clusters. Each API request can now be routed to the apiserver
instance that serves the requested group, version, and resource, reducing 404s and failures due to version skew.
--&gt;
&lt;p&gt;在 Kubernetes v1.36 中，&lt;strong&gt;混合版本代理&lt;/strong&gt;特性在 v1.28 引入的 Alpha 版本基础上进阶至 Beta，
为混合版本集群提供更安全的控制平面升级。
现在，每个 API 请求都可以路由到为所请求的组、版本和资源提供服务的 apiserver 实例，
从而减少因版本偏差导致的 404 和失败。&lt;/p&gt;
&lt;!--
The feature relies on peer-aggregated discovery, so apiservers share information about which resources and versions they expose,
then use that data to transparently reroute requests when needed. New metrics on rerouted traffic and proxy behavior
help operators understand how often requests are forwarded and to which peers.
Together, these changes make it easier to run highly available, mixed-version API control planes in production
while performing multi-step or partial control-plane upgrades.
--&gt;
&lt;p&gt;此特性依赖对等聚合发现，因此各 apiserver 会共享它们公开哪些资源和版本的信息，
随后在需要时使用这些数据透明地重路由请求。
关于被重路由流量和代理行为的新指标，
可帮助操作人员了解请求被转发的频率以及被转发到哪些对等实例。
这些变更结合起来，使在生产环境中运行高可用的混合版本 API 控制平面变得更容易，
同时支持执行多步骤或部分控制平面升级。&lt;/p&gt;
&lt;!--
This work was done as a part of [KEP #4020](https://kep.k8s.io/4020) led by SIG API Machinery
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4020&#34;&gt;KEP #4020&lt;/a&gt; 的一部分，由 SIG API Machinery 牵头完成。&lt;/p&gt;
&lt;!--
### Memory QoS with cgroups v2
--&gt;
&lt;h3 id=&#34;memory-qos-with-cgroups-v2&#34;&gt;基于 cgroups v2 的内存 QoS  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#memory-qos-with-cgroups-v2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes now enhances memory QoS on Linux cgroup v2 nodes with smarter, tiered memory protection that better aligns kernel
controls with pod requests and limits, reducing interference and thrashing for workloads sharing the same node.
This iteration also refines how kubelet programs memory.high and memory.min, adds metrics and safeguards to avoid livelocks,
and introduces configuration options so cluster operators can tune memory protection behavior for their environments.
--&gt;
&lt;p&gt;Kubernetes 现在在 Linux cgroup v2 节点上通过更智能、分层的内存保护增强内存 QoS，
使内核控制更好地与 Pod 请求和限制对齐，
减少共享同一节点的工作负载之间的干扰和抖动。
这一迭代还改进了 kubelet 对 memory.high 和 memory.min 的设置方式，
增加了指标和防护机制以避免活锁，
并引入配置选项，使集群操作人员可以针对其环境调整内存保护行为。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #2570](https://kep.k8s.io/2570) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/2570&#34;&gt;KEP #2570&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
## New features in Alpha
--&gt;
&lt;h2 id=&#34;new-features-in-alpha&#34;&gt;Alpha 阶段的新特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#new-features-in-alpha&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This is a selection of some of the improvements that are now alpha following the v1.36 release.
--&gt;
&lt;p&gt;以下列出 v1.36 发布后进入 Alpha 阶段的一些改进。&lt;/p&gt;
&lt;!--
### HPA scale to zero for custom metrics
--&gt;
&lt;h3 id=&#34;hpa-scale-to-zero-for-custom-metrics&#34;&gt;基于自定义指标的 HPA 缩容到零  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#hpa-scale-to-zero-for-custom-metrics&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Until now, the HorizontalPodAutoscaler (HPA) required a minimum of at least one replica to remain active,
as it could only calculate scaling needs based on metrics (like CPU or Memory) from running pods.
Kubernetes v1.36 continues the development of the _HPA scale to zero_ feature (disabled by default) in Alpha,
allowing workloads to scale down to zero replicas specifically when using Object or External metrics.
--&gt;
&lt;p&gt;到目前为止，HorizontalPodAutoscaler（HPA）要求至少保留一个活跃副本，
因为它只能基于运行中 Pod 的指标（如 CPU 或内存）计算扩缩容需求。
Kubernetes v1.36 继续推进 Alpha 阶段的 &lt;strong&gt;HPA 缩容到零&lt;/strong&gt;特性（默认禁用），
允许工作负载在使用 Object 或 External 指标时专门缩容到零个副本。&lt;/p&gt;
&lt;!--
Now, users can experiment with significantly reducing infrastructure costs by completely idling heavy workloads when
no work is pending. While the feature remains behind the `HPAScaleToZero` feature gate,
it enables the HPA to stay active even with zero running pods,
automatically scaling the deployment back up as soon as the external metric (e.g., queue length)
indicates that new tasks have arrived.
--&gt;
&lt;p&gt;现在，用户可以进行实验：
在没有待处理工作时让重型工作负载完全空闲，从而显著降低基础设施成本。
虽然此特性仍受 &lt;code&gt;HPAScaleToZero&lt;/code&gt; 特性门控控制，
但它使 HPA 即使在没有运行中 Pod 时也能保持活跃，
并在外部指标（例如队列长度）表明有新任务到达时，
自动将 Deployment 扩容回来。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #2021](https://kep.k8s.io/2021) led by SIG Autoscaling.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/2021&#34;&gt;KEP #2021&lt;/a&gt; 的一部分，由 SIG Autoscaling 牵头完成。&lt;/p&gt;
&lt;!--
### DRA features in Alpha
--&gt;
&lt;h3 id=&#34;dra-features-in-alpha&#34;&gt;Alpha 阶段的 DRA 特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#dra-features-in-alpha&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Historically, the Dynamic Resource Allocation (DRA) framework lacked seamless integration with high-level controllers and
provided limited visibility into device-specific metadata or availability.
Kubernetes v1.36 introduces a wave of DRA enhancements in Alpha, including native ResourceClaim support for workloads,
and DRA native resources to provide the flexibility of DRA to cpu management.
--&gt;
&lt;p&gt;过去，动态资源分配（DRA）框架缺少与高级控制器的无缝集成，
并且对设备特定元数据或可用性的可见性有限。
Kubernetes v1.36 引入了一批 Alpha 阶段的 DRA 增强，
包括面向工作负载的原生 ResourceClaim 支持，
以及 DRA 原生资源，用于为 CPU 管理提供 DRA 的灵活性。&lt;/p&gt;
&lt;!--
Now, users can leverage the [downward API](/docs/concepts/workloads/pods/downward-api/) to expose complex resource attributes directly to containers and
benefit from improved resource availability visibility for more predictable scheduling. these updates,
combined with support for list types in device attributes, transform DRA from a low-level primitive into a robust system
capable of handling the sophisticated networking and compute requirements of modern AI and
high-performance computing (HPC) stacks.
--&gt;
&lt;p&gt;现在，用户可以利用 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/pods/downward-api/&#34;&gt;Downward API&lt;/a&gt;
将复杂资源属性直接暴露给容器，
并受益于改进后的资源可用性可见性，从而实现更可预测的调度。
这些更新结合对设备属性中列表类型的支持，
将 DRA 从低层原语转变为稳健的系统，
能够处理现代 AI 和高性能计算（HPC）栈的复杂网络与计算需求。&lt;/p&gt;
&lt;!--
This work was done across several KEPs (including [#5729](https://kep.k8s.io/5729), [#5304](https://kep.k8s.io/5304), [#5517](https://kep.k8s.io/5517), [#5677](https://kep.k8s.io/5677), and [#5491](https://kep.k8s.io/5491)) led by SIG Scheduling and SIG Node.
--&gt;
&lt;p&gt;此项工作跨越多个 KEP（包括 &lt;a href=&#34;https://kep.k8s.io/5729&#34;&gt;#5729&lt;/a&gt;、&lt;a href=&#34;https://kep.k8s.io/5304&#34;&gt;#5304&lt;/a&gt;、
&lt;a href=&#34;https://kep.k8s.io/5517&#34;&gt;#5517&lt;/a&gt;、&lt;a href=&#34;https://kep.k8s.io/5677&#34;&gt;#5677&lt;/a&gt; 和 &lt;a href=&#34;https://kep.k8s.io/5491&#34;&gt;#5491&lt;/a&gt;），
由 SIG Scheduling 和 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Native histogram support for Kubernetes metrics
--&gt;
&lt;h3 id=&#34;native-histogram-support-for-kubernetes-metrics&#34;&gt;Kubernetes 指标的原生直方图支持  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#native-histogram-support-for-kubernetes-metrics&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
High-resolution monitoring reaches a new milestone in Kubernetes v1.36 with the introduction of native histogram support
in Alpha. While classical Prometheus histograms relied on static, pre-defined buckets that often forced a compromise
between data accuracy and memory usage, this update allows the control plane to export sparse histograms that
dynamically adjust their resolution based on real-time data.
--&gt;
&lt;p&gt;随着原生直方图支持在 Alpha 阶段引入，
高分辨率监控在 Kubernetes v1.36 中达到新的里程碑。
传统 Prometheus 直方图依赖静态、预定义的桶，
往往迫使用户在数据精度和内存使用之间取舍；
这项更新允许控制平面导出稀疏直方图，
并基于实时数据动态调整其分辨率。&lt;/p&gt;
&lt;!--
Now, cluster operators can capture precise latency distributions for the kube-apiserver and other core components without
the overhead of manual bucket management. This architectural shift ensures more reliable SLIs and SLOs,
providing high-fidelity heatmaps that remain accurate even during the most unpredictable workload spikes.
--&gt;
&lt;p&gt;现在，集群操作人员可以捕获 kube-apiserver 和其他核心组件的精确延迟分布，
而无需承担手动管理桶的开销。
这一架构转变确保 SLI 和 SLO 更可靠，
提供高保真热力图，即使在最难预测的工作负载峰值期间也能保持准确。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5808](https://kep.k8s.io/5808) led by SIG Instrumentation.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5808&#34;&gt;KEP #5808&lt;/a&gt; 的一部分，由 SIG Instrumentation 牵头完成。&lt;/p&gt;
&lt;!--
### Manifest based admission control config
--&gt;
&lt;h3 id=&#34;manifest-based-admission-control-config&#34;&gt;基于清单的准入控制配置  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#manifest-based-admission-control-config&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Managing admission controllers moves toward a more declarative and consistent model in Kubernetes v1.36 with the
introduction of _manifest-based admission control_ configuration in Alpha.
This change addresses the long-standing challenge of configuring admission plugins through disparate command-line
flags or separate, complex config files by allowing administrators to define the desired state of admission control
directly through a structured manifest.
--&gt;
&lt;p&gt;随着 Alpha 阶段的&lt;strong&gt;基于清单的准入控制&lt;/strong&gt;配置引入，
准入控制器管理在 Kubernetes v1.36 中迈向更加声明式且一致的模型。
长期以来，准入插件需要通过分散的命令行参数或独立且复杂的配置文件进行配置。
这一变更允许管理员直接通过结构化清单定义准入控制的期望状态，
从而应对这一长期挑战。&lt;/p&gt;
&lt;!--
Now, cluster operators can manage admission plugin settings with the same versioned, declarative workflows used for
other Kubernetes objects, significantly reducing the risk of configuration drift and manual errors during cluster upgrades.
By centralizing these configurations into a unified manifest, the kube-apiserver becomes easier to audit and automate,
paving the way for more secure and reproducible cluster deployments.
--&gt;
&lt;p&gt;现在，集群操作人员可以使用与其他 Kubernetes 对象相同的版本化、声明式工作流来管理准入插件设置，
显著降低集群升级期间配置漂移和手动错误的风险。
通过将这些配置集中到统一清单中，
kube-apiserver 变得更易于审计和自动化，
为更安全、可复现的集群部署铺平道路。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5793](https://kep.k8s.io/5793) led by SIG API Machinery.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5793&#34;&gt;KEP #5793&lt;/a&gt; 的一部分，由 SIG API Machinery 牵头完成。&lt;/p&gt;
&lt;!--
### CRI list streaming
--&gt;
&lt;h3 id=&#34;cri-list-streaming&#34;&gt;CRI 列表流式传输  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#cri-list-streaming&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
With the introduction of _CRI list streaming_ in Alpha, Kubernetes v1.36 uses new internal streaming operations.
This enhancement addresses the memory pressure and latency spikes often seen on large-scale nodes by replacing traditional,
monolithic `List` requests between the kubelet and the container runtime with a more efficient server-side streaming RPC.
--&gt;
&lt;p&gt;随着 &lt;strong&gt;CRI 列表流式传输&lt;/strong&gt;在 Alpha 阶段引入，
Kubernetes v1.36 使用了新的内部流式操作。
此增强将 kubelet 与容器运行时之间传统的整体式 &lt;code&gt;List&lt;/code&gt; 请求
替换为更高效的服务器端流式 RPC，
以解决大规模节点上常见的内存压力和延迟峰值问题。&lt;/p&gt;
&lt;!--
Now, instead of waiting for a single, massive response containing all container or image data, the kubelet can process results
incrementally as they are streamed. This shift significantly reduces the peak memory footprint of the kubelet and improves
responsiveness on high-density nodes, ensuring that cluster management remains fluid even as the number of
containers per node continues to grow.
--&gt;
&lt;p&gt;现在，kubelet 不再等待包含所有容器或镜像数据的单个巨大响应，
而是可以在结果被流式传输时增量处理。
这一转变显著降低了 kubelet 的峰值内存占用，
并提升了高密度节点上的响应能力，
确保即使每个节点上的容器数量持续增长，集群管理也能保持流畅。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5825](https://kep.k8s.io/5825) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5825&#34;&gt;KEP #5825&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
## Other notable changes
--&gt;
&lt;h2 id=&#34;other-notable-changes&#34;&gt;其他值得注意的变化  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#other-notable-changes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Ingress NGINX retirement
--&gt;
&lt;h3 id=&#34;ingress-nginx-retirement&#34;&gt;Ingress NGINX 退役  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ingress-nginx-retirement&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
To prioritize the safety and security of the ecosystem, Kubernetes SIG Network and the Security Response Committee have 
retired Ingress NGINX on March 24, 2026.
Since that date, there have been no further releases, no bugfixes, and no updates to resolve any security vulnerabilities discovered. Existing deployments of
Ingress NGINX will continue to function, and installation artifacts like Helm charts and container images will remain available. 
--&gt;
&lt;p&gt;为优先保障生态系统的安全，Kubernetes SIG Network 和安全响应委员会（Security Response Committee）
已于 2026 年 3 月 24 日退役 Ingress NGINX。
自该日期起，不再发布后续版本、不再修复缺陷，也不再更新以修复新发现的安全漏洞。
现有 Ingress NGINX 部署将继续运行，Helm Chart 和容器镜像等安装制品也将继续可用。&lt;/p&gt;
&lt;!--
For full details, see the [official retirement announcement](/blog/2025/11/11/ingress-nginx-retirement/).
--&gt;
&lt;p&gt;完整详情请参阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/11/11/ingress-nginx-retirement/&#34;&gt;官方退役公告&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### Faster SELinux labelling for volumes (GA) {#volume-selinux-labelling}
--&gt;
&lt;h3 id=&#34;volume-selinux-labelling&#34;&gt;卷的 SELinux 标签提速（GA）  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#volume-selinux-labelling&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes v1.36 makes the SELinux volume mounting improvement generally available. This change replaced recursive file 
relabeling with `mount -o context=XYZ` option, applying the correct SELinux label to the entire volume at mount time. 
It brings more consistent performance and reduces Pod startup delays on SELinux-enforcing systems.
--&gt;
&lt;p&gt;Kubernetes v1.36 将 SELinux 卷挂载改进提升为正式可用。
此变更使用 &lt;code&gt;mount -o context=XYZ&lt;/code&gt; 选项替代了递归文件重标记，
在挂载时为整个卷应用正确的 SELinux 标签。
它带来更一致的性能，并减少启用 SELinux 强制模式系统上的 Pod 启动延迟。&lt;/p&gt;
&lt;!--
This feature was introduced as beta in v1.28 for `ReadWriteOncePod` volumes. In v1.32, it gained metrics and an opt-out 
option (`securityContext.seLinuxChangePolicy: Recursive`) to help catch conflicts. Now in v1.36, 
it reaches Stable and defaults to all volumes, with Pods or CSIDrivers opting in via `spec.seLinuxMount`.
--&gt;
&lt;p&gt;该特性在 v1.28 作为 Beta 引入，适用于 &lt;code&gt;ReadWriteOncePod&lt;/code&gt; 卷。
在 v1.32，它新增了指标和退出选项（&lt;code&gt;securityContext.seLinuxChangePolicy: Recursive&lt;/code&gt;）以帮助发现冲突。
现在在 v1.36，它进入稳定（GA）阶段，并默认适用于所有卷；
Pod 或 CSIDriver 可通过 &lt;code&gt;spec.seLinuxMount&lt;/code&gt; 显式启用。&lt;/p&gt;
&lt;!--
However, we expect this feature to create the risk of breaking changes in the future Kubernetes releases, potentially due to sharing one volume between privileged and unprivileged Pods on the same node.
--&gt;
&lt;p&gt;不过，我们预计该特性在未来 Kubernetes 版本中可能带来破坏性变更风险，
潜在原因是在同一节点上的特权 Pod 和非特权 Pod 之间共享同一个卷。&lt;/p&gt;
&lt;!--
Developers have the responsibility of setting the `seLinuxChangePolicy` field and SELinux volume labels on Pods. Regardless of whether they are writing a Deployment, StatefulSet, DaemonSet or even a custom resource that includes a Pod template, being careless with these settings can lead to a range of problems such as Pods not starting up correctly when Pods share a volume.
--&gt;
&lt;p&gt;开发者有责任为 Pod 设置 &lt;code&gt;seLinuxChangePolicy&lt;/code&gt; 字段和 SELinux 卷标签。
无论他们是在编写 Deployment、StatefulSet、DaemonSet，
还是包含 Pod 模板的自定义资源，
对这些设置不够谨慎都可能导致一系列问题，
例如 Pod 共享卷时无法正确启动。&lt;/p&gt;
&lt;!--
Kubernetes v1.36 is the ideal release to audit your clusters. To learn more, check out [SELinux Volume Label Changes goes GA (and likely implications in v1.37)](/blog/2026/04/22/breaking-changes-in-selinux-volume-labeling/) blog.
--&gt;
&lt;p&gt;Kubernetes v1.36 是审计集群的理想版本。
要了解更多信息，请查看博客
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/04/22/breaking-changes-in-selinux-volume-labeling/&#34;&gt;SELinux Volume Label Changes goes GA (and likely implications in v1.37)&lt;/a&gt;。&lt;/p&gt;
&lt;!--
For more details on this enhancement, refer to [KEP-1710: Speed up recursive SELinux label change](https://kep.k8s.io/1710).
--&gt;
&lt;p&gt;有关此增强的更多细节，请参阅 &lt;a href=&#34;https://kep.k8s.io/1710&#34;&gt;KEP-1710：加快递归 SELinux 标签变更&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Graduations, deprecations, and removals in v1.36
--&gt;
&lt;h2 id=&#34;graduations-deprecations-and-removals-in-v136&#34;&gt;v1.36 的升级、弃用与移除  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#graduations-deprecations-and-removals-in-v136&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Graduations to stable
--&gt;
&lt;h3 id=&#34;graduations-to-stable&#34;&gt;进阶至稳定阶段  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#graduations-to-stable&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
This lists all the features that graduated to stable (also known as general availability).
For a full list of updates including new features and graduations from alpha to beta, see the release notes.
--&gt;
&lt;p&gt;这里列出了所有进阶至稳定（也称为正式发布，GA）阶段的特性。
有关包括新特性以及从 Alpha 进阶至 Beta 的完整更新列表，请参阅发布说明。&lt;/p&gt;
&lt;!--
This release includes a total of 18 enhancements promoted to stable:
--&gt;
&lt;p&gt;此版本共有 18 项增强提升至稳定阶段：&lt;/p&gt;
&lt;!--
- [Support User Namespaces in pods](https://kep.k8s.io/127)
- [API for external signing of Service Account tokens](https://kep.k8s.io/740)
- [Speed up recursive SELinux label change](https://kep.k8s.io/1710)
- [Portworx file in-tree to CSI driver migration](https://kep.k8s.io/2589)
- [Fine grained Kubelet API authorization](https://kep.k8s.io/2862)
- [Mutating Admission Policies](https://kep.k8s.io/3962)
- [Node log query](https://kep.k8s.io/2258)
- [VolumeGroupSnapshot](https://kep.k8s.io/3476)
- [Mutable CSINode Allocatable Property](https://kep.k8s.io/4876)
- [DRA: Prioritized Alternatives in Device Requests](https://kep.k8s.io/4816)
- [Support PSI based on cgroupv2](https://kep.k8s.io/4205)
- [add ProcMount option](https://kep.k8s.io/4265)
- [DRA: Extend PodResources to include resources from Dynamic Resource Allocation](https://kep.k8s.io/3695)
- [VolumeSource: OCI Artifact and/or Image](https://kep.k8s.io/4639)
- [Split L3 Cache Topology Awareness in CPU Manager](https://kep.k8s.io/5109)
- [DRA: AdminAccess for ResourceClaims and ResourceClaimTemplates](https://kep.k8s.io/5018)
- [Remove gogo protobuf dependency for Kubernetes API types](https://kep.k8s.io/5589)
- [CSI driver opt-in for service account tokens via secrets field](https://kep.k8s.io/5538)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/127&#34;&gt;支持 Pod 中的用户命名空间&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/740&#34;&gt;ServiceAccount 令牌外部签名 API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/1710&#34;&gt;加快递归 SELinux 标签变更&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/2589&#34;&gt;Portworx file in-tree 到 CSI 驱动迁移&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/2862&#34;&gt;细粒度 Kubelet API 鉴权&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/3962&#34;&gt;变更性准入策略&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/2258&#34;&gt;节点日志查询&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/3476&#34;&gt;VolumeGroupSnapshot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4876&#34;&gt;可变 CSINode 可分配属性&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4816&#34;&gt;DRA：设备请求中的优先替代项&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4205&#34;&gt;支持基于 cgroup v2 的 PSI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4265&#34;&gt;添加 ProcMount 选项&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/3695&#34;&gt;DRA：扩展 PodResources 以包含来自动态资源分配的资源&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4639&#34;&gt;VolumeSource：OCI 制品和/或镜像&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5109&#34;&gt;在 CPU Manager 中拆分 L3 缓存拓扑感知&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5018&#34;&gt;DRA：ResourceClaim 和 ResourceClaimTemplate 的 AdminAccess&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5589&#34;&gt;移除 Kubernetes API 类型对 gogo protobuf 的依赖&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5538&#34;&gt;CSI 驱动选择通过 secrets 字段接收服务账户令牌&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Deprecations removals, and community updates
--&gt;
&lt;h2 id=&#34;deprecations-removals-and-community-updates&#34;&gt;弃用、移除与社区更新  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecations-removals-and-community-updates&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
As Kubernetes develops and matures, features may be deprecated, removed, or replaced with better ones to improve the
project&#39;s overall health. See the Kubernetes deprecation and removal policy for more details on this process.
Kubernetes v1.36 includes a couple of deprecations.
--&gt;
&lt;p&gt;随着 Kubernetes 的发展与成熟，为提升项目整体健康度，
特性可能会被弃用、移除或被更好的特性替代。
关于这一过程的更多信息，请参阅 Kubernetes 的弃用与移除策略。
Kubernetes v1.36 包含若干项弃用内容。&lt;/p&gt;
&lt;!--
### Deprecation of Service .spec.externalIPs {#deprecate-service-spec-externalips}
--&gt;
&lt;h3 id=&#34;deprecate-service-spec-externalips&#34;&gt;Service &lt;code&gt;.spec.externalIPs&lt;/code&gt; 的弃用  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecate-service-spec-externalips&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
With this release, the `externalIPs` field in Service `spec` is deprecated. This means the functionality exists, but will no longer function in a **future** version of Kubernetes. You should plan to migrate if you currently rely on that field.
This field has been a known security headache for years,
enabling man-in-the-middle attacks on your cluster traffic, as documented in [CVE-2020-8554](https:/github.com/kubernetes/kubernetes/issues/97076).
From Kubernetes v1.36 and onwards, you will see deprecation warnings when using it, with full removal planned for v1.43.
--&gt;
&lt;p&gt;在本次发布中，Service &lt;code&gt;spec&lt;/code&gt; 中的 &lt;code&gt;externalIPs&lt;/code&gt; 字段被弃用。
这意味着此功能仍然存在，但将在 Kubernetes 的&lt;strong&gt;未来&lt;/strong&gt;版本中不再工作。
如果你当前依赖此字段，应计划迁移。
这个字段多年来一直是已知的安全隐患，
会让集群流量面临中间人攻击风险，如 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/97076&#34;&gt;CVE-2020-8554&lt;/a&gt; 所述。
从 Kubernetes v1.36 起，使用它时你会看到弃用警告，并计划在 v1.43 完全移除。&lt;/p&gt;
&lt;!--
If your Services still lean on `externalIPs`, consider using LoadBalancer services for cloud-managed ingress,
NodePort for simple port exposure, or [Gateway API](https://gateway-api.sigs.k8s.io/) for a more flexible and secure way to handle external traffic.
--&gt;
&lt;p&gt;如果你的 Service 仍依赖 &lt;code&gt;externalIPs&lt;/code&gt;，
可考虑使用 LoadBalancer 服务处理云托管入口、使用 NodePort 做简单端口暴露，
或使用 &lt;a href=&#34;https://gateway-api.sigs.k8s.io/&#34;&gt;Gateway API&lt;/a&gt; 以更灵活且更安全的方式处理外部流量。&lt;/p&gt;
&lt;!--
For more details on this field and its deprecation, refer to [External IPs](/docs/concepts/services-networking/service/#external-ips) or read
[KEP-5707: Deprecate service.spec.externalIPs](https://kep.k8s.io/5707).
--&gt;
&lt;p&gt;有关此字段及其弃用的更多细节，请参阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/services-networking/service/#external-ips&#34;&gt;外部 IP&lt;/a&gt;，
或阅读 &lt;a href=&#34;https://kep.k8s.io/5707&#34;&gt;KEP-5707：弃用 service.spec.externalIPs&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### Removal of the `gitRepo` volume driver {#remove-gitrepo-volume-driver}
--&gt;
&lt;h3 id=&#34;remove-gitrepo-volume-driver&#34;&gt;移除 &lt;code&gt;gitRepo&lt;/code&gt; 卷驱动  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#remove-gitrepo-volume-driver&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The `gitRepo` volume type has been deprecated since v1.11. For Kubernetes v1.36, the `gitRepo` volume plugin is
permanently disabled and cannot be turned back on. This change protects clusters from a critical security issue where
using `gitRepo` could let an attacker run code as root on the node.
--&gt;
&lt;p&gt;&lt;code&gt;gitRepo&lt;/code&gt; 卷类型自 v1.11 起已被弃用。
在 Kubernetes v1.36 中，&lt;code&gt;gitRepo&lt;/code&gt; 卷插件被永久禁用，且无法重新启用。
此变更可保护集群免受关键安全问题影响，
因为使用 &lt;code&gt;gitRepo&lt;/code&gt; 可能让攻击者以 root 身份在节点上运行代码。&lt;/p&gt;
&lt;!--
Although `gitRepo` has been deprecated for years and better alternatives have been recommended,
it was still technically possible to use it in previous releases.
From v1.36 onward, that path is closed for good, so any existing workloads depending on `gitRepo` will need to migrate to
supported approaches such as init containers or external `git-sync` style tools.
--&gt;
&lt;p&gt;尽管 &lt;code&gt;gitRepo&lt;/code&gt; 多年来一直处于弃用状态，且已有更好的替代方案被推荐，
但在此前版本中它在技术上仍可使用。
从 v1.36 开始，这条路径将被永久关闭，
因此任何依赖 &lt;code&gt;gitRepo&lt;/code&gt; 的现有工作负载都需要迁移到受支持方案，
例如 init 容器或外部 &lt;code&gt;git-sync&lt;/code&gt; 风格工具。&lt;/p&gt;
&lt;!--
For more details on this removal, refer to [KEP-5040: Remove gitRepo volume driver](https://kep.k8s.io/5040)
--&gt;
&lt;p&gt;有关此移除的更多细节，请参阅 &lt;a href=&#34;https://kep.k8s.io/5040&#34;&gt;KEP-5040：移除 gitRepo 卷驱动&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Release notes
--&gt;
&lt;h2 id=&#34;release-notes&#34;&gt;发布说明  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#release-notes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Check out the full details of the Kubernetes v1.36 release in our [release notes](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.36.md).
--&gt;
&lt;p&gt;请在我们的&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.36.md&#34;&gt;发布说明&lt;/a&gt;
中查看 Kubernetes v1.36 发布的完整细节。&lt;/p&gt;
&lt;!--
## Availability
--&gt;
&lt;h2 id=&#34;availability&#34;&gt;可用性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#availability&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes v1.36 is available for download on [GitHub](https://github.com/kubernetes/kubernetes/releases/tag/v1.36.0) or on the [Kubernetes download page](https://kubernetes.io/releases/download/).
--&gt;
&lt;p&gt;Kubernetes v1.36 可通过 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/releases/tag/v1.36.0&#34;&gt;GitHub&lt;/a&gt;
或 &lt;a href=&#34;https://kubernetes.io/releases/download/&#34;&gt;Kubernetes 下载页面&lt;/a&gt;获取。&lt;/p&gt;
&lt;!--
To get started with Kubernetes, check out [these tutorials](https://kubernetes.io/docs/tutorials/) or run local Kubernetes clusters using [minikube](https://minikube.sigs.k8s.io/). 
You can also easily [install v1.36 using kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/).
--&gt;
&lt;p&gt;要开始使用 Kubernetes，请查看&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tutorials/&#34;&gt;这些教程&lt;/a&gt;，
或使用 &lt;a href=&#34;https://minikube.sigs.k8s.io/&#34;&gt;&lt;code&gt;minikube&lt;/code&gt;&lt;/a&gt; 在本地运行 Kubernetes 集群。
你也可以轻松地&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm/&#34;&gt;使用 &lt;code&gt;kubeadm&lt;/code&gt; 安装 v1.36&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Release Team
--&gt;
&lt;h2 id=&#34;release-team&#34;&gt;发布团队  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#release-team&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes is only possible with the support, commitment, and hard work of its community. Each release team is 
made up of dedicated community volunteers who work together to build the many pieces that make up the 
Kubernetes releases you rely on. This requires the specialized skills of people from all corners of our community, 
from the code itself to its documentation and project management.
--&gt;
&lt;p&gt;Kubernetes 的存在离不开社区的支持、投入和辛勤工作。
每个发布团队都由专注的社区志愿者组成，
他们共同构建你所依赖的 Kubernetes 发布版本中的诸多组成部分。
这需要来自社区各个角落的专业能力：
从代码本身到文档与项目管理。&lt;/p&gt;
&lt;!--
We would like to thank the entire [Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.36/release-team.md) for the hours spent hard at work to deliver the Kubernetes v1.36 release to our community. 
The Release Team&#39;s membership ranges from first-time shadows to returning team leads with experience forged over 
several release cycles. A very special thanks goes out to our release lead, Ryota Sawada, 
for guiding us through a successful release cycle, for his hands-on approach to solving challenges, 
and for bringing the energy and care that drives our community forward.
--&gt;
&lt;p&gt;我们感谢整个&lt;a href=&#34;https://github.com/kubernetes/sig-release/blob/master/releases/release-1.36/release-team.md&#34;&gt;发布团队&lt;/a&gt;
为向社区交付 Kubernetes v1.36 所付出的辛勤时间。
发布团队成员既包括首次参与的 shadow，也包括经过多个发布周期锤炼、再次回归的团队负责人。
我们特别感谢发布负责人 Ryota Sawada：
他带领我们走过一个成功的发布周期，
以亲力亲为的方式解决挑战，
并带来推动社区前行的能量与关怀。&lt;/p&gt;
&lt;!--
## Project Velocity
--&gt;
&lt;h2 id=&#34;project-velocity&#34;&gt;项目活跃度  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#project-velocity&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The CNCF K8s [DevStats](https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;var-period=m&amp;var-repogroup_name=All) project aggregates a number of interesting data points related to the velocity of 
Kubernetes and various sub-projects. This includes everything from individual contributions to the number of 
companies that are contributing, and is an illustration of the depth and breadth of effort that goes into evolving this ecosystem.
--&gt;
&lt;p&gt;CNCF K8s 的 &lt;a href=&#34;https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;var-period=m&amp;var-repogroup_name=All&#34;&gt;DevStats&lt;/a&gt;
项目汇总了与 Kubernetes 及其各子项目活跃度相关的一系列有趣数据点。
这些数据涵盖从个人贡献到参与贡献公司的数量等多个方面，
体现了推动该生态演进所投入努力的深度与广度。&lt;/p&gt;
&lt;!--
During the v1.36 release cycle, which spanned 15 weeks from 12th January 2026 to 22nd April 2026, 
Kubernetes received contributions from as many as 106 different companies and 491 individuals. 
In the wider cloud native ecosystem, the figure goes up to 370 companies, counting 2235 total contributors.
--&gt;
&lt;p&gt;在 v1.36 发布周期（从 2026 年 1 月 12 日到 2026 年 4 月 22 日，共 15 周）期间，
Kubernetes 收到了来自多达 106 家公司与 491 名个人的贡献。
在更广泛的云原生生态中，这一数字上升到 370 家公司，共计 2235 名贡献者。&lt;/p&gt;
&lt;!--
Note that “contribution” counts when someone makes a commit, code review, comment, creates an issue or PR, 
reviews a PR (including blogs and documentation) or comments on issues and PRs.
If you are interested in contributing, visit [Getting Started](https://www.kubernetes.dev/docs/guide/#getting-started) on our contributor website.
--&gt;
&lt;p&gt;请注意，这里的“贡献”统计包括：提交代码、进行代码评审、发表评论、创建 Issue 或 PR、
评审 PR（包括博客与文档）以及对 Issue 与 PR 的评论等。
如果你有兴趣参与贡献，请访问贡献者网站上的 &lt;a href=&#34;https://www.kubernetes.dev/docs/guide/#getting-started&#34;&gt;Getting Started&lt;/a&gt;。&lt;/p&gt;
&lt;!--
Source for this data:
- [Companies contributing to Kubernetes](https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;from=1747609200000&amp;to=1756335599000&amp;var-period=d28&amp;var-repogroup_name=Kubernetes&amp;var-repo_name=kubernetes%2Fkubernetes)
- [Overall ecosystem contributions](https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;from=1747609200000&amp;to=1756335599000&amp;var-period=d28&amp;var-repogroup_name=All&amp;var-repo_name=kubernetes%2Fkubernetes)
--&gt;
&lt;p&gt;数据来源：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;from=1747609200000&amp;to=1756335599000&amp;var-period=d28&amp;var-repogroup_name=Kubernetes&amp;var-repo_name=kubernetes%2Fkubernetes&#34;&gt;贡献 Kubernetes 的公司&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;from=1747609200000&amp;to=1756335599000&amp;var-period=d28&amp;var-repogroup_name=All&amp;var-repo_name=kubernetes%2Fkubernetes&#34;&gt;整体生态的贡献&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Events Update
--&gt;
&lt;h2 id=&#34;events-update&#34;&gt;活动更新  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#events-update&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Explore upcoming Kubernetes and cloud native events, including KubeCon + CloudNativeCon, KCD, 
and other notable conferences worldwide. Stay informed and get involved with the Kubernetes community!
--&gt;
&lt;p&gt;了解即将到来的 Kubernetes 与云原生活动，包括 KubeCon + CloudNativeCon、KCD 与全球其他重要会议。
保持关注并参与 Kubernetes 社区！&lt;/p&gt;
&lt;!--
**April 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 4 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- KCD - [Kubernetes Community Days: Guadalajara](https://community.cncf.io/events/details/cncf-kcd-guadalajara-presents-kcd-guadalajara-2026/cohost-kcd-guadalajara/): April 18, 2026 | Guadalajara, Mexico
--&gt;
&lt;ul&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-guadalajara-presents-kcd-guadalajara-2026/cohost-kcd-guadalajara/&#34;&gt;Kubernetes Community Days: Guadalajara&lt;/a&gt;：2026 年 4 月 18 日｜墨西哥 Guadalajara&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**May 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 5 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- KCD - [Kubernetes Community Days: Toronto](https://community.cncf.io/events/details/cncf-kcd-toronto-presents-kcd-toronto-2026/): May 13, 2026 | Toronto, Canada
- KCD - [Kubernetes Community Days: Texas](https://community.cncf.io/events/details/cncf-kcd-texas-presents-kcd-texas-2026/cohost-kcd-texas/): May 15, 2026 | Austin, USA
- KCD - [Kubernetes Community Days: Istanbul](https://community.cncf.io/events/details/cncf-kcd-istanbul-presents-kcd-istanbul-2026/): May 15, 2026 | Istanbul, Turkey
- KCD - [Kubernetes Community Days: Helsinki](https://community.cncf.io/events/details/cncf-kcd-helsinki-presents-kubernetes-community-days-helsinki-2026/): May 20, 2026 | Helsinki, Finland
- KCD - [Kubernetes Community Days: Czech &amp; Slovak](https://community.cncf.io/events/details/cncf-kcd-czech-slovak-presents-kcd-czech-amp-slovak-prague-2026/): May 21, 2026 | Prague, Czechia
--&gt;
&lt;ul&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-toronto-presents-kcd-toronto-2026/&#34;&gt;Kubernetes Community Days: Toronto&lt;/a&gt;：2026 年 5 月 13 日｜加拿大 Toronto&lt;/li&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-texas-presents-kcd-texas-2026/cohost-kcd-texas/&#34;&gt;Kubernetes Community Days: Texas&lt;/a&gt;：2026 年 5 月 15 日｜美国 Austin&lt;/li&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-istanbul-presents-kcd-istanbul-2026/&#34;&gt;Kubernetes Community Days: Istanbul&lt;/a&gt;：2026 年 5 月 15 日｜土耳其 Istanbul&lt;/li&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-helsinki-presents-kubernetes-community-days-helsinki-2026/&#34;&gt;Kubernetes Community Days: Helsinki&lt;/a&gt;：2026 年 5 月 20 日｜芬兰 Helsinki&lt;/li&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-czech-slovak-presents-kcd-czech-amp-slovak-prague-2026/&#34;&gt;Kubernetes Community Days: Czech &amp;amp; Slovak&lt;/a&gt;：2026 年 5 月 21 日｜捷克 Prague&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**June 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 6 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- KCD - [Kubernetes Community Days: New York](https://community.cncf.io/events/details/cncf-kcd-new-york-presents-kcd-new-york-2026/): June 10, 2026 | New York, USA
- [KubeCon + CloudNativeCon India 2026: June 18-19, 2026](https://events.linuxfoundation.org/kubecon-cloudnativecon-india/) | Mumbai, India
--&gt;
&lt;ul&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-new-york-presents-kcd-new-york-2026/&#34;&gt;Kubernetes Community Days: New York&lt;/a&gt;：2026 年 6 月 10 日｜美国 New York&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://events.linuxfoundation.org/kubecon-cloudnativecon-india/&#34;&gt;KubeCon + CloudNativeCon India 2026：2026 年 6 月 18-19 日&lt;/a&gt;｜印度 Mumbai&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**July 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 7 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- [KubeCon + CloudNativeCon Japan 2026: July 29-30, 2026](https://events.linuxfoundation.org/kubecon-cloudnativecon-japan/) | Yokohama, Japan
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://events.linuxfoundation.org/kubecon-cloudnativecon-japan/&#34;&gt;KubeCon + CloudNativeCon Japan 2026：2026 年 7 月 29-30 日&lt;/a&gt;｜日本 Yokohama&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**September 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 9 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- [KubeCon + CloudNativeCon China 2026: September 8-9, 2026](https://www.lfopensource.cn/kubecon-cloudnativecon-openinfra-summit-pytorch-conference-china/) | Shanghai, China
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.lfopensource.cn/kubecon-cloudnativecon-openinfra-summit-pytorch-conference-china/&#34;&gt;KubeCon + CloudNativeCon China 2026：2026 年 9 月 8-9 日&lt;/a&gt;｜中国上海&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**October 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 10 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- KCD - [Kubernetes Community Days: UK: Oct 19, 2026](https://community.cncf.io/events/details/cncf-kcd-uk-presents-kubernetes-community-days-uk-edinburgh-2026/) | Edinburgh, UK
--&gt;
&lt;ul&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-uk-presents-kubernetes-community-days-uk-edinburgh-2026/&#34;&gt;Kubernetes Community Days: UK：2026 年 10 月 19 日&lt;/a&gt;｜英国 Edinburgh&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**November 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 11 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- KCD - [Kubernetes Community Days: Porto](https://community.cncf.io/events/details/cncf-kcd-porto-presents-kcd-porto-2026-collab-with-devops-days-portugal/): Nov 19, 2026 | Porto, Portugal
- [KubeCon + CloudNativeCon North America 2026](https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/): Nov 9-12, 2026 | Salt Lake, USA
--&gt;
&lt;ul&gt;
&lt;li&gt;KCD - &lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-porto-presents-kcd-porto-2026-collab-with-devops-days-portugal/&#34;&gt;Kubernetes Community Days: Porto&lt;/a&gt;：2026 年 11 月 19 日｜葡萄牙 Porto&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://events.linuxfoundation.org/kubecon-cloudnativecon-north-america/&#34;&gt;KubeCon + CloudNativeCon North America 2026&lt;/a&gt;：2026 年 11 月 9-12 日｜美国 Salt Lake&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
You can find the latest event details [here](https://community.cncf.io/events/#/list).
--&gt;
&lt;p&gt;你可以在&lt;a href=&#34;https://community.cncf.io/events/#/list&#34;&gt;此处&lt;/a&gt;查看最新活动详情。&lt;/p&gt;
&lt;!--
## Upcoming Release Webinar
--&gt;
&lt;h2 id=&#34;upcoming-release-webinar&#34;&gt;即将举行的发布网络研讨会  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#upcoming-release-webinar&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Join members of the Kubernetes v1.36 Release Team on **Wednesday, May 20th 2026 at 4:00 PM (UTC)** to learn about the release highlights
of this release. For more information and registration, visit the [event page](https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cloud-native-live-kubernetes-v136-release/) on the CNCF Online Programs site.
--&gt;
&lt;p&gt;欢迎在 &lt;strong&gt;2026 年 5 月 20 日（星期三）16:00（UTC）&lt;/strong&gt; 与 Kubernetes v1.36 发布团队成员一起，
了解本次发布的重点亮点。
有关更多信息与注册方式，请访问 CNCF Online Programs 网站上的&lt;a href=&#34;https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cloud-native-live-kubernetes-v136-release/&#34;&gt;活动页面&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Get Involved
--&gt;
&lt;h2 id=&#34;get-involved&#34;&gt;参与其中  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#get-involved&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The simplest way to get involved with Kubernetes is by joining one of the many [Special Interest Groups](https://github.com/kubernetes/community/blob/master/sig-list.md) (SIGs) that align with your interests. 
Have something you’d like to broadcast to the Kubernetes community? Share your voice at our weekly [community meeting](https://github.com/kubernetes/community/tree/master/communication), 
and through the channels below. Thank you for your continued feedback and support.
--&gt;
&lt;p&gt;参与 Kubernetes 最简单的方式之一，
是加入与你兴趣相符的众多&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-list.md&#34;&gt;特别兴趣小组（Special Interest Groups，SIG）&lt;/a&gt;之一。
你想向 Kubernetes 社区发布一些内容吗？
欢迎在我们每周的&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/communication&#34;&gt;社区会议&lt;/a&gt;上发声，
也可以通过以下渠道参与交流。感谢你持续的反馈与支持。&lt;/p&gt;
&lt;!--
- Follow us on Bluesky [@kubernetes.io](https://bsky.app/profile/kubernetes.io) for the latest updates
- Join the community discussion on [Discuss](https://discuss.kubernetes.io/)
- Join the community on [Slack](https://slack.k8s.io/)
- Post questions (or answer questions) on [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes)
- Share your Kubernetes [story](https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform)
- Read more about what’s happening with Kubernetes on the [blog](https://kubernetes.io/blog/)
- Learn more about the [Kubernetes Release Team](https://github.com/kubernetes/sig-release/tree/master/release-team)
--&gt;
&lt;ul&gt;
&lt;li&gt;在 Bluesky 关注我们 &lt;a href=&#34;https://bsky.app/profile/kubernetes.io&#34;&gt;@kubernetes.io&lt;/a&gt; 获取最新动态&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;https://discuss.kubernetes.io/&#34;&gt;Discuss&lt;/a&gt; 加入社区讨论&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;https://slack.k8s.io/&#34;&gt;Slack&lt;/a&gt; 加入社区&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;https://stackoverflow.com/questions/tagged/kubernetes&#34;&gt;Stack Overflow&lt;/a&gt; 提问（或回答问题）&lt;/li&gt;
&lt;li&gt;分享你的 Kubernetes &lt;a href=&#34;https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform&#34;&gt;故事&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;在&lt;a href=&#34;https://kubernetes.io/blog/&#34;&gt;博客&lt;/a&gt;阅读更多 Kubernetes 最新动态&lt;/li&gt;
&lt;li&gt;进一步了解 &lt;a href=&#34;https://github.com/kubernetes/sig-release/tree/master/release-team&#34;&gt;Kubernetes 发布团队&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.36 抢先一览</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/30/kubernetes-v1-36-sneak-peek/</link>
      <pubDate>Mon, 30 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/30/kubernetes-v1-36-sneak-peek/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#39;Kubernetes v1.36 Sneak Peek&#39;
date: 2026-03-30
slug: kubernetes-v1-36-sneak-peek
author: &gt;
  Chad Crowell,
  Kirti Goyal,
  Sophia Ugochukwu,
  Swathi Rao,
  Utkarsh Umre
--&gt;
&lt;!--
Kubernetes v1.36 is coming at the end of April 2026. This release will include removals and deprecations, and it is packed with an impressive number of
enhancements. Here are some of the features we are most excited about in this cycle!

Please note that this information reflects the current state of v1.36 development and may change before release.
--&gt;
&lt;p&gt;Kubernetes v1.36 将于 2026 年 4 月底发布。
本次发布将包含移除和弃用项，并带来数量可观的增强功能。
以下是我们在这个发布周期中最期待的一些特性。&lt;/p&gt;
&lt;p&gt;请注意，本文信息反映的是 v1.36 开发的当前状态，发布前仍可能发生变化。&lt;/p&gt;
&lt;!--
## The Kubernetes API removal and deprecation process
--&gt;
&lt;h2 id=&#34;the-kubernetes-api-removal-and-deprecation-process&#34;&gt;Kubernetes API 的移除与弃用流程&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#the-kubernetes-api-removal-and-deprecation-process&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The Kubernetes project has a well-documented [deprecation policy](/docs/reference/using-api/deprecation-policy/) for features. This policy states that stable APIs
may only be deprecated when a newer, stable version of that same API is available and that APIs have a minimum lifetime for each stability level. A deprecated API
has been marked for removal in a future Kubernetes release. It will continue to function until removal (at least one year from the deprecation), but usage will
result in a warning being displayed. Removed APIs are no longer available in the current version, at which point you must migrate to using the replacement.
--&gt;
&lt;p&gt;Kubernetes 项目针对功能有一套文档完善的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/using-api/deprecation-policy/&#34;&gt;弃用策略&lt;/a&gt;。
该策略规定，稳定版 API 只有在有新的稳定替代版本时才会被弃用，并且 API 在每个稳定级别都有最短生命周期。
被弃用的 API 会被标记为将在未来 Kubernetes 版本中移除。
它在移除前会继续工作（自弃用起至少一年），但使用时会显示告警。
被移除的 API 在当前版本中将不再可用，此时你必须迁移到替代方案。&lt;/p&gt;
&lt;!--
- Generally available (GA) or stable API versions may be marked as deprecated but must not be removed within a major version of Kubernetes.
- Beta or pre-release API versions must be supported for 3 releases after the deprecation.
- Alpha or experimental API versions may be removed in any release without prior deprecation notice; this process can become a withdrawal in cases where a different implementation for the same feature is already in place.
--&gt;
&lt;ul&gt;
&lt;li&gt;正式可用（GA）或稳定版 API 可以标记为弃用，但不得在 Kubernetes 的一个主版本内被移除。&lt;/li&gt;
&lt;li&gt;Beta 或预发布 API 版本在弃用后必须继续支持 3 个版本。&lt;/li&gt;
&lt;li&gt;Alpha 或实验性 API 版本可以在任何版本中移除，无需提前发出弃用通知；在同一功能已有不同实现时，此过程也可能变为撤回。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Whether an API is removed as a result of a feature graduating from beta to stable, or because that API simply did not succeed, all removals comply with this
deprecation policy. Whenever an API is removed, migration options are communicated in the [deprecation guide](/docs/reference/using-api/deprecation-guide/).
--&gt;
&lt;p&gt;无论 API 被移除是因为某功能从 beta 晋升到稳定，还是因为该 API 本身未能成功升级，所有移除都遵循这一弃用策略。
每当 API 被移除时，&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/using-api/deprecation-guide/&#34;&gt;弃用指南&lt;/a&gt;都会提供迁移选项。&lt;/p&gt;
&lt;!--
A recent example of this principle in action is the retirement of the ingress-nginx project, announced
by SIG-Security on March 24, 2026. As stewardship shifts away from the project, the community has been
encouraged to evaluate alternative ingress controllers that align with current security and maintenance
best practices. This transition reflects the same lifecycle discipline that underpins Kubernetes itself,
ensuring continued evolution without abrupt disruption.
--&gt;
&lt;p&gt;这一原则近期的一个实践案例是 ingress-nginx 项目的退役，该消息由 SIG-Security 于 2026 年 3 月 24 日宣布。
随着项目维护权发生变化，社区被鼓励评估符合当前安全与维护最佳实践的替代的 Ingress 控制器实现。
这一过渡体现了支撑 Kubernetes 本身的同一生命周期原则，
确保持续演进且不造成突发中断。&lt;/p&gt;
&lt;!--
## Ingress NGINX retirement
--&gt;
&lt;h2 id=&#34;ingress-nginx-retirement&#34;&gt;Ingress NGINX 退役&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ingress-nginx-retirement&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To prioritize the safety and security of the ecosystem, Kubernetes SIG Network and the Security Response Committee have retired Ingress NGINX on March 24, 2026.
Since that date, there have been no further releases, no bugfixes, and no updates to resolve any security vulnerabilities discovered. Existing deployments of
Ingress NGINX will continue to function, and installation artifacts like Helm charts and container images will remain available.

For full details, see the [official retirement announcement](/blog/2025/11/11/ingress-nginx-retirement/).
--&gt;
&lt;p&gt;为优先保障生态系统的安全，Kubernetes SIG Network 和安全响应委员会（Security Response Committee）
已于 2026 年 3 月 24 日退役 Ingress NGINX。
自该日期起，不再发布后续版本、不再修复缺陷，也不再更新以修复新发现的安全漏洞。
现有 Ingress NGINX 部署将继续运行，Helm Chart 和容器镜像等安装制品也将继续可用。&lt;/p&gt;
&lt;p&gt;完整详情请参阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/11/11/ingress-nginx-retirement/&#34;&gt;官方退役公告&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Deprecations and removals for Kubernetes v1.36
--&gt;
&lt;h2 id=&#34;deprecations-and-removals-for-kubernetes-v136&#34;&gt;Kubernetes v1.36 的弃用和移除&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecations-and-removals-for-kubernetes-v136&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Deprecation of `.spec.externalIPs` in Service
--&gt;
&lt;h3 id=&#34;deprecation-of-specexternalips-in-service&#34;&gt;Service 中 &lt;code&gt;.spec.externalIPs&lt;/code&gt; 的弃用&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecation-of-specexternalips-in-service&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The `externalIPs` field in Service `spec` is being deprecated, which means you’ll soon lose a quick way to route arbitrary externalIPs to your Services. This
field has been a known security headache for years, enabling man-in-the-middle attacks on your cluster traffic, as documented in [CVE-2020-8554](https://github.com/kubernetes/kubernetes/issues/970760). From Kubernetes v1.36 and onwards, you will see deprecation warnings when using it, with full removal
planned for v1.43.

If your Services still lean on `externalIPs`, consider using LoadBalancer services for cloud-managed ingress, NodePort for simple port exposure, or Gateway API
for a more flexible and secure way to handle external traffic.

For more details on this enhancement, refer to [KEP-5707: Deprecate service.spec.externalIPs](https://kep.k8s.io/5707)
--&gt;
&lt;p&gt;Service &lt;code&gt;spec&lt;/code&gt; 中的 &lt;code&gt;externalIPs&lt;/code&gt; 字段正在被弃用，这意味着你很快将失去把任意 externalIPs 路由到 Service 的快捷方式。
这个字段多年来一直是已知的安全隐患，会让集群流量面临中间人攻击风险，如 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/970760&#34;&gt;CVE-2020-8554&lt;/a&gt; 所述。
Kubernetes v1.36 起该字段会触发弃用告警，并计划在 v1.43 移除。&lt;/p&gt;
&lt;p&gt;如果你的 Service 仍依赖 &lt;code&gt;externalIPs&lt;/code&gt;，可考虑使用 LoadBalancer 服务处理云托管入口、使用 NodePort 做简单端口暴露，
或使用 Gateway API 以更灵活且更安全的方式处理外部流量。&lt;/p&gt;
&lt;p&gt;关于此增强功能的更多细节，请参阅 &lt;a href=&#34;https://kep.k8s.io/5707&#34;&gt;KEP-5707：弃用 service.spec.externalIPs&lt;/a&gt;&lt;/p&gt;
&lt;!--
### Removal of `gitRepo` volume driver
--&gt;
&lt;h3 id=&#34;removal-of-gitrepo-volume-driver&#34;&gt;&lt;code&gt;gitRepo&lt;/code&gt; 卷驱动的移除&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#removal-of-gitrepo-volume-driver&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The gitRepo volume type has been deprecated since v1.11. Starting Kubernetes v1.36, the `gitRepo` volume plugin is permanently disabled and cannot be turned back
on. This change protects clusters from a critical security issue where using `gitRepo` could let an attacker run code as root on the node.

Although `gitRepo` has been deprecated for years and better alternatives have been recommended, it was still technically possible to use it in previous releases.
From v1.36 onward, that path is closed for good, so any existing workloads depending on `gitRepo` will need to migrate to supported approaches such as init
containers or external git-sync style tools.

For more details on this enhancement, refer to [KEP-5040: Remove gitRepo volume driver](https://kep.k8s.io/5040)
--&gt;
&lt;p&gt;&lt;code&gt;gitRepo&lt;/code&gt; 卷类型自 v1.11 起已被弃用。
从 Kubernetes v1.36 开始，&lt;code&gt;gitRepo&lt;/code&gt; 卷插件将被永久禁用，且无法重新启用。
此变更可保护集群免受关键安全问题影响，因为使用 &lt;code&gt;gitRepo&lt;/code&gt; 可能让攻击者以 root 身份在节点上运行代码。&lt;/p&gt;
&lt;p&gt;尽管 &lt;code&gt;gitRepo&lt;/code&gt; 多年来一直处于弃用状态，且已有更好的替代方案被推荐，但在此前版本中它在技术上仍可使用。
从 v1.36 开始，这条路径将被永久关闭，因此任何依赖 &lt;code&gt;gitRepo&lt;/code&gt; 的现有工作负载都需要迁移到受支持方案，例如 init 容器或外部 git-sync 风格工具。&lt;/p&gt;
&lt;p&gt;关于此增强功能的更多细节，请参阅 &lt;a href=&#34;https://kep.k8s.io/5040&#34;&gt;KEP-5040：移除 gitRepo 卷驱动&lt;/a&gt;&lt;/p&gt;
&lt;!--
## Featured enhancements of Kubernetes v1.36

The following list of enhancements is likely to be included in the upcoming v1.36 release. This is not a commitment and the release content is subject to change.
--&gt;
&lt;h2 id=&#34;featured-enhancements-of-kubernetes-v136&#34;&gt;Kubernetes v1.36 的重点增强功能&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#featured-enhancements-of-kubernetes-v136&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;以下增强功能很可能包含在即将发布的 v1.36 中。
这不是承诺，发布内容仍可能发生变化。&lt;/p&gt;
&lt;!--
### Faster SELinux labelling for volumes (GA) {#volume-selinux-labelling}

Kubernetes v1.36 makes the SELinux volume mounting improvement generally available. This change replaced recursive file relabeling with `mount -o context=XYZ` option, applying the correct SELinux label to the entire volume at mount time. It brings more consistent performance and reduces Pod startup delays on SELinux-enforcing systems.

This feature was introduced as beta in v1.28 for `ReadWriteOncePod` volumes. In v1.32, it gained metrics and an opt-out option
(`securityContext.seLinuxChangePolicy: Recursive`) to help catch conflicts. Now in v1.36, it reaches stable and defaults to all volumes, with Pods or
CSIDrivers opting in via `spec.SELinuxMount`.

However, we expect this feature to create the risk of breaking changes in the future Kubernetes releases, due to the potential for mixing of privileged and unprivileged pods.
Setting the `seLinuxChangePolicy` field and
SELinux volume labels on Pods, correctly, is the responsibility of the Pod author
Developers have that responsibility whether they are writing a Deployment, StatefulSet, DaemonSet or even a custom resource that includes a Pod template.
Being careless
with these settings can lead to a range of problems when Pods share volumes.

For more details on this enhancement, refer to  [KEP-1710: Speed up recursive SELinux label change](https://kep.k8s.io/1710)
--&gt;
&lt;h3 id=&#34;volume-selinux-labelling&#34;&gt;卷的 SELinux 标签提速（GA）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#volume-selinux-labelling&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Kubernetes v1.36 将 SELinux 卷挂载改进提升为正式可用。
此变更用 &lt;code&gt;mount -o context=XYZ&lt;/code&gt; 选项替代了递归文件重标记，在挂载时为整个卷应用正确的 SELinux 标签。
它带来更一致的性能，并减少启用 SELinux 强制模式系统上的 Pod 启动延迟。&lt;/p&gt;
&lt;p&gt;该功能在 v1.28 作为 beta 引入，适用于 &lt;code&gt;ReadWriteOncePod&lt;/code&gt; 卷。
在 v1.32，它新增了指标和退出选项
（&lt;code&gt;securityContext.seLinuxChangePolicy: Recursive&lt;/code&gt;）以帮助发现冲突。
现在在 v1.36 进入稳定阶段，并将该机制扩展为默认面向所有卷；
Pod 或 CSIDriver 可通过 &lt;code&gt;spec.SELinuxMount&lt;/code&gt; 显式启用。&lt;/p&gt;
&lt;p&gt;不过，我们预计该功能在未来 Kubernetes 版本中可能带来破坏性变更风险，原因是可能混用特权和非特权 Pod。
正确设置 Pod 上的 &lt;code&gt;seLinuxChangePolicy&lt;/code&gt; 字段和 SELinux 卷标签，是 Pod 作者的责任。
无论开发者是在编写 Deployment、StatefulSet、DaemonSet，还是包含 Pod 模板的自定义资源，都需要承担这一责任。
对这些设置不够谨慎会在 Pod 共享卷时导致一系列问题。&lt;/p&gt;
&lt;p&gt;关于此增强功能的更多细节，请参阅 &lt;a href=&#34;https://kep.k8s.io/1710&#34;&gt;KEP-1710：加快递归 SELinux 标签变更&lt;/a&gt;&lt;/p&gt;
&lt;!--
### External signing of ServiceAccount tokens

As a beta feature, Kubernetes already supports external signing of ServiceAccount tokens. This allows clusters to integrate with external key management systems
or signing services instead of relying only on internally managed keys.

With this enhancement, the `kube-apiserver` can delegate token signing to external systems such as cloud key management services or hardware security modules. This
improves security and simplifies key management services for clusters that rely on centralized signing infrastructure.
We expect that this will graduate to stable (GA) in Kubernetes v1.36.

For more details on this enhancement, refer to [KEP-740: Support external signing of service account tokens](https://kep.k8s.io/740)
--&gt;
&lt;h3 id=&#34;external-signing-of-serviceaccount-tokens&#34;&gt;ServiceAccount Token 的外部签名&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#external-signing-of-serviceaccount-tokens&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;作为 beta 功能，Kubernetes 已支持 ServiceAccount Token 的外部签名。
这使集群可以集成外部密钥管理系统或签名服务，而不只依赖内部管理密钥。&lt;/p&gt;
&lt;p&gt;通过这一增强，&lt;code&gt;kube-apiserver&lt;/code&gt; 可以将令牌签名委托给外部系统，例如云密钥管理服务或硬件安全模块。
这提升了安全性，并简化了依赖集中式签名基础设施的集群的密钥管理。
我们预计它将在 Kubernetes v1.36 升级为稳定（GA）。&lt;/p&gt;
&lt;p&gt;关于此增强功能的更多细节，请参阅 &lt;a href=&#34;https://kep.k8s.io/740&#34;&gt;KEP-740：支持服务账户令牌的外部签名&lt;/a&gt;&lt;/p&gt;
&lt;!--
### DRA Driver support for Device taints and tolerations

Kubernetes v1.33 introduced support for taints and tolerations for physical devices managed through [Dynamic Resource Allocation (DRA)](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/). Normally, any device can be
used for scheduling. However, this enhancement allows DRA drivers to mark devices as tainted, which ensures that they will not be used for scheduling purposes.
Alternatively, cluster administrators can create a `DeviceTaintRule` to mark devices that match a certain selection criteria(such as all devices of a certain
driver) as tainted. This improves scheduling control and helps ensure that specialized hardware resources are only used by workloads that explicitly request them.

In Kubernetes v1.36, this feature graduates to beta with more comprehensive testing complete, making it accessible by default without the need for a feature
flag and open to user feedback.

To learn about taints and tolerations, see [taints and tolerations](/docs/concepts/scheduling-eviction/taint-and-toleration/).
For more details on this enhancement, refer to [KEP-5055: DRA: device taints and tolerations](https://kep.k8s.io/5055).
--&gt;
&lt;h3 id=&#34;dra-driver-support-for-device-taints-and-tolerations&#34;&gt;DRA 驱动对设备污点和容忍的支持&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#dra-driver-support-for-device-taints-and-tolerations&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Kubernetes v1.33 引入了对通过&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/&#34;&gt;动态资源分配（DRA）&lt;/a&gt;管理的物理设备的污点和容忍支持。
通常，任何设备都可用于调度。
但这一增强允许 DRA 驱动将设备标记为污点，从而确保这些设备不会用于调度。
或者，集群管理员可创建 &lt;code&gt;DeviceTaintRule&lt;/code&gt;，将符合特定选择条件（例如某个驱动的所有设备）的设备标记为污点。
这改进了调度控制，并有助于确保专用硬件资源仅被显式请求它们的工作负载使用。&lt;/p&gt;
&lt;p&gt;在 Kubernetes v1.36 中，该功能在完成更全面测试后升级为 beta，默认可用，无需功能开关，并向用户反馈开放。&lt;/p&gt;
&lt;p&gt;要了解污点和容忍，请参阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/&#34;&gt;污点和容忍&lt;/a&gt;。
关于此增强功能的更多细节，请参阅 &lt;a href=&#34;https://kep.k8s.io/5055&#34;&gt;KEP-5055：DRA：设备污点和容忍&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### DRA support for partitionable devices

Kubernetes v1.36 expands Dynamic Resource Allocation (DRA) by introducing support for partitionable devices, allowing a single hardware accelerator to be split
into multiple logical units that can be shared across workloads.  This is especially useful for high-cost resources like GPUs, where dedicating an entire device
to a single workload can lead to underutilization.

With this enhancement, platform teams can improve overall cluster efficiency by allocating only the required portion of a device to each workload, rather than
reserving it entirely. This makes it easier to run multiple workloads on the same hardware while maintaining isolation and control, helping organizations get more
value out of their infrastructure.

To learn more about this enhancement, refer to [KEP-4815: DRA Partitionable Devices](https://kep.k8s.io/4815)
--&gt;
&lt;h3 id=&#34;dra-support-for-partitionable-devices&#34;&gt;DRA 对可分区设备的支持&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#dra-support-for-partitionable-devices&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Kubernetes v1.36 通过引入对可分区设备的支持扩展了动态资源分配（DRA），
允许将单个硬件加速器拆分为多个可在工作负载之间共享的逻辑单元。
这对 GPU 等高成本资源尤其有用，因为将整个设备独占给单个工作负载可能导致利用不足。&lt;/p&gt;
&lt;p&gt;通过这一增强，平台团队可以通过仅为每个工作负载分配所需设备份额来提升整体集群效率，而不是完整预留设备。
这使得在保持隔离和控制的同时，更容易在同一硬件上运行多个工作负载，
帮助组织从其基础设施中获得更多价值。&lt;/p&gt;
&lt;p&gt;要了解更多信息，请参阅 &lt;a href=&#34;https://kep.k8s.io/4815&#34;&gt;KEP-4815：DRA 可分区设备&lt;/a&gt;&lt;/p&gt;
&lt;!--
## Want to know more?

New features and deprecations are also announced in the Kubernetes release notes. We will formally announce what&#39;s new in [Kubernetes v1.36](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.36.md) as part of the CHANGELOG for that release.

Kubernetes v1.36 release is planned for Wednesday, April 22, 2026. Stay tuned for updates!

You can also see the announcements of changes in the release notes for:
--&gt;
&lt;h2 id=&#34;want-to-know-more&#34;&gt;想了解更多？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#want-to-know-more&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kubernetes 发布说明也会发布新功能和弃用信息。
我们将在该版本的 CHANGELOG 中正式公布 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.36.md&#34;&gt;Kubernetes v1.36&lt;/a&gt; 的更新内容。&lt;/p&gt;
&lt;p&gt;Kubernetes v1.36 计划于 2026 年 4 月 22 日（周三）发布。请持续关注后续更新。&lt;/p&gt;
&lt;p&gt;你也可以在以下版本的发布说明中查看变更公告：&lt;/p&gt;
&lt;!--
- [Kubernetes v1.35](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.35.md)
- [Kubernetes v1.34](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.34.md)
- [Kubernetes v1.33](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.33.md)
- [Kubernetes v1.32](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.32.md)
- [Kubernetes v1.31](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.31.md)
- [Kubernetes v1.30](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.30.md)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.35.md&#34;&gt;Kubernetes v1.35&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.34.md&#34;&gt;Kubernetes v1.34&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.33.md&#34;&gt;Kubernetes v1.33&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.32.md&#34;&gt;Kubernetes v1.32&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.31.md&#34;&gt;Kubernetes v1.31&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.30.md&#34;&gt;Kubernetes v1.30&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Get involved

The simplest way to get involved with Kubernetes is by joining one of the many [Special Interest Groups](https://github.com/kubernetes/community/blob/master/siglist.md) (SIGs) that align with your interests. Have something you’d like to broadcast to the Kubernetes community? Share your voice at our weekly
[community meeting](https://github.com/kubernetes/community/tree/master/communication), and through the channels below. Thank you for your continued feedback and support.

- Follow us on Bluesky [@kubernetes.io](https://bsky.app/profile/kubernetes.io) for the latest updates
- Join the community discussion on [Discuss](https://discuss.kubernetes.io/)
- Join the community on [Slack](http://slack.k8s.io/)
- Post questions (or answer questions) on [Server Fault](https://serverfault.com/questions/tagged/kubernetes) or [Stack Overflow](http://stackoverflow.com/questions/tagged/kubernetes)
- Share your Kubernetes [story](https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform)
- Read more about what’s happening with Kubernetes on the [blog](https://kubernetes.io/blog/)
- Learn more about the [Kubernetes Release Team](https://github.com/kubernetes/sig-release/tree/master/release-team)
--&gt;
&lt;h2 id=&#34;get-involved&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#get-involved&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;参与 Kubernetes 最简单的方式是加入与你兴趣匹配的众多&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/siglist.md&#34;&gt;特别兴趣小组&lt;/a&gt;（SIG）之一。
如果你有想向 Kubernetes 社区分享的内容，欢迎在我们的每周&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/communication&#34;&gt;社区会议&lt;/a&gt;
以及下列渠道中发声。感谢你持续的反馈与支持。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;在 Bluesky 关注我们 &lt;a href=&#34;https://bsky.app/profile/kubernetes.io&#34;&gt;@kubernetes.io&lt;/a&gt; 获取最新动态&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;https://discuss.kubernetes.io/&#34;&gt;Discuss&lt;/a&gt; 加入社区讨论&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;http://slack.k8s.io/&#34;&gt;Slack&lt;/a&gt; 加入社区&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;https://serverfault.com/questions/tagged/kubernetes&#34;&gt;Server Fault&lt;/a&gt; 或 &lt;a href=&#34;https://stackoverflow.com/questions/tagged/kubernetes&#34;&gt;Stack Overflow&lt;/a&gt; 提问（或回答问题）&lt;/li&gt;
&lt;li&gt;分享你的 Kubernetes &lt;a href=&#34;https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform&#34;&gt;故事&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;在&lt;a href=&#34;https://kubernetes.io/blog/&#34;&gt;博客&lt;/a&gt;阅读更多 Kubernetes 最新动态&lt;/li&gt;
&lt;li&gt;进一步了解 &lt;a href=&#34;https://github.com/kubernetes/sig-release/tree/master/release-team&#34;&gt;Kubernetes Release Team&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Ingress2Gateway 1.0 正式发布：通往 Gateway API 的途径</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/20/ingress2gateway-1-0-release/</link>
      <pubDate>Fri, 20 Mar 2026 11:00:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/20/ingress2gateway-1-0-release/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Announcing Ingress2Gateway 1.0: Your Path to Gateway API&#34;
slug: ingress2gateway-1-0-release
author: &gt;
    [Beka Modebadze](https://github.com/bexxmodd) (Google),
    [Steven Jin](https://github.com/Stevenjin8) (Microsoft)
date: 2026-03-20T11:00:00-08:00
--&gt;
&lt;!--
With the Ingress-NGINX [retirement](/blog/2025/11/11/ingress-nginx-retirement/) scheduled for March 2026, the Kubernetes networking landscape is at a turning point.
For most organizations, the question isn&#39;t whether to migrate to [Gateway API](https://gateway-api.sigs.k8s.io/), but how to do so safely.

Migrating from Ingress to Gateway API is a fundamental shift in API design.
Gateway API provides a modular, extensible API with strong support for Kubernetes-native RBAC.
Conversely, the Ingress API is simple, and implementations such as Ingress-NGINX extend the API through esoteric annotations, ConfigMaps, and CRDs.
Migrating away from Ingress controllers such as Ingress-NGINX presents the daunting task of capturing all the nuances of the Ingress controller,
and mapping that behavior to Gateway API.
--&gt;
&lt;p&gt;随着 Ingress-NGINX 计划于 2026 年 3 月正式退役，Kubernetes 网络图景正处于一个转折点。
对于大多数组织而言，问题不在于是否迁移到 Gateway API，而在于如何安全地完成迁移。&lt;/p&gt;
&lt;p&gt;从 Ingress 迁移到 Gateway API 是 API 设计的根本性转变。
Gateway API 提供了一个模块化、可扩展的 API，并对 Kubernetes 原生的基于角色的访问控制（RBAC）提供了强大的支持。
相反，Ingress API 较为简单，而像 Ingress-NGINX 这样的实现则通过晦涩难懂的注解、ConfigMap 和 CRD 来扩展 API。
从 Ingress-NGINX 等 Ingress 控制器迁移过来，面临着一项艰巨的任务：
捕捉 Ingress 控制器的所有细微差别，并将这种行为映射到 Gateway API。&lt;/p&gt;
&lt;!--
Ingress2Gateway is an assistant that helps teams confidently move from Ingress to Gateway API.
It translates Ingress resources/manifests along with implementation-specific annotations to Gateway API while warning you about untranslatable configuration and offering suggestions.

Today, SIG Network is proud to announce the **1.0 release of Ingress2Gateway**.
This milestone represents a stable, tested migration assistant for teams ready to modernize their networking stack.
--&gt;
&lt;p&gt;Ingress2Gateway 是一款辅助工具，旨在帮助团队自信地从 Ingress API 迁移到 Gateway API。
它会将 Ingress 资源/清单以及特定于实现的注解转换为 Gateway API，并在出现无法转换的配置时发出警告并提供建议。&lt;/p&gt;
&lt;p&gt;今天，SIG Network 自豪地宣布 Ingress2Gateway 1.0 版本正式发布。
这一里程碑标志着 Ingress2Gateway 正式上线，它是一款稳定且经过测试的迁移辅助工具，能够帮助团队实现网络架构的现代化。&lt;/p&gt;
&lt;!--
## Ingress2Gateway 1.0

### Ingress-NGINX annotation support

The main improvement for the 1.0 release is more comprehensive Ingress-NGINX support.
Before the 1.0 release, Ingress2Gateway only supported three Ingress-NGINX annotations.
For the 1.0 release, Ingress2Gateway supports over 30 common annotations (CORS, backend TLS, regex matching, path rewrite, etc.).
--&gt;
&lt;h2 id=&#34;ingress2gateway-1-0&#34;&gt;Ingress2Gateway 1.0&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ingress2gateway-1-0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3 id=&#34;ingress-nginx-注解支持&#34;&gt;Ingress-NGINX 注解支持&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ingress-nginx-%e6%b3%a8%e8%a7%a3%e6%94%af%e6%8c%81&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;1.0 版本的主要改进在于更全面的 Ingress-NGINX 支持。
在 1.0 版本之前，Ingress2Gateway 仅支持三种 Ingress-NGINX 注解。
在 1.0 版本中，Ingress2Gateway 支持超过 30 种常用注解（CORS、后端 TLS、正则表达式匹配、路径重写等）。&lt;/p&gt;
&lt;!--
### Comprehensive integration testing

Each supported Ingress-NGINX annotation, and representative combinations of common annotations, is backed by controller-level integration tests that verify the behavioral equivalence of the Ingress-NGINX configuration and the generated Gateway API.
These tests exercise real controllers in live clusters and compare runtime behavior (routing, redirects, rewrites, etc.), not just YAML structure.
--&gt;
&lt;h3 id=&#34;全面的集成测试&#34;&gt;全面的集成测试&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%85%a8%e9%9d%a2%e7%9a%84%e9%9b%86%e6%88%90%e6%b5%8b%e8%af%95&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;每个受支持的 Ingress-NGINX 注解以及常用注解的典型组合，都由控制器级别的集成测试提供支持，
以验证 Ingress-NGINX 配置与生成的 Gateway API 的行为等效性。&lt;/p&gt;
&lt;p&gt;这些测试在实际集群中运行，并比较运行时行为（路由、重定向、重写等），而不仅仅是 YAML 结构。&lt;/p&gt;
&lt;!--
The tests:

* spin up an Ingress-NGINX controller
* spin up multiple Gateway API controllers
* apply Ingress resources that have implementation-specific configuration
* translate Ingress resources to Gateway API with `ingress2gateway` and apply generated manifests
* verify that the Gateway API controllers and the Ingress controller exhibit equivalent behavior.

A comprehensive test suite not only catches bugs in development, but also ensures the correctness of the translation, especially given [surprising edge cases and unexpected defaults](/blog/2026/ingress-nginx-before-you-migrate),
so that you don&#39;t find out about them in production.
--&gt;
&lt;p&gt;测试内容：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;启动一个 Ingress-NGINX 控制器&lt;/li&gt;
&lt;li&gt;启动多个 Gateway API 控制器&lt;/li&gt;
&lt;li&gt;应用具有特定于实现的配置的 Ingress 资源&lt;/li&gt;
&lt;li&gt;使用 &lt;code&gt;ingress2gateway&lt;/code&gt; 将 Ingress 资源转换为 Gateway API，并应用生成的清单&lt;/li&gt;
&lt;li&gt;验证 Gateway API 控制器和 Ingress 控制器是否表现出相同的行为。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;一套全面的测试套件不仅可以捕获开发中的错误，还可以确保转换的正确性，
尤其是在考虑到&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/ingress-nginx-before-you-migrate&#34;&gt;意想不到的极端情况和意外的默认值&lt;/a&gt;的情况下，
从而避免在生产环境中发现这些问题。&lt;/p&gt;
&lt;!--
### Notification &amp; error handling

Migration is not a &#34;one-click&#34; affair.
Surfacing subtleties and untranslatable behavior is as important as translating supported configuration.
The 1.0 release cleans up the formatting and content of notifications, so it is clear what is missing and how you can fix it.
--&gt;
&lt;h3 id=&#34;通知与错误处理&#34;&gt;通知与错误处理&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%80%9a%e7%9f%a5%e4%b8%8e%e9%94%99%e8%af%af%e5%a4%84%e7%90%86&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;迁移并非“一键式”操作。
揭示细微差别和难以翻译的行为与翻译受支持的配置同样重要。
1.0 版本优化了通知的格式和内容，让你清楚地了解缺失的内容以及如何修复。&lt;/p&gt;
&lt;!--
## Using Ingress2Gateway

Ingress2Gateway is a migration assistant, not a one-shot replacement.
Its goal is to

* migrate supported Ingress configuration and behavior
* identify unsupported configuration and suggest alternatives
* reevaluate and potentially discard undesirable configuration

The rest of the section shows you how to safely migrate the following Ingress-NGINX configuration
--&gt;
&lt;h2 id=&#34;使用-ingress2gateway&#34;&gt;使用 Ingress2Gateway&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bd%bf%e7%94%a8-ingress2gateway&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ingress2Gateway 是一个迁移助手，而非一劳永逸的替代方案。&lt;/p&gt;
&lt;p&gt;它的目标是：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;迁移受支持的 Ingress 配置和行为&lt;/li&gt;
&lt;li&gt;识别不受支持的配置并提供替代方案&lt;/li&gt;
&lt;li&gt;重新评估并可能舍弃不理想的配置&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;本节的其余部分将向你展示如何安全地迁移以下 Ingress-NGINX 配置。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Ingress&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nginx.ingress.kubernetes.io/proxy-body-size&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;1G&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nginx.ingress.kubernetes.io/use-regex&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;true&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nginx.ingress.kubernetes.io/proxy-send-timeout&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nginx.ingress.kubernetes.io/proxy-read-timeout&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nginx.ingress.kubernetes.io/enable-cors&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;true&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nginx.ingress.kubernetes.io/configuration-snippet&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;|&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b44;font-style:italic&#34;&gt;      more_set_headers &amp;#34;Request-Id: $req_id&amp;#34;;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ingress&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;ingressClassName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;nginx&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;host&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-host.example.com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;http&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;paths&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;backend&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;              &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;service&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;                &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;website-service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;                &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;                  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;number&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;            &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;path&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;/users/(\d+)&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;            &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;pathType&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ImplementationSpecific&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tls&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hosts&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- my-host.example.com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;secretName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-secret&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### 1. Install Ingress2Gateway

If you have a Go environment set up, you can install Ingress2Gateway with
--&gt;
&lt;h3 id=&#34;1-安装-ingress-gateway&#34;&gt;1. 安装 Ingress Gateway&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#1-%e5%ae%89%e8%a3%85-ingress-gateway&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;如果你已设置好 Go 环境，则可以使用以下命令安装 Ingress Gateway：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go install github.com/kubernetes-sigs/ingress2gateway@v1.0.0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Otherwise,
--&gt;
&lt;p&gt;否则，&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;brew install ingress2gateway
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
You can also download the binary from [GitHub](https://github.com/kubernetes-sigs/ingress2gateway/releases/tag/v1.0.0) or [build from source](https://github.com/kubernetes-sigs/ingress2gateway/).

### 2. Run Ingress2Gateway

You can pass Ingress2Gateway Ingress manifests, or have the tool read directly from your cluster.
--&gt;
&lt;p&gt;你还可以从 &lt;a href=&#34;https://github.com/kubernetes-sigs/ingress2gateway/releases/tag/v1.0.0&#34;&gt;GitHub&lt;/a&gt;
下载二进制文件，或者&lt;a href=&#34;https://github.com/kubernetes-sigs/ingress2gateway/&#34;&gt;从源代码构建&lt;/a&gt;。&lt;/p&gt;
&lt;h3 id=&#34;2-运行-ingress2gateway&#34;&gt;2. 运行 Ingress2Gateway&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#2-%e8%bf%90%e8%a1%8c-ingress2gateway&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;你可以传递 Ingress2Gateway 的 Ingress 清单，或者让该工具直接从你的集群读取清单。&lt;/p&gt;
&lt;!--
```bash
# Pass it files
ingress2gateway print --input-file my-manifest.yaml,my-other-manifest.yaml --providers=ingress-nginx &gt; gwapi.yaml
# Use a namespace in your cluster
ingress2gateway print --namespace my-api --providers=ingress-nginx &gt; gwapi.yaml
# Or your whole cluster
ingress2gateway print --providers=ingress-nginx --all-namespaces &gt; gwapi.yaml
```
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 传递文件&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ingress2gateway print --input-file my-manifest.yaml,my-other-manifest.yaml --providers&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;ingress-nginx &amp;gt; gwapi.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 使用集群中的命名空间&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ingress2gateway print --namespace my-api --providers&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;ingress-nginx &amp;gt; gwapi.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 或者使用整个集群&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ingress2gateway print --providers&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;ingress-nginx --all-namespaces &amp;gt; gwapi.yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&#34;alert alert-info&#34; role=&#34;note&#34;&gt;&lt;h4 class=&#34;alert-heading&#34;&gt;说明：&lt;/h4&gt;&lt;!--
You can also pass `--emitter &lt;agentgateway|envoy-gateway|kgateway&gt;` to output implementation-specific extensions.
--&gt;
&lt;p&gt;你还可以传递 &lt;code&gt;--emitter &amp;lt;agentgateway|envoy-gateway|kgateway&amp;gt;&lt;/code&gt;
来输出特定于实现的扩展。&lt;/p&gt;&lt;/div&gt;

&lt;!--
### 3. Review the output

This is the most critical step.
The commands from the previous section output a Gateway API manifest to `gwapi.yaml`, and they also emit warnings that explain what did not translate exactly and what to review manually.
--&gt;
&lt;h3 id=&#34;3-检查输出&#34;&gt;3. 检查输出&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#3-%e6%a3%80%e6%9f%a5%e8%be%93%e5%87%ba&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;这是最关键的一步。&lt;/p&gt;
&lt;p&gt;上一节中的命令会将 Gateway API 清单输出到 &lt;code&gt;gwapi.yaml&lt;/code&gt; 文件，
同时还会发出警告，说明哪些内容翻译不准确以及需要手动检查哪些内容。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Gateway&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gateway.networking.k8s.io/generator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ingress2gateway-dev&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;nginx&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gatewayClassName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;nginx&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;listeners&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostname&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-host.example.com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-host-example-com-http&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;protocol&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostname&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-host.example.com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-host-example-com-https&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;443&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;protocol&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTPS&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tls&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;certificateRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;group&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Secret&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-secret&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTPRoute&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gateway.networking.k8s.io/generator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ingress2gateway-dev&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ingress-my-host-example-com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostnames&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- my-host.example.com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;parentRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;nginx&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;443&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;backendRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;website-service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;filters&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cors&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowCredentials&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowHeaders&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- DNT&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- Keep-Alive&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- User-Agent&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- X-Requested-With&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- If-Modified-Since&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- Cache-Control&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- Content-Type&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- Range&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- Authorization&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowMethods&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- GET&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- PUT&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- POST&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- DELETE&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- PATCH&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- OPTIONS&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowOrigins&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- &lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;maxAge&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;1728000&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;CORS&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matches&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;path&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;RegularExpression&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;(?i)/users/(\d+).*&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;rule-0&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;timeouts&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;request&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;10s&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTPRoute&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gateway.networking.k8s.io/generator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ingress2gateway-dev&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ingress-my-host-example-com-ssl-redirect&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostnames&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- my-host.example.com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;parentRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;nginx&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;filters&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requestRedirect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;scheme&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;https&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;statusCode&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;308&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;RequestRedirect&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Ingress2Gateway successfully translated some annotations into their Gateway API equivalents.
For example, the `nginx.ingress.kubernetes.io/enable-cors` annotation was translated into a CORS filter.
But upon closer inspection, the `nginx.ingress.kubernetes.io/proxy-{read,send}-timeout` and `nginx.ingress.kubernetes.io/proxy-body-size` annotations do not map perfectly.
The logs show the reason for these omissions as well as reasoning behind the translation.
--&gt;
&lt;p&gt;Ingress2Gateway 已成功将部分注解转换为对应的 Gateway API。
例如，&lt;code&gt;nginx.ingress.kubernetes.io/enable-cors&lt;/code&gt; 注解被转换为 CORS 过滤器。
但仔细检查后发现，&lt;code&gt;nginx.ingress.kubernetes.io/proxy-{read,send}-timeout&lt;/code&gt;
和 &lt;code&gt;nginx.ingress.kubernetes.io/proxy-body-size&lt;/code&gt; 注解并未完全映射。
日志显示了这些缺失的原因以及转换背后的逻辑。&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;┌─ WARN  ────────────────────────────────────────
│  Unsupported annotation nginx.ingress.kubernetes.io/configuration-snippet
│  source: INGRESS-NGINX
│  object: Ingress: my-ns/my-ingress
└─
┌─ INFO  ────────────────────────────────────────
│  Using case-insensitive regex path matches. You may want to change this.
│  source: INGRESS-NGINX
│  object: HTTPRoute: my-ns/my-ingress-my-host-example-com
└─
┌─ WARN  ────────────────────────────────────────
│  ingress-nginx only supports TCP-level timeouts; i2gw has made a best-effort translation to Gateway API timeouts.request. Please verify that this meets your needs. See documentation: https://gateway-api.sigs.k8s.io/guides/http-timeouts/
│  source: INGRESS-NGINX
│  object: HTTPRoute: my-ns/my-ingress-my-host-example-com
└─
┌─ WARN  ────────────────────────────────────────
│  Failed to apply my-ns.my-ingress.metadata.annotations.&amp;#34;nginx.ingress.kubernetes.io/proxy-body-size&amp;#34; from my-ns/my-ingress: Most Gateway API implementations have reasonable body size and buffering defaults
│  source: STANDARD_EMITTER
│  object: HTTPRoute: my-ns/my-ingress-my-host-example-com
└─
┌─ WARN  ────────────────────────────────────────
│  Gateway API does not support configuring URL normalization (RFC 3986, Section 6). Please check if this matters for your use case and consult implementation-specific details.
│  source: STANDARD_EMITTER
└─
&lt;/code&gt;&lt;/pre&gt;&lt;!--
There is a warning that Ingress2Gateway does not support the `nginx.ingress.kubernetes.io/configuration-snippet` annotation.
You will have to check your Gateway API implementation documentation to see if there is a way to achieve equivalent behavior.

The tool also notified us that Ingress-NGINX regex matches are case-insensitive prefix matches, which is why there is a match pattern of `(?i)/users/(\d+).*`.
Most organizations will want to change this behavior to be an exact case-sensitive match by removing the leading `(?i)` and the trailing `.*` from the path pattern.
--&gt;
&lt;p&gt;警告信息显示，Ingress2Gateway 不支持 &lt;code&gt;nginx.ingress.kubernetes.io/configuration-snippet&lt;/code&gt; 注解。
你需要查看 Gateway API 的实现文档，了解是否有其他方法可以实现相同的功能。&lt;/p&gt;
&lt;p&gt;该工具还提示我们，Ingress-NGINX 的正则表达式匹配是不区分大小写的前缀匹配，因此匹配模式为 &lt;code&gt;(?i)/users/(\d+).*&lt;/code&gt;。
大多数组织希望通过移除路径模式开头的 &lt;code&gt;(?i)&lt;/code&gt; 和结尾的 &lt;code&gt;.*&lt;/code&gt; 来将其更改为区分大小写的精确匹配。&lt;/p&gt;
&lt;!--
Ingress2Gateway made a best-effort translation from the `nginx.ingress.kubernetes.io/proxy-{send,read}-timeout` annotations to a 10 second [request timeout](https://gateway-api.sigs.k8s.io/guides/http-timeouts/) in our HTTP route.
If requests for this service should be much shorter, say 3 seconds, you can make the corresponding changes to your Gateway API manifests.

Also, `nginx.ingress.kubernetes.io/proxy-body-size` does not have a Gateway API equivalent, and was thus not translated.
However, most Gateway API implementations have reasonable defaults for maximum body size and buffering, so this might not be a problem in practice.
Further, some emitters might offer support for this annotation through implementation-specific extensions.
For example, adding the `--emitter agentgateway`, `--emitter envoy-gateway`, or `--emitter kgateway` flag to the previous `ingress2gateway print` command would have resulted in additional implementation-specific configuration in the generated Gateway API manifests that attempted to capture the body size configuration.
--&gt;
&lt;p&gt;Ingress2Gateway 已尽力将 &lt;code&gt;nginx.ingress.kubernetes.io/proxy-{send,read}-timeout&lt;/code&gt;
注解转换为 HTTP 路由中的 10 秒请求超时（https://gateway-api.sigs.k8s.io/guides/http-timeouts/）。
如果此服务的请求超时时间需要更短，例如 3 秒，你可以相应地修改 Gateway API 清单。&lt;/p&gt;
&lt;p&gt;此外，&lt;code&gt;nginx.ingress.kubernetes.io/proxy-body-size&lt;/code&gt; 在 Gateway API 中没有对应的注解，因此未进行转换。
但是，大多数 Gateway API 实现都为最大请求体大小和缓冲设置了合理的默认值，因此这在实践中可能不会造成问题。
此外，一些消息发送器可能会通过特定于实现的扩展来支持此注解。
例如，在之前的 &lt;code&gt;ingress2gateway print&lt;/code&gt; 命令中添加
&lt;code&gt;--emitter agentgateway&lt;/code&gt;、&lt;code&gt;--emitter envoy-gateway&lt;/code&gt; 或 &lt;code&gt;--emitter kgateway&lt;/code&gt;
标志，会在生成的 Gateway API 清单中添加额外的特定于实现的配置，以尝试捕获请求体大小配置。&lt;/p&gt;
&lt;!--
We also see a warning about URL normalization.
Gateway API implementations such as Agentgateway, Envoy Gateway, Kgateway, and Istio have some level of URL normalization, but the behavior varies across implementations and is not configurable through standard Gateway API.
You should check and test the URL normalization behavior of your Gateway API implementation to ensure it is compatible with your use case.

To match Ingress-NGINX default behavior, Ingress2Gateway also added a listener on port 80 and a [HTTP Request redirect filter](https://gateway-api.sigs.k8s.io/reference/spec/#httprequestredirectfilter) to redirect HTTP traffic to HTTPS.
You may not want to serve HTTP traffic at all and remove the listener on port 80 and the corresponding HTTPRoute.
--&gt;
&lt;p&gt;我们还看到了关于 URL 规范化的警告。
诸如 Agentgateway、Envoy Gateway、Kgateway 和 Istio 等网关 API
实现都具有一定程度的 URL 规范化功能，但不同实现的行为各不相同，且无法通过标准网关 API 进行配置。
你应该检查并测试你的网关 API 实现的 URL 规范化行为，以确保其与你的使用场景兼容。&lt;/p&gt;
&lt;p&gt;为了与 Ingress-NGINX 的默认行为保持一致，Ingress2Gateway 还在 80 端口上添加了一个监听器和一个
&lt;a href=&#34;https://gateway-api.sigs.k8s.io/reference/spec/#httprequestredirectfilter&#34;&gt;HTTP 请求重定向过滤器&lt;/a&gt;，
用于将 HTTP 流量重定向到 HTTPS。
你可能根本不需要处理 HTTP 流量，因此可以移除 80 端口上的监听器和相应的 HTTPRoute。&lt;/p&gt;
&lt;div class=&#34;alert alert-caution&#34; role=&#34;note&#34;&gt;&lt;h4 class=&#34;alert-heading&#34;&gt;注意：&lt;/h4&gt;&lt;!--
Always thoroughly review the generated output and logs.
--&gt;
&lt;p&gt;务必仔细检查生成的输出和日志。&lt;/p&gt;&lt;/div&gt;

&lt;!--
After manually applying these changes, the Gateway API manifests might look as follows.
--&gt;
&lt;p&gt;手动应用这些更改后，网关 API 清单可能如下所示。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Gateway&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gateway.networking.k8s.io/generator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ingress2gateway-dev&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;nginx&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gatewayClassName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;nginx&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;listeners&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostname&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-host.example.com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-host-example-com-https&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;443&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;protocol&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTPS&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tls&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;certificateRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;group&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Secret&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-secret&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTPRoute&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;annotations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gateway.networking.k8s.io/generator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ingress2gateway-dev&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ingress-my-host-example-com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostnames&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- my-host.example.com&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;parentRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;nginx&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;443&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;backendRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;website-service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;filters&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;cors&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowCredentials&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowHeaders&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- DNT&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;...&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowMethods&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- GET&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;...&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowOrigins&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- &lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;*&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;maxAge&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;1728000&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;CORS&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matches&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;path&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;RegularExpression&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;/users/(\d+)&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;rule-0&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;timeouts&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;request&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;3s&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### 4. Verify

Now that you have Gateway API manifests, you should thoroughly test them in a development cluster.
In this case, you should at least double-check that your Gateway API implementation&#39;s maximum body size defaults are appropriate for you and verify that a three-second timeout is enough.
--&gt;
&lt;h3 id=&#34;4-验证&#34;&gt;4. 验证&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#4-%e9%aa%8c%e8%af%81&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;现在你已经拥有了 Gateway API 清单文件，应该在开发集群中对其进行全面测试。
在这种情况下，你至少应该仔细检查 Gateway API
实现的最大请求体大小默认值是否符合你的需求，并验证三秒超时是否足够。&lt;/p&gt;
&lt;!--
After validating behavior in a development cluster, deploy your Gateway API configuration alongside your existing Ingress.
We strongly suggest that you then gradually shift traffic using weighted DNS, your cloud load balancer, or traffic-splitting features of your platform.
This way, you can quickly recover from any misconfiguration that made it through your tests.

Finally, when you have shifted all your traffic to your Gateway API controller, delete your Ingress resources and uninstall your Ingress controller.
--&gt;
&lt;p&gt;在开发集群中验证行为后，将你的 Gateway API 配置部署到现有 Ingress 旁边。
我们强烈建议你使用加权 DNS、云负载均衡器或平台流量拆分功能逐步转移流量。
这样，你可以快速从测试中遗留的任何配置错误中恢复。&lt;/p&gt;
&lt;p&gt;最后，当你将所有流量转移到 Gateway API 控制器后，请删除 Ingress 资源并卸载 Ingress 控制器。&lt;/p&gt;
&lt;!--
## Conclusion

The Ingress2Gateway 1.0 release is just the beginning, and we hope that you use Ingress2Gateway to safely migrate to Gateway API.
As we approach the March 2026 Ingress-NGINX retirement, we invite the community to help us increase our configuration coverage, expand testing, and improve UX.
--&gt;
&lt;h2 id=&#34;总结&#34;&gt;总结&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%80%bb%e7%bb%93&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ingress2Gateway 1.0 的发布仅仅是个开始，我们希望你能使用
Ingress2Gateway 安全地迁移到 Gateway API。
随着 Ingress-NGINX 将于 2026 年 3 月停止服务，
我们诚邀社区成员帮助我们提升配置覆盖率、扩展测试范围并改进用户体验。&lt;/p&gt;
&lt;!--
## Resources about Gateway API

The scope of Gateway API can be daunting.
Here are some resources to help you work with Gateway API:

* [Listener sets](https://gateway-api.sigs.k8s.io/geps/gep-1713/?h=listenersets) allow application developers to manage gateway listeners.
* [`gwctl`](https://github.com/kubernetes-sigs/gwctl) gives you a comprehensive view of your Gateway resources, such as attachments and linter errors.
* Gateway API Slack: `#sig-network-gateway-api` on [Kubernetes Slack](https://kubernetes.slack.com)
* Ingress2Gateway Slack: `#sig-network-ingress2gateway` on [Kubernetes Slack](https://kubernetes.slack.com)
* GitHub: [kubernetes-sigs/ingress2gateway](https://github.com/kubernetes-sigs/ingress2gateway)
--&gt;
&lt;h2 id=&#34;gateway-api-相关资源&#34;&gt;Gateway API 相关资源&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#gateway-api-%e7%9b%b8%e5%85%b3%e8%b5%84%e6%ba%90&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gateway API 的功能非常强大，可能会让你感到不知所措。
以下是一些可以帮助你使用 Gateway API 的资源：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gateway-api.sigs.k8s.io/geps/gep-1713/?h=listenersets&#34;&gt;监听器集&lt;/a&gt; 允许应用程序开发人员管理 Gateway 监听器。&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes-sigs/gwctl&#34;&gt;&lt;code&gt;gwctl&lt;/code&gt;&lt;/a&gt; 为你提供 Gateway 资源的全面视图，例如附件和代码检查错误。&lt;/li&gt;
&lt;li&gt;Gateway API Slack：Kubernetes Slack 频道上的 &lt;code&gt;#sig-network-gateway-api&lt;/code&gt; 讨论区（https://kubernetes.slack.com）&lt;/li&gt;
&lt;li&gt;Ingress2Gateway Slack：Kubernetes Slack 频道上的 &lt;code&gt;#sig-network-ingress2gateway&lt;/code&gt; 讨论区（https://kubernetes.slack.com）&lt;/li&gt;
&lt;li&gt;GitHub：&lt;a href=&#34;https://github.com/kubernetes-sigs/ingress2gateway&#34;&gt;kubernetes-sigs/ingress2gateway&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>在 Kubernetes 上使用 Agent Sandbox 运行智能体</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/20/running-agents-on-kubernetes-with-agent-sandbox/</link>
      <pubDate>Fri, 20 Mar 2026 10:00:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/20/running-agents-on-kubernetes-with-agent-sandbox/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Running Agents on Kubernetes with Agent Sandbox&#34;
date: 2026-03-20T10:00:00-08:00
slug: running-agents-on-kubernetes-with-agent-sandbox
author: &gt;
  [Janet Kuo](https://github.com/janetkuo)
  [Justin Santa Barbara](https://github.com/justinsb)
--&gt;
&lt;!--
The landscape of artificial intelligence is undergoing a massive architectural shift. In the early days of generative AI, interacting with a model was often treated as a transient, stateless function call: a request that spun up, executed for perhaps 50 milliseconds, and terminated.

Today, the world is witnessing AI v2 eating AI v1. The ecosystem is moving from short-lived, isolated tasks to deploying multiple, coordinated AI agents that run constantly. These autonomous agents need to maintain context, use external tools, write and execute code, and communicate with one another over extended periods.

As platform engineering teams look for the right infrastructure to host these new AI workloads, one platform stands out as the natural choice: Kubernetes. However, mapping these unique agentic workloads to traditional Kubernetes primitives requires a new abstraction.

This is where the new [Agent Sandbox](https://github.com/kubernetes-sigs/agent-sandbox) project (currently in development under SIG Apps) comes into play.
--&gt;
&lt;p&gt;人工智能领域正经历着一场巨大的架构变革。
在生成式人工智能的早期，与模型交互通常被视为一个瞬态的、无状态的函数调用：一个启动、执行可能仅
50 毫秒便终止的请求。&lt;/p&gt;
&lt;p&gt;如今，人工智能 2.0 正在取代人工智能 1.0。
人工智能生态系统正从短暂、孤立的任务转向部署多个持续运行的、协同工作的 AI 智能体。
这些自主智能体需要维护上下文信息、使用外部工具、编写和执行代码，并在较长时间内相互通信。&lt;/p&gt;
&lt;p&gt;当平台工程团队寻找合适的架构来托管这些新型 AI 工作负载时，
Kubernetes 脱颖而出，成为自然之选。
然而，将这些独特的智能体工作负载映射到传统的 Kubernetes 原语需要一种新的抽象。&lt;/p&gt;
&lt;p&gt;这正是新的 &lt;a href=&#34;https://github.com/kubernetes-sigs/agent-sandbox&#34;&gt;Agent Sandbox&lt;/a&gt;
项目（目前由 SIG Apps 开发）发挥作用的地方。&lt;/p&gt;
&lt;!--
## The Kubernetes advantage (and the abstraction gap)

Kubernetes is the de facto standard for orchestrating cloud-native applications precisely because it solves the challenges of extensibility, robust networking, and ecosystem maturity. However, as AI evolves from short-lived inference requests to long-running, autonomous agents, we are seeing the emergence of a new operational pattern. 

AI agents, by contrast, are typically isolated, stateful, singleton workloads. They act as a digital workspace or execution environment for an LLM. An agent needs a persistent identity and a secure scratchpad for writing and executing (often untrusted) code. Crucially, because these long-lived agents are expected to be mostly idle except for brief bursts of activity, they require a lifecycle that supports mechanisms like suspension and rapid resumption.

While you could theoretically approximate this by stringing together a StatefulSet of size 1, a headless Service, and a PersistentVolumeClaim for every single agent, managing this at scale becomes an operational nightmare.

Because of these unique properties, traditional Kubernetes primitives don&#39;t perfectly align.
--&gt;
&lt;h2 id=&#34;kubernetes-的优势-以及抽象鸿沟&#34;&gt;Kubernetes 的优势（以及抽象鸿沟）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kubernetes-%e7%9a%84%e4%bc%98%e5%8a%bf-%e4%bb%a5%e5%8f%8a%e6%8a%bd%e8%b1%a1%e9%b8%bf%e6%b2%9f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kubernetes 之所以成为云原生应用编排的事实标准，
正是因为它解决了可扩展性、稳健的网络和生态系统成熟度方面的挑战。
然而，随着人工智能从短暂的推理请求演变为长时间运行的自主智能体，我们正在见证一种新的运行模式的出现。&lt;/p&gt;
&lt;p&gt;相比之下，AI 智能体通常是隔离的、有状态的、单例工作负载。
它们充当生命周期管理（LLM）的数字工作空间或执行环境。
智能体需要一个持久的身份和一个安全的暂存区来编写和执行（通常是不受信任的）代码。
至关重要的是，由于这些长时间运行的智能体除了短暂的活动爆发外，大部分时间都处于空闲状态，
因此它们需要一个支持诸如暂停和快速恢复等机制的生命周期。&lt;/p&gt;
&lt;p&gt;虽然理论上可以通过为每个智能体串联一个大小为 1 的
StatefulSet、一个无头服务和一个 PersistentVolumeClaim
来近似实现这一点，但大规模管理这些组件将成为运维噩梦。&lt;/p&gt;
&lt;p&gt;由于这些独特的特性，传统的 Kubernetes 原语无法完美契合。&lt;/p&gt;
&lt;!--
## Introducing Kubernetes Agent Sandbox

To bridge this gap, SIG Apps is developing [agent-sandbox](https://github.com/kubernetes-sigs/agent-sandbox). The project introduces a declarative, standardized API specifically tailored for singleton, stateful workloads like AI agent runtimes.

At its core, the project introduces the Sandbox CRD. It acts as a lightweight, single-container environment built entirely on Kubernetes primitives, offering:
--&gt;
&lt;h2 id=&#34;kubernetes-agent-sandbox-简介&#34;&gt;Kubernetes Agent Sandbox 简介&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kubernetes-agent-sandbox-%e7%ae%80%e4%bb%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;为了弥合这一差距，SIG Apps 正在开发
&lt;a href=&#34;https://github.com/kubernetes-sigs/agent-sandbox&#34;&gt;agent-sandbox&lt;/a&gt;。
该项目引入了一个声明式、标准化的 API，专门针对单例、有状态工作负载（例如 AI 智能体运行时）量身定制。&lt;/p&gt;
&lt;p&gt;该项目的核心是引入了 Sandbox CRD。它是一个轻量级的单容器环境，完全基于
Kubernetes 原语构建，提供以下功能：&lt;/p&gt;
&lt;!--
* **Strong isolation for untrusted code**: When an AI agent generates and executes code autonomously, security is paramount. The Sandbox custom resource natively supports different runtimes, like gVisor or Kata Containers. This provides the necessary kernel and network isolation required for multi-tenant, untrusted execution.
* **Lifecycle management**: Unlike traditional web servers optimized for steady, stateless traffic, an AI agent operates as a stateful workspace that may be idle for hours between tasks. Agent Sandbox supports scaling these idle environments to zero to save resources, while ensuring they can resume exactly where they left off.
* **Stable identity**: Coordinated multi-agent systems require stable networking. Every Sandbox is given a stable hostname and network identity, allowing distinct agents to discover and communicate with each other seamlessly.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;针对不受信任代码的强隔离&lt;/strong&gt;：当 AI 智能体自主生成和执行代码时，安全性至关重要。
Sandbox 自定义资源原生支持不同的运行时环境，例如 gVisor 或 Kata Containers。
这为多租户、不受信任的执行提供了必要的内核和网络隔离。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;生命周期管理&lt;/strong&gt;：与针对稳定、无状态流量优化的传统 Web 服务器不同，
AI 智能体作为有状态的工作空间运行，在两次任务之间可能被闲置数小时。
Agent Sandbox 支持将这些闲置环境缩减至零以节省资源，同时确保它们可以从上次中断的地方恢复。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;稳定的身份&lt;/strong&gt;：协同的多智能体系统需要稳定的网络。
每个 Sandbox 都拥有稳定的主机名和网络身份，使不同的智能体能够无缝地相互发现和通信。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Scaling agents with extensions

Because the AI space is moving incredibly quickly, we built an Extensions API layer that enables even faster iteration and development.

Starting a new pod adds about a second of overhead. That&#39;s perfectly fine when deploying a new version of a microservice, but when an agent is invoked after being idle, a one-second cold start breaks the continuity of the interaction. It forces the user or the orchestrating service to wait for the environment to provision before the model can even begin to think or act. SandboxWarmPool solves this by maintaining a pool of pre-provisioned Sandbox pods, effectively eliminating cold starts. Users or orchestration services can simply issue a SandboxClaim against a SandboxTemplate, and the controller immediately hands over a pre-warmed, fully isolated environment to the agent.
--&gt;
&lt;h2 id=&#34;利用扩展来缩放智能体规模&#34;&gt;利用扩展来缩放智能体规模&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%88%a9%e7%94%a8%e6%89%a9%e5%b1%95%e6%9d%a5%e7%bc%a9%e6%94%be%e6%99%ba%e8%83%bd%e4%bd%93%e8%a7%84%e6%a8%a1&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;由于人工智能领域发展迅猛，我们构建了一个扩展 API 层，以支持更快的迭代和开发。&lt;/p&gt;
&lt;p&gt;启动一个新的 Pod 会增加大约一秒钟的开销。
部署新版本的微服务时，这完全可以接受，但如果智能体在空闲后被调用，一秒钟的冷启动会中断交互的连续性。
它迫使用户或编排服务等待环境配置完成，模型才能开始思考或行动。SandboxWarmPool
通过维护一个预配置的 Sandbox Pod 池来解决这个问题，从而有效地消除了冷启动。
用户或编排服务只需针对 SandboxTemplate 发出 SandboxClaim，
控制器就会立即将一个预热的、完全隔离的环境交给智能体。&lt;/p&gt;
&lt;!--
## Quick start

Ready to try it yourself? You can install the Agent Sandbox core components and extensions directly into your learning or sandbox cluster, using your chosen release.

We recommend you use the latest release as the project is moving fast.
--&gt;
&lt;h2 id=&#34;快速入门&#34;&gt;快速入门&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bf%ab%e9%80%9f%e5%85%a5%e9%97%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;准备好亲自体验了吗？你可以选择最新版本，将 Agent Sandbox
的核心组件和扩展程序直接安装到你的学习或 Sandbox 集群中。&lt;/p&gt;
&lt;p&gt;由于项目进展迅速，我们建议你使用最新版本。&lt;/p&gt;
&lt;!--
```bash
# Replace &#34;vX.Y.Z&#34; with a specific version tag (e.g., &#34;v0.1.0&#34;) from
# https://github.com/kubernetes-sigs/agent-sandbox/releases
export VERSION=&#34;vX.Y.Z&#34;

# Install the core components:
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/${VERSION}/manifest.yaml

# Install the extensions components (optional):
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/${VERSION}/extensions.yaml

# Install the Python SDK (optional):
# Create a virtual Python environment
python3 -m venv .venv
source .venv/bin/activate
# Install from PyPI
pip install k8s-agent-sandbox
```
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 将 “vX.Y.Z” 替换为来自 https://github.com/kubernetes-sigs/agent-sandbox/releases&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 的特定版本标签（例如，“v0.1.0”）。&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#b8860b&#34;&gt;VERSION&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;vX.Y.Z&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 安装核心组件：&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/&lt;span style=&#34;color:#b68;font-weight:bold&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;VERSION&lt;/span&gt;&lt;span style=&#34;color:#b68;font-weight:bold&#34;&gt;}&lt;/span&gt;/manifest.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 安装扩展组件（可选）：&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/&lt;span style=&#34;color:#b68;font-weight:bold&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;VERSION&lt;/span&gt;&lt;span style=&#34;color:#b68;font-weight:bold&#34;&gt;}&lt;/span&gt;/extensions.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 安装 Python SDK（可选）：&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 创建一个虚拟 Python 环境&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;python3 -m venv .venv
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f&#34;&gt;source&lt;/span&gt; .venv/bin/activate
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 从 PyPI 安装&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install k8s-agent-sandbox
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Once installed, you can try out the [Python SDK](https://github.com/kubernetes-sigs/agent-sandbox/tree/main/clients/python/agentic-sandbox-client) for AI agents or deploy one of the ready-to-use [examples](https://github.com/kubernetes-sigs/agent-sandbox/tree/main/examples) to see how easy it is to spin up an isolated agent environment.
--&gt;
&lt;p&gt;安装完成后，你可以试用 AI 智能体的
&lt;a href=&#34;https://github.com/kubernetes-sigs/agent-sandbox/tree/main/clients/python/agentic-sandbox-client&#34;&gt;Python SDK&lt;/a&gt;，
或者部署一个现成的&lt;a href=&#34;https://github.com/kubernetes-sigs/agent-sandbox/tree/main/examples&#34;&gt;示例&lt;/a&gt;，
看看启动一个隔离的智能体环境是多么容易。&lt;/p&gt;
&lt;!--
## The future of agents is cloud native

Whether it’s a 50-millisecond stateless task, or a multi-week, mostly-idle collaborative process, extending Kubernetes with primitives designed specifically for isolated stateful singletons allows us to leverage all the robust benefits of the cloud-native ecosystem.

The Agent Sandbox project is open source and community-driven. If you are building AI platforms, developing agentic frameworks, or are interested in Kubernetes extensibility, we invite you to get involved:
--&gt;
&lt;h2 id=&#34;智能体的未来在于云原生&#34;&gt;智能体的未来在于云原生&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%99%ba%e8%83%bd%e4%bd%93%e7%9a%84%e6%9c%aa%e6%9d%a5%e5%9c%a8%e4%ba%8e%e4%ba%91%e5%8e%9f%e7%94%9f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;无论是 50 毫秒的无状态任务，还是持续数周、大部分时间处于空闲状态的协作流程，
通过扩展 Kubernetes，添加专为隔离的有状态单例设计的原语，
我们都能充分利用云原生生态系统的强大优势。&lt;/p&gt;
&lt;p&gt;Agent Sandbox 项目是开源且由社区驱动的。
如果你正在构建 AI 平台、开发智能体框架，或者对 Kubernetes 的可扩展性感兴趣，
我们诚邀您参与其中：&lt;/p&gt;
&lt;!--
* Check out the project on GitHub: [kubernetes-sigs/agent-sandbox](https://github.com/kubernetes-sigs/agent-sandbox)
* Join the discussion in the [#sig-apps](https://kubernetes.slack.com/messages/sig-apps) and [#agent-sandbox](https://kubernetes.slack.com/messages/agent-sandbox) channels on the Kubernetes Slack.
--&gt;
&lt;ul&gt;
&lt;li&gt;在 GitHub 上查看项目：&lt;a href=&#34;https://github.com/kubernetes-sigs/agent-sandbox&#34;&gt;kubernetes-sigs/agent-sandbox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;加入 Kubernetes Slack 上的 &lt;a href=&#34;https://kubernetes.slack.com/messages/sig-apps&#34;&gt;#sig-apps&lt;/a&gt;
和 &lt;a href=&#34;https://kubernetes.slack.com/messages/agent-sandbox&#34;&gt;#agent-sandbox&lt;/a&gt; 频道参与讨论。&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>无形的重写：现代化 Kubernetes 镜像推广工具</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/17/image-promoter-rewrite/</link>
      <pubDate>Tue, 17 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/17/image-promoter-rewrite/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;The Invisible Rewrite: Modernizing the Kubernetes Image Promoter&#34;
date: 2026-03-17
slug: image-promoter-rewrite
author: &gt;
  Sascha Grunert (Red Hat)
--&gt;
&lt;!--
Every container image you pull from `registry.k8s.io` got there through
[`kpromo`](https://github.com/kubernetes-sigs/promo-tools), the Kubernetes image
promoter. It copies images from staging registries to
production, signs them with [cosign](https://sigstore.dev), replicates
signatures across more than 20 regional mirrors, and generates
[SLSA](https://slsa.dev) provenance attestations. If this tool breaks, no
Kubernetes release ships. Over the past few weeks, we rewrote its core from
scratch, deleted 20% of the codebase, made it dramatically faster, and
nobody noticed. That was the whole point.
--&gt;
&lt;p&gt;你从 &lt;code&gt;registry.k8s.io&lt;/code&gt; 拉取的每个容器镜像都是通过
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools&#34;&gt;&lt;code&gt;kpromo&lt;/code&gt;&lt;/a&gt;（Kubernetes 镜像推广工具）完成的。
它将镜像从临时仓库复制到生产环境，使用 &lt;a href=&#34;https://sigstore.dev&#34;&gt;cosign&lt;/a&gt; 进行签名，
在 20 多个区域镜像间复制签名，并生成 &lt;a href=&#34;https://slsa.dev&#34;&gt;SLSA&lt;/a&gt; 来源证明。
如果这个工具出问题，Kubernetes 就无法发布。在过去几周里，我们从零开始重写了它的核心，
删除了 20% 的代码库，使其速度大幅提升，而没有人注意到。这正是我们的目的。&lt;/p&gt;
&lt;!--
## A bit of history
--&gt;
&lt;h2 id=&#34;一点历史&#34;&gt;一点历史&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%80%e7%82%b9%e5%8e%86%e5%8f%b2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The image promoter started in late 2018 as an internal Google project by
[Linus Arver](https://github.com/listx). The goal was simple: replace the
manual, Googler-gated process of copying container images into `k8s.gcr.io` with
a community-owned, GitOps-based workflow. Push to a staging registry, open a PR
with a YAML manifest, get it reviewed and merged, and automation handles the
rest. [KEP-1734](https://github.com/kubernetes/enhancements/blob/master/keps/sig-release/1734-k8s-image-promoter/README.md)
formalized this proposal.
--&gt;
&lt;p&gt;镜像推广工具始于 2018 年末，是由 &lt;a href=&#34;https://github.com/listx&#34;&gt;Linus Arver&lt;/a&gt; 发起的 Google 内部项目。
目标很简单：用社区拥有的、基于 GitOps 的工作流程取代手动的、由 Google 员工控制的容器镜像复制到 &lt;code&gt;k8s.gcr.io&lt;/code&gt; 的过程。
推送到临时仓库，打开一个包含 YAML 清单的 PR，获得审查和合并，自动化处理其余部分。
&lt;a href=&#34;https://github.com/kubernetes/enhancements/blob/master/keps/sig-release/1734-k8s-image-promoter/README.md&#34;&gt;KEP-1734&lt;/a&gt; 将此提议正式化。&lt;/p&gt;
&lt;!--
In early 2019, the code moved to `kubernetes-sigs/k8s-container-image-promoter`
and grew quickly. Over the next few years,
[Stephen Augustus](https://github.com/justaugustus) consolidated multiple tools
(`cip`, `gh2gcs`, `krel promote-images`, `promobot-files`) into a single CLI
called `kpromo`. The repository was renamed to
[`promo-tools`](https://github.com/kubernetes-sigs/promo-tools).
[Adolfo Garcia Veytia (Puerco)](https://github.com/puerco) added cosign signing
and SBOM support. [Tyler Ferrara](https://github.com/tylerferrara) built
vulnerability scanning. [Carlos Panato](https://github.com/cpanato) kept the project in a healthy and
releasable state. 42 contributors made about 3,500 commits across more than 60 releases.
--&gt;
&lt;p&gt;2019 年初，代码迁移到 &lt;code&gt;kubernetes-sigs/k8s-container-image-promoter&lt;/code&gt; 并快速发展。
在接下来的几年里，&lt;a href=&#34;https://github.com/justaugustus&#34;&gt;Stephen Augustus&lt;/a&gt; 将多个工具
（&lt;code&gt;cip&lt;/code&gt;、&lt;code&gt;gh2gcs&lt;/code&gt;、&lt;code&gt;krel promote-images&lt;/code&gt;、&lt;code&gt;promobot-files&lt;/code&gt;）整合到一个名为 &lt;code&gt;kpromo&lt;/code&gt; 的 CLI 中。
仓库更名为 &lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools&#34;&gt;&lt;code&gt;promo-tools&lt;/code&gt;&lt;/a&gt;。
&lt;a href=&#34;https://github.com/puerco&#34;&gt;Adolfo Garcia Veytia (Puerco)&lt;/a&gt; 添加了 cosign 签名和 SBOM 支持。
&lt;a href=&#34;https://github.com/tylerferrara&#34;&gt;Tyler Ferrara&lt;/a&gt; 构建了漏洞扫描功能。
&lt;a href=&#34;https://github.com/cpanato&#34;&gt;Carlos Panato&lt;/a&gt; 保持项目健康且可发布的状态。
42 位贡献者在 60 多个版本中做出了约 3,500 次提交。&lt;/p&gt;
&lt;!--
It worked. But by 2025 the codebase carried the weight of seven years of
incremental additions from multiple SIGs and subprojects. The README
[said it plainly](https://github.com/kubernetes-sigs/promo-tools/blob/7b6d515b78aadd617c8060a223786f8e57aa061f/README.md#disclaimer):
you will see duplicated code, multiple techniques for accomplishing the same
thing, and several TODOs.
--&gt;
&lt;p&gt;它运行得很好。但到 2025 年，代码库承载了来自多个 SIG 和子项目七年增量添加的负担。
README &lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/blob/7b6d515b78aadd617c8060a223786f8e57aa061f/README.md#disclaimer&#34;&gt;直白地说&lt;/a&gt;：
你会看到重复的代码、多种完成相同任务的技术以及多个 TODO。&lt;/p&gt;
&lt;!--
## The problems we needed to solve
--&gt;
&lt;h2 id=&#34;我们需要解决的问题&#34;&gt;我们需要解决的问题&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%88%91%e4%bb%ac%e9%9c%80%e8%a6%81%e8%a7%a3%e5%86%b3%e7%9a%84%e9%97%ae%e9%a2%98&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Production promotion jobs for Kubernetes core images regularly took over 30
minutes and frequently failed with rate limit errors. The core promotion logic
had grown into a monolith that was
[hard to extend](https://github.com/kubernetes-sigs/promo-tools/issues/1177)
and difficult to test, making new features like provenance or vulnerability
scanning painful to add.
--&gt;
&lt;p&gt;Kubernetes 核心镜像的生产推广任务通常需要 30 分钟以上，并且经常因速率限制错误而失败。
核心推广逻辑已经变成一个难以扩展的单体，
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/issues/1177&#34;&gt;难以扩展&lt;/a&gt;且难以测试，
使得添加来源证明或漏洞扫描等新功能变得非常困难。&lt;/p&gt;
&lt;!--
On the [SIG Release roadmap](https://github.com/kubernetes/sig-release/blob/master/roadmap.md),
two work items had been sitting for a while: &#34;Rewrite artifact promoter&#34; and
&#34;Make artifact validation more robust&#34;. We had discussed these at SIG Release
meetings and KubeCons, and the open research spikes on
[project board #171](https://github.com/orgs/kubernetes/projects/171) captured
eight questions that needed answers before we could move forward.
--&gt;
&lt;p&gt;在 &lt;a href=&#34;https://github.com/kubernetes/sig-release/blob/master/roadmap.md&#34;&gt;SIG Release 路线图&lt;/a&gt;上，
有两个工作项已经搁置了一段时间：&amp;quot;重写制品推广工具&amp;quot;和&amp;quot;使制品验证更健壮&amp;quot;。
我们在 SIG Release 会议和 KubeCon 上讨论过这些问题，
&lt;a href=&#34;https://github.com/orgs/kubernetes/projects/171&#34;&gt;项目看板 #171&lt;/a&gt;
上的开放研究问题记录了八个需要回答的问题，然后才能继续。&lt;/p&gt;
&lt;!--
## One issue to answer them all
--&gt;
&lt;h2 id=&#34;一个问题解决所有疑问&#34;&gt;一个问题解决所有疑问&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%80%e4%b8%aa%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3%e6%89%80%e6%9c%89%e7%96%91%e9%97%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
In February 2026, we opened [issue #1701](https://github.com/kubernetes-sigs/promo-tools/issues/1701)
(&#34;Rewrite artifact promoter pipeline&#34;) and answered all eight spikes in a single
tracking issue. The rewrite was deliberately phased so that each step could be
reviewed, merged, and validated independently. Here is what we did:
--&gt;
&lt;p&gt;2026 年 2 月，我们打开了 &lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/issues/1701&#34;&gt;Issue #1701&lt;/a&gt;
（&amp;quot;重写制品推广流水线&amp;quot;），并在一个跟踪 Issue 中回答了所有八个研究问题。
重写是分阶段进行的，以便每个步骤都可以独立审查、合并和验证。以下是我们所做的：&lt;/p&gt;
&lt;!--
**Phase 1: Rate Limiting** ([#1702](https://github.com/kubernetes-sigs/promo-tools/pull/1702)).
Rewrote rate limiting to properly throttle all registry operations with adaptive
backoff.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 1: 速率限制&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1702&#34;&gt;#1702&lt;/a&gt;)。
重写了速率限制，使用自适应退避正确限制所有仓库操作。&lt;/p&gt;
&lt;!--
**Phase 2: Interfaces** ([#1704](https://github.com/kubernetes-sigs/promo-tools/pull/1704)).
Put registry and auth operations behind clean interfaces so they can be swapped
out and tested independently.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 2: 接口&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1704&#34;&gt;#1704&lt;/a&gt;)。
将仓库和认证操作放在清晰的接口后面，以便可以独立替换和测试。&lt;/p&gt;
&lt;!--
**Phase 3: Pipeline Engine** ([#1705](https://github.com/kubernetes-sigs/promo-tools/pull/1705)).
Built a pipeline engine that runs promotion as a sequence of distinct phases
instead of one large function.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 3: 流水线引擎&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1705&#34;&gt;#1705&lt;/a&gt;)。
构建了一个流水线引擎，将推广作为一系列不同阶段运行，而不是一个大函数。&lt;/p&gt;
&lt;!--
**Phase 4: Provenance** ([#1706](https://github.com/kubernetes-sigs/promo-tools/pull/1706)).
Added SLSA provenance verification for staging images.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 4: 来源证明&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1706&#34;&gt;#1706&lt;/a&gt;)。
为临时镜像添加了 SLSA 来源验证。&lt;/p&gt;
&lt;!--
**Phase 5: Scanner and SBOMs** ([#1709](https://github.com/kubernetes-sigs/promo-tools/pull/1709)).
Added vulnerability scanning and SBOM support. Flipped the default to the new
pipeline engine. At this point we cut
[v4.2.0](https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.2.0) and let it
soak in production before continuing.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 5: 扫描器和 SBOM&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1709&#34;&gt;#1709&lt;/a&gt;)。
添加了漏洞扫描和 SBOM 支持。将默认值切换到新的流水线引擎。此时我们发布了
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.2.0&#34;&gt;v4.2.0&lt;/a&gt;，让它在生产环境中试运行后再继续。&lt;/p&gt;
&lt;!--
**Phase 6: Split Signing from Replication** ([#1713](https://github.com/kubernetes-sigs/promo-tools/pull/1713)).
Separated image signing from signature replication into their own pipeline
phases, eliminating the rate limit contention that caused most production
failures.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 6: 分离签名和复制&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1713&#34;&gt;#1713&lt;/a&gt;)。
将镜像签名与签名复制分离到各自的流水线阶段，消除了导致大多数生产失败的速率限制争用。&lt;/p&gt;
&lt;!--
**Phase 7: Remove Legacy Pipeline** ([#1712](https://github.com/kubernetes-sigs/promo-tools/pull/1712)).
Deleted the old code path entirely.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 7: 移除旧流水线&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1712&#34;&gt;#1712&lt;/a&gt;)。
完全删除了旧的代码路径。&lt;/p&gt;
&lt;!--
**Phase 8: Remove Legacy Dependencies** ([#1716](https://github.com/kubernetes-sigs/promo-tools/pull/1716)).
Deleted the audit subsystem, deprecated tools, and e2e test infrastructure.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 8: 移除旧依赖&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1716&#34;&gt;#1716&lt;/a&gt;)。
删除了审计子系统、已弃用的工具和端到端测试基础设施。&lt;/p&gt;
&lt;!--
**Phase 9: Delete the Monolith** ([#1718](https://github.com/kubernetes-sigs/promo-tools/pull/1718)).
Removed the old monolithic core and its supporting packages. Thousands of lines
deleted across phases 7 through 9.
--&gt;
&lt;p&gt;&lt;strong&gt;Phase 9: 删除单体&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1718&#34;&gt;#1718&lt;/a&gt;)。
移除了旧的单体核心及其支持包。在第 7 到第 9 阶段删除了数千行代码。&lt;/p&gt;
&lt;!--
Each phase shipped independently.
[v4.3.0](https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.3.0) followed
the next day with the legacy code fully removed.
--&gt;
&lt;p&gt;每个阶段独立发布。第二天发布了
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.3.0&#34;&gt;v4.3.0&lt;/a&gt;，完全移除了旧代码。&lt;/p&gt;
&lt;!--
With the new architecture in place, a series of follow-up improvements landed:
parallelized registry reads
([#1736](https://github.com/kubernetes-sigs/promo-tools/pull/1736)),
retry logic for all network operations
([#1742](https://github.com/kubernetes-sigs/promo-tools/pull/1742)),
per-request timeouts to prevent pipeline hangs
([#1763](https://github.com/kubernetes-sigs/promo-tools/pull/1763)),
HTTP connection reuse
([#1759](https://github.com/kubernetes-sigs/promo-tools/pull/1759)),
local registry integration tests
([#1746](https://github.com/kubernetes-sigs/promo-tools/pull/1746)),
the removal of deprecated credential file support
([#1758](https://github.com/kubernetes-sigs/promo-tools/pull/1758)),
a rework of attestation handling to use cosign&#39;s OCI APIs and the removal of
deprecated SBOM support
([#1764](https://github.com/kubernetes-sigs/promo-tools/pull/1764)),
and a dedicated promotion record predicate type registered with the
[in-toto attestation framework](https://github.com/in-toto/attestation)
([#1767](https://github.com/kubernetes-sigs/promo-tools/pull/1767)).
These would have been much harder to land without the clean separation the
rewrite provided.
[v4.4.0](https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.4.0)
shipped all of these improvements and enabled provenance generation and
verification by default.
--&gt;
&lt;p&gt;新架构就位后，一系列后续改进得以实现：并行化仓库读取
(&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1736&#34;&gt;#1736&lt;/a&gt;)、
所有网络操作的重试逻辑
(&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1742&#34;&gt;#1742&lt;/a&gt;)、
防止流水线挂起的每请求超时
(&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1763&#34;&gt;#1763&lt;/a&gt;)、
HTTP 连接复用
(&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1759&#34;&gt;#1759&lt;/a&gt;)、
本地仓库集成测试
(&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1746&#34;&gt;#1746&lt;/a&gt;)、
移除已弃用的凭证文件支持
(&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1758&#34;&gt;#1758&lt;/a&gt;)、
重新设计证明处理以使用 cosign 的 OCI API 并移除已弃用的 SBOM 支持
(&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1764&#34;&gt;#1764&lt;/a&gt;)，
以及在 &lt;a href=&#34;https://github.com/in-toto/attestation&#34;&gt;in-toto 证明框架&lt;/a&gt; 中注册的专用推广记录谓词类型
(&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1767&#34;&gt;#1767&lt;/a&gt;)。
如果没有重写提供的清晰分离，这些改进会难上加难。
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.4.0&#34;&gt;v4.4.0&lt;/a&gt;
发布了所有这些改进，并默认启用了来源证明生成和验证。&lt;/p&gt;
&lt;!--
## The new pipeline
--&gt;
&lt;h2 id=&#34;新的流水线&#34;&gt;新的流水线&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%96%b0%e7%9a%84%e6%b5%81%e6%b0%b4%e7%ba%bf&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The promotion pipeline now has seven clearly separated phases:
--&gt;
&lt;p&gt;推广流水线现在有七个清晰分离的阶段：&lt;/p&gt;
&lt;pre class=&#34;mermaid&#34;&gt;graph LR
    Setup --&amp;gt; Plan --&amp;gt; Provenance --&amp;gt; Validate --&amp;gt; Promote --&amp;gt; Sign --&amp;gt; Attest&lt;/pre&gt;
&lt;!--
| Phase | What it does |
|-------|-------------|
| **Setup** | Validate options, prewarm TUF cache. |
| **Plan** | Parse manifests, read registries, compute which images need promotion. |
| **Provenance** | Verify SLSA attestations on staging images. |
| **Validate** | Check cosign signatures, exit here for dry runs. |
| **Promote** | Copy images server-side, preserving digests. |
| **Sign** | Sign promoted images with keyless cosign. |
| **Attest** | Generate promotion provenance attestations using a dedicated [in-toto](https://in-toto.io) predicate type. |
--&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;阶段&lt;/th&gt;
          &lt;th&gt;功能&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;strong&gt;Setup&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;验证选项，预热 TUF 缓存。&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;strong&gt;Plan&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;解析清单，读取仓库，计算需要推广的镜像。&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;strong&gt;Provenance&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;验证临时镜像上的 SLSA 证明。&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;strong&gt;Validate&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;检查 cosign 签名，模拟运行在此退出。&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;strong&gt;Promote&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;服务端复制镜像，保留摘要。&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;strong&gt;Sign&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;使用无密钥 cosign 签名推广的镜像。&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;strong&gt;Attest&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;使用专用的 &lt;a href=&#34;https://in-toto.io&#34;&gt;in-toto&lt;/a&gt; 谓词类型生成推广来源证明。&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;!--
Phases run sequentially, so each one gets exclusive access to the full rate
limit budget. No more contention. Signature replication to mirror registries is
no longer part of this pipeline and runs as a
[dedicated periodic Prow job](https://prow.k8s.io/?job=ci-k8sio-image-signature-replication)
instead.
--&gt;
&lt;p&gt;阶段按顺序运行，因此每个阶段都获得对完整速率限制预算的独占访问权。不再有争用。
镜像仓库的签名复制不再是此流水线的一部分，而是作为一个
&lt;a href=&#34;https://prow.k8s.io/?job=ci-k8sio-image-signature-replication&#34;&gt;专门的定期 Prow job&lt;/a&gt; 运行。&lt;/p&gt;
&lt;!--
## Making it fast
--&gt;
&lt;h2 id=&#34;使其更快&#34;&gt;使其更快&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bd%bf%e5%85%b6%e6%9b%b4%e5%bf%ab&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
With the architecture in place, we turned to performance.
--&gt;
&lt;p&gt;架构就位后，我们转向性能优化。&lt;/p&gt;
&lt;!--
**Parallel registry reads** ([#1736](https://github.com/kubernetes-sigs/promo-tools/pull/1736)):
The plan phase reads 1,350 registries. We parallelized this and the plan phase
dropped from about 20 minutes to about 2 minutes.
--&gt;
&lt;p&gt;&lt;strong&gt;并行仓库读取&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1736&#34;&gt;#1736&lt;/a&gt;)：
计划阶段读取 1,350 个仓库。我们将其并行化，计划阶段从大约 20 分钟降至约 2 分钟。&lt;/p&gt;
&lt;!--
**Two-phase tag listing** ([#1761](https://github.com/kubernetes-sigs/promo-tools/pull/1761)):
Instead of checking all 46,000 image groups across more than 20 mirrors, we first check
only the source repositories. About 57% of images have no signatures at all
because they were promoted before signing was enabled. We skip those entirely,
cutting API calls roughly in half.
--&gt;
&lt;p&gt;&lt;strong&gt;两阶段标签列出&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1761&#34;&gt;#1761&lt;/a&gt;)：
不是检查 20 多个镜像上的所有 46,000 个镜像组，我们首先只检查源仓库。
大约 57% 的镜像根本没有签名，因为它们是在签名启用之前推广的。
我们完全跳过这些，将 API 调用减少大约一半。&lt;/p&gt;
&lt;!--
**Source check before replication** ([#1727](https://github.com/kubernetes-sigs/promo-tools/pull/1727)):
Before iterating all mirrors for a given image, we check if the signature
exists on the primary registry first. In steady state where most signatures are
already replicated, this reduced the work from about 17 hours to about 15
minutes.
--&gt;
&lt;p&gt;&lt;strong&gt;复制前的源检查&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1727&#34;&gt;#1727&lt;/a&gt;)：
在遍历给定镜像的所有镜像仓库之前，我们首先检查签名是否存在于主仓库上。
在大多数签名已经复制的稳定状态下，这将工作从大约 17 小时减少到约 15 分钟。&lt;/p&gt;
&lt;!--
**Per-request timeouts** ([#1763](https://github.com/kubernetes-sigs/promo-tools/pull/1763)):
We observed intermittent hangs where a stalled connection blocked the pipeline
for over 9 hours. Every network operation now has its own timeout and transient
failures are retried automatically.
--&gt;
&lt;p&gt;&lt;strong&gt;每请求超时&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1763&#34;&gt;#1763&lt;/a&gt;)：
我们观察到间歇性挂起，停滞的连接阻塞流水线超过 9 小时。
现在每个网络操作都有自己的超时，临时失败会自动重试。&lt;/p&gt;
&lt;!--
**Connection reuse** ([#1759](https://github.com/kubernetes-sigs/promo-tools/pull/1759)):
We started reusing HTTP connections and auth state across operations, eliminating
redundant token negotiations. This closed a
[long-standing request](https://github.com/kubernetes-sigs/promo-tools/issues/842)
from 2023.
--&gt;
&lt;p&gt;&lt;strong&gt;连接复用&lt;/strong&gt; (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1759&#34;&gt;#1759&lt;/a&gt;)：
我们开始在操作间复用 HTTP 连接和认证状态，消除了冗余的令牌协商。
这解决了一个&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/issues/842&#34;&gt;长期存在的请求&lt;/a&gt;（始于 2023 年）。&lt;/p&gt;
&lt;!--
## By the numbers
--&gt;
&lt;h2 id=&#34;数字说明&#34;&gt;数字说明&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%95%b0%e5%ad%97%e8%af%b4%e6%98%8e&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Here is what the rewrite looks like in aggregate.

- Over 40 PRs merged, 3 releases shipped ([v4.2.0](https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.2.0), [v4.3.0](https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.3.0), [v4.4.0](https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.4.0))
- Over 10,000 lines added and over 16,000 lines deleted, a net reduction
  of about 5,000 lines (20% smaller codebase)
- Performance drastically improved across the board
- Robustness improved with retry logic, per-request timeouts, and adaptive rate limiting
- 19 long-standing issues closed
--&gt;
&lt;p&gt;以下是重写的总体情况。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;合并了 40 多个 PR，发布了 3 个版本
（&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.2.0&#34;&gt;v4.2.0&lt;/a&gt;、
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.3.0&#34;&gt;v4.3.0&lt;/a&gt;、
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.4.0&#34;&gt;v4.4.0&lt;/a&gt;）&lt;/li&gt;
&lt;li&gt;添加了超过 10,000 行代码，删除了超过 16,000 行代码，净减少约 5,000 行（代码库缩小 20%）&lt;/li&gt;
&lt;li&gt;性能全面大幅提升&lt;/li&gt;
&lt;li&gt;通过重试逻辑、每请求超时和自适应速率限制提高了健壮性&lt;/li&gt;
&lt;li&gt;关闭了 19 个长期存在的问题&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
The codebase shrank by a fifth while gaining provenance attestations, a pipeline
engine, vulnerability scanning integration, parallelized operations, retry
logic, integration tests against local registries, and a standalone signature
replication mode.
--&gt;
&lt;p&gt;代码库缩小了五分之一，同时获得了来源证明、流水线引擎、漏洞扫描集成、并行化操作、重试逻辑、针对本地仓库的集成测试以及独立的签名复制模式。&lt;/p&gt;
&lt;!--
## No user-facing changes
--&gt;
&lt;h2 id=&#34;非用户可见的变更&#34;&gt;非用户可见的变更&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%9d%9e%e7%94%a8%e6%88%b7%e5%8f%af%e8%a7%81%e7%9a%84%e5%8f%98%e6%9b%b4&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This was a hard requirement. The `kpromo cip` command accepts the same flags and
reads the same YAML manifests. The
[`post-k8sio-image-promo`](https://prow.k8s.io/?job=post-k8sio-image-promo)
Prow job continued working throughout. The promotion manifests in
[kubernetes/k8s.io](https://github.com/kubernetes/k8s.io) did not change. Nobody
had to update their workflows or configuration.
--&gt;
&lt;p&gt;这是一个硬性要求。&lt;code&gt;kpromo cip&lt;/code&gt; 命令接受相同的标志并读取相同的 YAML 清单。
&lt;a href=&#34;https://prow.k8s.io/?job=post-k8sio-image-promo&#34;&gt;&lt;code&gt;post-k8sio-image-promo&lt;/code&gt;&lt;/a&gt;
Prow 作业在整个过程中继续工作。
&lt;a href=&#34;https://github.com/kubernetes/k8s.io&#34;&gt;kubernetes/k8s.io&lt;/a&gt; 中的推广清单没有变化。
没有人需要更新他们的工作流程或配置。&lt;/p&gt;
&lt;!--
We caught two regressions early in production. One ([#1731](https://github.com/kubernetes-sigs/promo-tools/pull/1731))
caused a registry key mismatch that made every image appear as &#34;lost&#34; so that
nothing was promoted. Another ([#1733](https://github.com/kubernetes-sigs/promo-tools/pull/1733))
set the default thread count to zero, blocking all goroutines. Both were fixed
within hours. The phased release strategy ([v4.2.0](https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.2.0) with the new engine, [v4.3.0](https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.3.0)
with legacy code removed) gave us a clear rollback path that we fortunately
never needed.
--&gt;
&lt;p&gt;我们在生产环境早期发现了两个回归问题。一个 (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1731&#34;&gt;#1731&lt;/a&gt;)
导致仓库密钥不匹配，使每个镜像都显示为&amp;quot;丢失&amp;quot;，因此没有任何镜像被推广。
另一个 (&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/pull/1733&#34;&gt;#1733&lt;/a&gt;)
将默认线程数设置为零，阻塞了所有 goroutine。两者都在几小时内修复。
分阶段发布策略（&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.2.0&#34;&gt;v4.2.0&lt;/a&gt; 包含新引擎，
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/releases/tag/v4.3.0&#34;&gt;v4.3.0&lt;/a&gt; 移除旧代码）
为我们提供了一条清晰的回滚路径，幸运的是我们从未需要使用它。&lt;/p&gt;
&lt;!--
## What comes next
--&gt;
&lt;h2 id=&#34;下一步&#34;&gt;下一步&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%8b%e4%b8%80%e6%ad%a5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Signature replication across all mirror registries remains the most expensive
part of the promotion cycle. [Issue #1762](https://github.com/kubernetes-sigs/promo-tools/issues/1762)
proposes eliminating it entirely by having
[archeio](https://github.com/kubernetes/registry.k8s.io) (the `registry.k8s.io`
redirect service) route signature tag requests to a single canonical upstream
instead of per-region backends. Another option would be to move signing closer
to the registry infrastructure itself. Both approaches need further discussion
with the SIG Release and infrastructure teams, but either one would remove
thousands of API calls per promotion cycle and simplify the codebase even
further.
--&gt;
&lt;p&gt;跨所有镜像仓库的签名复制仍然是推广周期中最昂贵的部分。
&lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools/issues/1762&#34;&gt;Issue #1762&lt;/a&gt;
提议通过让 &lt;a href=&#34;https://github.com/kubernetes/registry.k8s.io&#34;&gt;archeio&lt;/a&gt;（&lt;code&gt;registry.k8s.io&lt;/code&gt;
重定向服务）将签名标签请求路由到单个规范上游，而不是每个区域的后端，来完全消除它。
另一个选择是将签名移到更接近仓库基础设施本身的位置。
这两种方法都需要与 SIG Release 和基础设施团队进一步讨论，
但任何一种都会在每个推广周期中减少数千次 API 调用，并进一步简化代码库。&lt;/p&gt;
&lt;!--
## Thank you
--&gt;
&lt;h2 id=&#34;致谢&#34;&gt;致谢&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%87%b4%e8%b0%a2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This project has been a community effort spanning seven years. Thank you to
[Linus](https://github.com/listx),
[Stephen](https://github.com/justaugustus),
[Adolfo](https://github.com/puerco),
[Carlos](https://github.com/cpanato),
[Ben](https://github.com/BenTheElder),
[Marko](https://github.com/xmudrii),
[Lauri](https://github.com/lasomethingsomething),
[Tyler](https://github.com/tylerferrara),
[Arnaud](https://github.com/ameukam), and many others who contributed
code, reviews, and planning over the years. The SIG Release and Release
Engineering communities provided the context, the discussions, and the patience
for a rewrite of infrastructure that every Kubernetes release depends on.

If you want to get involved, join us in
[`#release-management`](https://kubernetes.slack.com/archives/C2C40FMNF) on the
Kubernetes Slack or check out the
[repository](https://github.com/kubernetes-sigs/promo-tools).
--&gt;
&lt;p&gt;这个项目是一个跨越七年的社区努力。感谢
&lt;a href=&#34;https://github.com/listx&#34;&gt;Linus&lt;/a&gt;、
&lt;a href=&#34;https://github.com/justaugustus&#34;&gt;Stephen&lt;/a&gt;、
&lt;a href=&#34;https://github.com/puerco&#34;&gt;Adolfo&lt;/a&gt;、
&lt;a href=&#34;https://github.com/cpanato&#34;&gt;Carlos&lt;/a&gt;、
&lt;a href=&#34;https://github.com/BenTheElder&#34;&gt;Ben&lt;/a&gt;、
&lt;a href=&#34;https://github.com/xmudrii&#34;&gt;Marko&lt;/a&gt;、
&lt;a href=&#34;https://github.com/lasomethingsomething&#34;&gt;Lauri&lt;/a&gt;、
&lt;a href=&#34;https://github.com/tylerferrara&#34;&gt;Tyler&lt;/a&gt;、
&lt;a href=&#34;https://github.com/ameukam&#34;&gt;Arnaud&lt;/a&gt;，以及多年来贡献代码、审查和规划的许多其他人。
SIG Release 和发布工程社区为重写每个 Kubernetes 版本都依赖的基础设施提供了背景、讨论和耐心。&lt;/p&gt;
&lt;p&gt;如果你想参与，请加入 Kubernetes Slack 上的
&lt;a href=&#34;https://kubernetes.slack.com/archives/C2C40FMNF&#34;&gt;&lt;code&gt;#release-management&lt;/code&gt;&lt;/a&gt; 频道，
或查看 &lt;a href=&#34;https://github.com/kubernetes-sigs/promo-tools&#34;&gt;仓库&lt;/a&gt;。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>宣布成立 AI 网关工作组</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/09/announcing-ai-gateway-wg/</link>
      <pubDate>Mon, 09 Mar 2026 10:00:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/03/09/announcing-ai-gateway-wg/</guid>
      <description>
        
        
        &lt;!--
title: &#34;Announcing the AI Gateway Working Group&#34;
date: 2026-03-09T10:00:00-08:00
canonicalUrl: https://www.kubernetes.dev/blog/2026/03/09/announcing-ai-gateway-wg/
slug: announcing-ai-gateway-wg
author: &gt;
  [Keith Mattix](https://github.com/keithmattix),
  [Nir Rozenbaum](https://github.com/nirrozenbaum),
  [Morgan Foster](https://github.com/usize),
  [Flynn](https://github.com/kflynn)
--&gt;
&lt;!--
The community around Kubernetes includes a number of Special Interest Groups (SIGs) and Working Groups (WGs) facilitating discussions on important topics between interested contributors. Today, we&#39;re excited to announce the formation of the [AI Gateway Working Group](https://github.com/kubernetes-sigs/wg-ai-gateway), a new initiative focused on developing standards and best practices for networking infrastructure that supports AI workloads in Kubernetes environments.
--&gt;
&lt;p&gt;Kubernetes 社区包含多个特别兴趣小组（SIG）和工作组（WG），
旨在促进相关贡献者之间就重要议题展开讨论。
今天，我们很高兴地宣布成立 &lt;a href=&#34;https://github.com/kubernetes-sigs/wg-ai-gateway&#34;&gt;AI 网关工作组&lt;/a&gt;，
这是一项专注于为 Kubernetes 环境中支持 AI 工作负载的网络基础设施制定标准和最佳实践的新举措。&lt;/p&gt;
&lt;!--
## What is an AI Gateway?

In a Kubernetes context, an *AI Gateway* refers to network gateway infrastructure (including proxy servers, load-balancers, etc.) that generally implements the [Gateway API](https://gateway-api.sigs.k8s.io/) specification with enhanced capabilities for AI workloads. Rather than defining a distinct product category, AI Gateways describe infrastructure designed to enforce policy on AI traffic, including:
- Token-based rate limiting for AI APIs.
- Fine-grained access controls for inference APIs.
- Payload inspection enabling intelligent routing, caching, and guardrails.
- Support for AI-specific protocols and routing patterns.
--&gt;
&lt;h2 id=&#34;什么是-ai-网关&#34;&gt;什么是 AI 网关？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bb%80%e4%b9%88%e6%98%af-ai-%e7%bd%91%e5%85%b3&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;在 Kubernetes 环境中，&lt;strong&gt;AI 网关&lt;/strong&gt;指的是网络网关基础设施（包括代理服务器、负载均衡器等），
它通常实现 &lt;a href=&#34;https://gateway-api.sigs.k8s.io/&#34;&gt;Gateway API&lt;/a&gt; 规范，并针对 AI 工作负载提供增强功能。
AI 网关并非定义一个独立的产品类别，而是描述旨在对 AI 流量实施策略的基础设施，包括：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;基于 token 的 AI API 速率限制。&lt;/li&gt;
&lt;li&gt;推理 API 的细粒度访问控制。&lt;/li&gt;
&lt;li&gt;有效负载检查，实现智能路由、缓存和防护机制。&lt;/li&gt;
&lt;li&gt;支持 AI 特有的协议和路由模式。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Working group charter and mission

The AI Gateway Working Group operates under a clear [charter](https://github.com/kubernetes/community/blob/master/wg-ai-gateway/charter.md) with the mission to develop proposals for Kubernetes Special Interest Groups (SIGs) and their sub-projects.
Its primary goals include:
- **Standards Development**: Create declarative APIs, standards, and guidance for AI workload networking in Kubernetes.
- **Community Collaboration**: Foster discussions and build consensus around best practices for AI infrastructure.
- **Extensible Architecture**: Ensure composability, pluggability, and ordered processing for AI-specific gateway extensions.
- **Standards-Based Approach**: Build on established networking foundations, layering AI-specific capabilities on top of proven standards.
--&gt;
&lt;h2 id=&#34;工作组章程和使命&#34;&gt;工作组章程和使命&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b7%a5%e4%bd%9c%e7%bb%84%e7%ab%a0%e7%a8%8b%e5%92%8c%e4%bd%bf%e5%91%bd&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;AI 网关工作组遵循清晰的&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/wg-ai-gateway/charter.md&#34;&gt;章程&lt;/a&gt;运作，
其使命是为 Kubernetes 特别兴趣小组（SIG）及其子项目制定提案。
其主要目标包括：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;标准制定&lt;/strong&gt;：为 Kubernetes 中的 AI 工作负载网络创建声明式 API、标准和指南。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;社区协作&lt;/strong&gt;：促进讨论并就 AI 基础设施的最佳实践达成共识。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;可扩展架构&lt;/strong&gt;：确保 AI 专用网关扩展的可组合性、可插拔性和有序处理。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;基于标准的方法&lt;/strong&gt;：基于已建立的网络基础，在成熟的标准之上构建 AI 专用功能。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Active proposals

WG AI Gateway currently has several [active proposals](https://github.com/kubernetes-sigs/wg-ai-gateway/tree/main/proposals) that address key challenges in
AI workload networking:
--&gt;
&lt;h2 id=&#34;活跃提案&#34;&gt;活跃提案&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%b4%bb%e8%b7%83%e6%8f%90%e6%a1%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;AI 网关工作组目前有多个&lt;a href=&#34;https://github.com/kubernetes-sigs/wg-ai-gateway/tree/main/proposals&#34;&gt;活跃提案&lt;/a&gt;，
旨在解决 AI 工作负载网络领域的关键挑战：&lt;/p&gt;
&lt;!--
### Payload Processing

The [payload processing proposal](https://github.com/kubernetes-sigs/wg-ai-gateway/tree/main/proposals/7-payload-processing.md) addresses the critical need for AI workloads to inspect and transform full HTTP request and response payloads.
This enables:
#### AI Inference Security
- Guard against malicious prompts and prompt injection attacks.
- Content filtering for AI responses.
- Signature-based detection and anomaly detection for AI traffic.
--&gt;
&lt;h3 id=&#34;有效载荷处理&#34;&gt;有效载荷处理&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%9c%89%e6%95%88%e8%bd%bd%e8%8d%b7%e5%a4%84%e7%90%86&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;&lt;a href=&#34;https://github.com/kubernetes-sigs/wg-ai-gateway/tree/main/proposals/7-payload-processing.md&#34;&gt;有效载荷处理提案&lt;/a&gt;
旨在满足 AI 工作负载检查和转换完整 HTTP 请求和响应有效载荷的关键需求。&lt;/p&gt;
&lt;p&gt;这可以实现：&lt;/p&gt;
&lt;h4 id=&#34;ai-推理安全&#34;&gt;AI 推理安全&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ai-%e6%8e%a8%e7%90%86%e5%ae%89%e5%85%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;防御恶意提示和提示注入攻击。&lt;/li&gt;
&lt;li&gt;对 AI 响应进行内容过滤。&lt;/li&gt;
&lt;li&gt;对 AI 流量进行基于特征的检测和异常检测。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
#### AI Inference Optimization
- Semantic routing based on request content.
- Intelligent caching to reduce inference costs and improve response times.
- RAG (Retrieval-Augmented Generation) system integration for context enhancement.

The proposal defines standards for declarative payload processor configuration, ordered processing pipelines, and configurable failure modes - all essential for production AI workload deployments.
--&gt;
&lt;h4 id=&#34;ai-推理优化&#34;&gt;AI 推理优化&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ai-%e6%8e%a8%e7%90%86%e4%bc%98%e5%8c%96&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;基于请求内容的语义路由。&lt;/li&gt;
&lt;li&gt;智能缓存，以降低推理成本并缩短响应时间。&lt;/li&gt;
&lt;li&gt;集成 RAG 系统，以增强上下文信息。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;该提案定义了声明式有效载荷处理器配置、有序处理流水线和可配置故障模式的标准
—— 所有这些对于生产级 AI 工作负载部署都至关重要。&lt;/p&gt;
&lt;!--
### Egress gateways

Modern AI applications increasingly depend on external inference services, whether for specialized models,
failover scenarios, or cost optimization.
The [egress gateways proposal](https://github.com/kubernetes-sigs/wg-ai-gateway/tree/main/proposals/10-egress-gateways.md) aims to define standards for securely routing traffic outside the cluster.
Key features include:
--&gt;
&lt;h3 id=&#34;出口网关&#34;&gt;出口网关&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%87%ba%e5%8f%a3%e7%bd%91%e5%85%b3&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;现代 AI 应用越来越依赖外部推理服务，无论是用于构建专用模型、实现故障转移，还是优化成本。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/kubernetes-sigs/wg-ai-gateway/tree/main/proposals/10-egress-gateways.md&#34;&gt;出口网关提案&lt;/a&gt;
旨在定义将流量安全地路由到集群外部的标准。
主要特性包括：&lt;/p&gt;
&lt;!--
#### External AI Service Integration
- Secure access to cloud-based AI services (OpenAI, Vertex AI, Bedrock, etc.).
- Managed authentication and token injection for third-party AI APIs.
- Regional compliance and failover capabilities.
#### Advanced Traffic Management
- Backend resource definitions for external FQDNs and services.
- TLS policy management and certificate authority control.
- Cross-cluster routing for centralized AI infrastructure.
#### User Stories We&#39;re Addressing
- Platform operators providing managed access to external AI services.
- Developers requiring inference failover across multiple cloud providers.
- Compliance engineers enforcing regional restrictions on AI traffic.
- Organizations centralizing AI workloads on dedicated clusters.
--&gt;
&lt;h4 id=&#34;外部-ai-服务集成&#34;&gt;外部 AI 服务集成&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a4%96%e9%83%a8-ai-%e6%9c%8d%e5%8a%a1%e9%9b%86%e6%88%90&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;安全访问云端 AI 服务（OpenAI、Vertex AI、Bedrock 等）。&lt;/li&gt;
&lt;li&gt;为第三方 AI API 提供托管身份验证和令牌注入。&lt;/li&gt;
&lt;li&gt;具备区域合规性和故障转移功能。&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;高级流量管理&#34;&gt;高级流量管理&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%ab%98%e7%ba%a7%e6%b5%81%e9%87%8f%e7%ae%a1%e7%90%86&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;为外部 FQDN 和服务定义后端资源。&lt;/li&gt;
&lt;li&gt;TLS 策略管理和证书颁发机构控制。&lt;/li&gt;
&lt;li&gt;为集中式 AI 基础设施提供跨集群路由。&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;我们正在解决的用户场景&#34;&gt;我们正在解决的用户场景&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%88%91%e4%bb%ac%e6%ad%a3%e5%9c%a8%e8%a7%a3%e5%86%b3%e7%9a%84%e7%94%a8%e6%88%b7%e5%9c%ba%e6%99%af&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;提供外部 AI 服务托管访问的平台运营商。&lt;/li&gt;
&lt;li&gt;需要跨多个云提供商进行推理故障转移的开发人员。&lt;/li&gt;
&lt;li&gt;执行 AI 流量区域限制的合规工程师。&lt;/li&gt;
&lt;li&gt;将 AI 工作负载集中部署在专用集群上的组织。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Upcoming events

### KubeCon + CloudNativeCon Europe 2026, Amsterdam
AI Gateway working group members will be presenting at [KubeCon + CloudNativeCon Europe](https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/) in Amsterdam, discussing the problems at the intersection of AI and networking, including the working group&#39;s active proposals, as well as the intersection of AI gateways with Model Context Protocol (MCP) and agent networking patterns.  
This session will showcase how AI Gateway working group proposals enable the infrastructure needed for next-generation AI deployments and communication patterns.  
The session will also include the initial designs, early prototypes, and emerging directions shaping the WG’s roadmap.  
For more details see our session here:
- [AI&#39;m at the Gate! Introducing the AI Gateway Working Group in Kubernetes](https://kccnceu2026.sched.com/event/2EF5t/aim-at-the-gate-introducing-the-ai-gateway-working-group-in-kubernetes-morgan-foster-nir-rozenbaum-red-hat-shachar-tal-palo-alto-networks?iframe=yes&amp;w=100%&amp;sidebar=yes&amp;bg=no)
--&gt;
&lt;h2 id=&#34;即将举行的活动&#34;&gt;即将举行的活动&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8d%b3%e5%b0%86%e4%b8%be%e8%a1%8c%e7%9a%84%e6%b4%bb%e5%8a%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3 id=&#34;kubecon-cloudnativecon-europe-2026-阿姆斯特丹&#34;&gt;KubeCon + CloudNativeCon Europe 2026，阿姆斯特丹&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kubecon-cloudnativecon-europe-2026-%e9%98%bf%e5%a7%86%e6%96%af%e7%89%b9%e4%b8%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;AI 网关工作组成员将在阿姆斯特丹举行的
&lt;a href=&#34;https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/&#34;&gt;KubeCon + CloudNativeCon Europe&lt;/a&gt;
上发表演讲，探讨人工智能与网络交叉领域的问题，包括工作组正在推进的提案，以及
AI 网关与模型上下文协议（MCP）和代理网络模式的交叉应用。
本次会议将展示 AI 网关工作组的提案如何为下一代 AI 部署和通信模式构建所需的基础设施。
会议还将介绍工作组路线图的初始设计、早期原型和新兴方向。
更多详情，请点击此处查看我们的会议：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kccnceu2026.sched.com/event/2EF5t/aim-at-the-gate-introducing-the-ai-gateway-working-group-in-kubernetes-morgan-foster-nir-rozenbaum-red-hat-shachar-tal-palo-alto-networks?iframe=yes&amp;w=100%&amp;sidebar=yes&amp;bg=no&#34;&gt;AI 已抵达网关！Kubernetes 中的 AI 网关工作组简介&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Get involved

The AI Gateway Working Group represents the Kubernetes community&#39;s commitment to standardizing AI workload networking. As AI becomes increasingly integral to modern applications, we need robust, standardized infrastructure that can support the unique requirements of inference workloads while maintaining the security, observability, and reliability standards that Kubernetes users expect.  
Our proposals are currently in active development, with implementations beginning across various gateway projects. We&#39;re working closely with SIG Network on Gateway API enhancements and collaborating with the broader cloud-native community to ensure our standards meet real-world production needs.
--&gt;
&lt;h2 id=&#34;参与其中&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e5%85%b6%e4%b8%ad&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;AI 网关工作组代表 Kubernetes 社区致力于 AI 工作负载网络标准化。随着
AI 日益融入现代应用，我们需要强大且标准化的基础设施，以满足推理工作负载的独特需求，
同时保持 Kubernetes 用户所期望的安全性、可观测性和可靠性标准。&lt;/p&gt;
&lt;p&gt;我们的提案目前正在积极开发中，并已开始在各个网关项目中实施。
我们正与 SIG Network 紧密合作，增强网关 API，并与更广泛的云原生社区协作，
以确保我们的标准能够满足实际生产需求。&lt;/p&gt;
&lt;!--
Whether you&#39;re a gateway implementer, platform operator, AI application developer, or simply interested in the intersection of Kubernetes and AI, we&#39;d love your input. The working group follows an open contribution model - you can review our proposals, join our weekly meetings, or start discussions on our GitHub repository.
To learn more:

- Visit the working group&#39;s umbrella [GitHub repository](https://github.com/kubernetes-sigs/wg-ai-gateway).
- Read the working group&#39;s [charter](https://github.com/kubernetes/community/blob/master/wg-ai-gateway/charter.md).
- Join the [weekly meeting](https://docs.google.com/document/d/1nRRkRK2e82mxkT8zdLoAtuhkom2X6dEhtYOJ9UtfZKs) on Thursdays at 2PM EST.
- Connect with the working group on [Slack (#wg-ai-gateway)](https://kubernetes.slack.com/messages/wg-ai-gateway) (visit https://slack.k8s.io/ for an invitation).
- Join the AI Gateway [mailing list](https://groups.google.com/a/kubernetes.io/g/wg-ai-gateway).
--&gt;
&lt;p&gt;无论您是网关实现者、平台运维人员、AI 应用开发者，还是仅仅对 Kubernetes 和 AI
的交叉领域感兴趣，我们都欢迎您的参与。
工作组采用开放贡献模式——您可以查看我们的提案、参加每周例会，或在我们的 GitHub 代码库上发起讨论。&lt;/p&gt;
&lt;p&gt;了解更多信息：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;访问工作组的 &lt;a href=&#34;https://github.com/kubernetes-sigs/wg-ai-gateway&#34;&gt;GitHub 代码库&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;阅读工作组的&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/wg-ai-gateway/charter.md&#34;&gt;章程&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;参加每周四下午 2 点（美国东部时间）的&lt;a href=&#34;https://docs.google.com/document/d/1nRRkRK2e82mxkT8zdLoAtuhkom2X6dEhtYOJ9UtfZKs&#34;&gt;每周例会&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;加入工作组的 Slack 频道（#wg-ai-gateway）（访问 &lt;a href=&#34;https://slack.k8s.io/&#34;&gt;https://slack.k8s.io/&lt;/a&gt; 获取邀请）。&lt;/li&gt;
&lt;li&gt;加入 AI Gateway 邮件列表（https://groups.google.com/a/kubernetes.io/g/wg-ai-gateway）。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
The future of AI infrastructure in Kubernetes is being built today, join up and learn how you can contribute and help shape the future of AI-aware gateway capabilities in Kubernetes.
--&gt;
&lt;p&gt;Kubernetes 中 AI 基础设施的未来正在构建中，加入我们，了解如何贡献力量，帮助塑造
Kubernetes 中 AI 感知网关功能的未来。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>SIG Architecture 聚焦：API 治理</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/02/12/sig-architecture-api-spotlight/</link>
      <pubDate>Thu, 12 Feb 2026 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/02/12/sig-architecture-api-spotlight/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Spotlight on SIG Architecture: API Governance&#34;
slug: sig-architecture-api-spotlight
canonicalUrl: https://www.kubernetes.dev/blog/2026/02/12/sig-architecture-api
date: 2026-02-12
draft: false
author: &gt;
  [Frederico Muñoz](https://github.com/fsmunoz) (SAS Institute)
--&gt;
&lt;!--
_This is the fifth interview of a SIG Architecture Spotlight series that covers the different
subprojects, and we will be covering [SIG Architecture: API
Governance](https://github.com/kubernetes/community/blob/master/sig-architecture/README.md#architecture-and-api-governance-1)._
--&gt;
&lt;p&gt;&lt;strong&gt;这是 SIG Architecture 聚焦系列的第五篇访谈，将介绍不同的子项目。本篇聚焦
&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-architecture/README.md#architecture-and-api-governance-1&#34;&gt;SIG Architecture：API 治理&lt;/a&gt;。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
In this SIG Architecture spotlight we talked with [Jordan Liggitt](https://github.com/liggitt), lead
of the API Governance sub-project.
--&gt;
&lt;p&gt;在这篇 SIG Architecture 聚焦访谈中，我们采访了 API 治理子项目负责人
&lt;a href=&#34;https://github.com/liggitt&#34;&gt;Jordan Liggitt&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Introduction
--&gt;
&lt;h2 id=&#34;介绍&#34;&gt;介绍&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bb%8b%e7%bb%8d&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**FM: Hello Jordan, thank you for your availability. Tell us a bit about yourself, your role and how
you got involved in Kubernetes.**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：Jordan 你好，感谢你接受采访。请先简单介绍一下你自己、你的职责，以及你是如何参与 Kubernetes 的。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: My name is Jordan Liggitt. I&#39;m a Christian, husband, father of four, software engineer at
[Google](https://about.google/) by day, and [amateur musician](https://www.youtube.com/watch?v=UDdr-VIWQwo) by stealth. I was born in Texas (and still
like to claim it as my point of origin), but I&#39;ve lived in North Carolina for most of my life.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：我叫 Jordan Liggitt。我是一名基督徒、丈夫、四个孩子的父亲，白天在
&lt;a href=&#34;https://about.google/&#34;&gt;Google&lt;/a&gt; 做软件工程师，私下还是个&lt;a href=&#34;https://www.youtube.com/watch?v=UDdr-VIWQwo&#34;&gt;业余音乐人&lt;/a&gt;。
我出生在德克萨斯州（现在也仍然喜欢把那里称作自己的起点），但我人生大部分时间都生活在北卡罗来纳州。&lt;/p&gt;
&lt;!--
I&#39;ve been working on Kubernetes since 2014. At that time, I was working on authentication and
authorization at Red Hat, and my very first pull request to Kubernetes attempted to [add an OAuth
server](https://github.com/kubernetes/kubernetes/pull/2328) to the Kubernetes API server. It never
exited work-in-progress status. I ended up going with a different approach that layered on top of
the core Kubernetes API server in a different project (spoiler alert: this is foreshadowing), and I
closed it without merging six months later.
--&gt;
&lt;p&gt;我从 2014 年开始参与 Kubernetes。当时我在 Red Hat 负责认证和授权，
提交给 Kubernetes 的第一个 PR 是尝试给 Kubernetes API 服务器
&lt;a href=&#34;https://github.com/kubernetes/kubernetes/pull/2328&#34;&gt;增加一个 OAuth 服务器&lt;/a&gt;。
那个 PR 最终一直停留在 WIP 状态，没有合并。
后来我换了一种方式，在另一个项目里以“叠加在核心 Kubernetes API 服务器之上”的思路来实现（这也可以看作后文的一个伏笔），
六个月后我关闭了那个 PR。&lt;/p&gt;
&lt;!--
Undeterred by that start, I stayed involved, helped build Kubernetes authentication and
authorization capabilities, and got involved in the definition and evolution of the core Kubernetes
APIs from early beta APIs, like `v1beta3` to `v1`. I got tagged as an API reviewer in 2016 based on
those contributions, and was added as an API approver in 2017.
--&gt;
&lt;p&gt;尽管开局如此，我还是持续参与了进来，帮助构建 Kubernetes 的认证与授权能力，
并从早期的 Beta API（例如 &lt;code&gt;v1beta3&lt;/code&gt;）到 &lt;code&gt;v1&lt;/code&gt; 的过程中参与核心 Kubernetes API 的定义与演进。
基于这些贡献，我在 2016 年被标记为 API reviewer，并在 2017 年成为 API approver。&lt;/p&gt;
&lt;!--
Today, I help lead the API Governance and code organization subprojects for SIG Architecture, and I
am a tech lead for SIG Auth.
--&gt;
&lt;p&gt;现在，我在 SIG Architecture 里共同负责 API 治理和代码组织两个子项目，同时也是 SIG Auth 的技术负责人。&lt;/p&gt;
&lt;!--
**FM: And when did you get specifically involved in the API Governance project?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：那你是什么时候开始具体参与 API 治理项目的？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: Around 2019.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：大约在 2019 年。&lt;/p&gt;
&lt;!--
## Goals and scope of API Governance
--&gt;
&lt;h2 id=&#34;api-治理的目标与范围&#34;&gt;API 治理的目标与范围&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#api-%e6%b2%bb%e7%90%86%e7%9a%84%e7%9b%ae%e6%a0%87%e4%b8%8e%e8%8c%83%e5%9b%b4&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**FM:  How would you describe the main goals and areas of intervention of the subproject?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：你会如何描述这个子项目的主要目标，以及它介入的领域？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
The surface area includes all the various APIs Kubernetes has, and there are APIs that people do not
always realize are APIs: command-line flags, configuration files, how binaries are run, how they
talk to back-end components like the container runtime, and how they persist data. People often
think of &#34;the API&#34; as only the [REST API](https://kubernetes.io/docs/reference/using-api/)... that
is the biggest and most obvious one, and the one with the largest audience, but all of these other
surfaces are also APIs. Their audiences are narrower, so there is more flexibility there, but they
still require consideration.
--&gt;
&lt;p&gt;这个领域覆盖 Kubernetes 的各种 API，而且有一些“大家未必意识到它是 API”的接口：
命令行参数、配置文件、二进制如何运行、它们如何与容器运行时这类后端组件通信，以及如何持久化数据。
很多人提到“API”时只想到 &lt;a href=&#34;https://kubernetes.io/docs/reference/using-api/&#34;&gt;REST API&lt;/a&gt;。
它当然是最大、最显眼、受众最多的一类，但这些其他表面同样也是 API。
它们的受众更窄，因此灵活性更高一些，但依然需要认真对待。&lt;/p&gt;
&lt;!--
The goals are to be stable while still enabling innovation. Stability is easy if you never change
anything, but that contradicts the goal of evolution and growth. So we balance &#34;be stable&#34; with
&#34;allow change&#34;.
--&gt;
&lt;p&gt;我们的目标是在保持稳定的同时继续推动创新。
如果你什么都不改，稳定当然最容易做到，但那也和演进、增长的目标相冲突。
所以我们要在“保持稳定”和“允许变化”之间取得平衡。&lt;/p&gt;
&lt;!--
**FM: Speaking of changes, in terms of ensuring consistency and quality (which is clearly one of the
reasons this project exists), what are the specific quality gates in the lifecycle of a Kubernetes
change? Does API Governance get involved during the release cycle, prior to it through guidelines,
or somewhere in between? At what points do you ensure the intended role is fulfilled?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：说到变化。为了确保一致性和质量（这显然也是这个项目存在的原因之一），
Kubernetes 变更生命周期里有哪些具体的质量门禁？
API 治理是在发布周期中介入，还是通过前置指南介入，或者是在两者之间？
你们在哪些时间点来确保这个职责真正落地？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: We have [guidelines and
conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md),
both for APIs in general and for how to change an API. These are living documents that we update as
we encounter new scenarios. They are long and dense, so we also support them with involvement at
either the design stage or the implementation stage.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：我们有&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md&#34;&gt;指南和约定&lt;/a&gt;，
既包含 API 通用规范，也包含 API 变更规范。
这些都是“活文档”，会随着新场景不断更新。
它们内容很多、也比较密集，所以我们还会在设计阶段或实现阶段实际参与来配合。&lt;/p&gt;
&lt;!--
Sometimes, due to bandwidth constraints, teams move ahead with design work without feedback from [API Review](https://github.com/kubernetes/community/blob/master/sig-architecture/api-review-process.md). That&#39;s fine, but it means that when implementation begins, the API review will happen then,
and there may be substantial feedback. So we get involved when a new API is created or an existing
API is changed, either at design or implementation.
--&gt;
&lt;p&gt;有时候受限于带宽，团队会在没有得到
&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-architecture/api-review-process.md&#34;&gt;API Review&lt;/a&gt;
反馈的情况下先推进设计。这没问题，但这也意味着实现开始时才会进行 API 评审，
届时可能会出现比较大范围的反馈。
因此，无论是创建新 API，还是修改既有 API，我们都会在设计阶段或实现阶段介入。&lt;/p&gt;
&lt;!--
**FM: Is this during the Kubernetes Enhancement Proposal (KEP) process? Since KEPs are mandatory for
enhancements, I assume part of the work intersects with API Governance?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：这是发生在 Kubernetes Enhancement Proposal（KEP）流程里吗？
既然增强功能必须走 KEP，我理解其中一部分会和 API 治理交叉。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: It can. [KEPs](https://github.com/kubernetes/enhancements/blob/master/keps/README.md) vary
in how detailed they are. Some include literal API definitions. When they do, we can perform an API
review at the design stage. Then implementation becomes a matter of checking fidelity to the design.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：&lt;a href=&#34;https://github.com/kubernetes/enhancements/blob/master/keps/README.md&#34;&gt;KEP&lt;/a&gt; 的详细程度差异很大。
有些 KEP 会直接给出 API 定义。遇到这种情况，我们就可以在设计阶段做 API 评审，
随后实现阶段主要就是核对是否忠实于设计。&lt;/p&gt;
&lt;!--
Getting involved early is ideal. But some KEPs are conceptual and leave details to the
implementation. That&#39;s not wrong; it just means the implementation will be more exploratory. Then
API Review gets involved later, possibly recommending structural changes.
--&gt;
&lt;p&gt;尽早介入是理想状态。但有些 KEP 更偏概念，把细节留给实现阶段。
这并不错误，只是意味着实现会更偏探索式。这样 API Review 的介入就会更晚，
并且可能会建议结构性调整。&lt;/p&gt;
&lt;!--
There&#39;s a trade-off regardless: detailed design upfront versus iterative discovery during
implementation. People and teams work differently, and we&#39;re flexible and happy to consult early or
at implementation time.
--&gt;
&lt;p&gt;无论哪种方式都有取舍：前期做更详细的设计，还是在实现中迭代发现。
不同人和团队有不同工作方式，我们保持灵活，也乐于在前期或实现阶段提供咨询。&lt;/p&gt;
&lt;!--
**FM: This reminds me of what Fred Brooks wrote in &#34;The Mythical Man-Month&#34; about conceptual
integrity being central to product quality... No matter how you structure the process, there must be
a point where someone looks at what is coming and ensures conceptual integrity. Kubernetes uses APIs
everywhere - externally and internally - so API Governance is critical to maintaining that
integrity. How is this captured?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：这让我想到 Fred Brooks 在《人月神话》中提到的观点：
概念完整性是产品质量的核心。无论流程怎么组织，总得有一个环节去审视即将落地的内容，
确保概念完整性。Kubernetes 到处都在使用 API（对外和对内都有），
所以 API 治理对维护这种完整性至关重要。这个是如何被固化下来的？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: Yes, the conventions document captures patterns we&#39;ve learned over time: what to do in
various situations. We also have automated linters and checks to ensure correctness around patterns
like spec/status semantics. These automated tools help catch issues even when humans miss them.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：是的，约定文档沉淀了我们长期积累的模式：不同场景下该怎么做。
我们还有自动化 lint 和检查项，来保障例如 spec/status 语义这类模式的正确性。
这些自动化工具能在人工遗漏时帮助我们发现问题。&lt;/p&gt;
&lt;!--
As new scenarios arise - and they do constantly - we think through how to approach them and fold
the results back into our documentation and tools. Sometimes it takes a few attempts before we
settle on an approach that works well.
--&gt;
&lt;p&gt;当新场景出现时（而且一直在出现），我们会思考应对方式，并把结论回灌到文档和工具里。
有时需要尝试几轮，才能收敛到一个真正好用的方案。&lt;/p&gt;
&lt;!--
**FM: Exactly. Each new interaction improves the guidelines.**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：确实。每次新的互动都会让指南更好。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: Right. And sometimes the first approach turns out to be wrong. It may take two or three
iterations before we land on something robust.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：没错。有时候第一种做法最后会被证明不够好，
可能要经历两三次迭代才能得到稳健的结果。&lt;/p&gt;
&lt;!--
## The impact of Custom Resource Definitions
--&gt;
&lt;h2 id=&#34;custom-resource-definition-带来的影响&#34;&gt;Custom Resource Definition 带来的影响&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#custom-resource-definition-%e5%b8%a6%e6%9d%a5%e7%9a%84%e5%bd%b1%e5%93%8d&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**FM: Is there any particular change, episode, or domain that stands out as especially noteworthy,
complex, or interesting in your experience?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：在你的经验里，有没有某个变化、事件或领域特别值得一提，或者特别复杂、特别有意思？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: The watershed moment was [Custom Resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
Prior to that, every API was handcrafted by us and fully reviewed. There were inconsistencies, but
we understood and controlled every type and field.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：真正的分水岭是
&lt;a href=&#34;https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/&#34;&gt;Custom Resources&lt;/a&gt;。
在那之前，每个 API 都是我们手工定义并完整评审的。
虽然也有不一致之处，但每个类型和字段我们都清楚、也都能控制。&lt;/p&gt;
&lt;!--
When Custom Resources arrived, anyone could define anything. The first version did not even require
a schema. That made it extremely powerful - it enabled change immediately - but it left us playing
catch-up on stability and consistency.
--&gt;
&lt;p&gt;Custom Resources 出现之后，任何人都可以定义任何内容。
第一个版本甚至不要求 schema。
这让它功能极其强大，立即释放了创新空间，但也让我们在稳定性和一致性方面开始追赶。&lt;/p&gt;
&lt;!--
When Custom Resources graduated to General Availability (GA), schemas became required, but escape
hatches still existed for backward compatibility. Since then, we&#39;ve been working on giving CRD
authors validation capabilities comparable to built-ins. Built-in validation rules for CRDs have
only just reached GA in the last few releases.
--&gt;
&lt;p&gt;当 Custom Resources 晋升到 GA 后，schema 成为必需，
但出于向后兼容仍保留了一些“逃生口”。
从那时起，我们一直在努力让 CRD 作者获得与内置资源接近的校验能力。
而 CRD 的内置校验规则也只是最近几个版本才达到 GA。&lt;/p&gt;
&lt;!--
So CRDs opened the &#34;anything is possible&#34; era. Built-in validation rules are the second major
milestone: bringing consistency back.
--&gt;
&lt;p&gt;所以，CRD 开启了“几乎任何内容都可以定义”的阶段。
而内置校验规则是第二个重要里程碑：把一致性重新带回来。&lt;/p&gt;
&lt;!--
The three major themes have been defining schemas, validating data, and handling pre-existing
invalid data. With ratcheting validation (allowing data to improve without breaking existing
objects), we can now guide CRD authors toward conventions without breaking the world.
--&gt;
&lt;p&gt;这一路上的三个核心主题是：定义 schema、校验数据，以及处理既有的无效数据。
借助渐进式收紧校验（在不破坏现有对象的前提下允许数据逐步改进），
我们现在可以在不破坏既有对象的情况下，引导 CRD 作者遵循约定。&lt;/p&gt;
&lt;!--
## API Governance in context
--&gt;
&lt;h2 id=&#34;api-治理在整体中的位置&#34;&gt;API 治理在整体中的位置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#api-%e6%b2%bb%e7%90%86%e5%9c%a8%e6%95%b4%e4%bd%93%e4%b8%ad%e7%9a%84%e4%bd%8d%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**FM: How does API Governance relate to SIG Architecture and API Machinery?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：API 治理和 SIG Architecture、API Machinery 分别是什么关系？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: [API Machinery](https://github.com/kubernetes/apimachinery) provides the actual code and
tools that people build APIs on. They don&#39;t review APIs for storage, networking, scheduling, etc.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：&lt;a href=&#34;https://github.com/kubernetes/apimachinery&#34;&gt;API Machinery&lt;/a&gt; 提供的是构建 API 的实际代码和工具。
他们不会去评审存储、网络、调度等领域的 API 本身。&lt;/p&gt;
&lt;!--
SIG Architecture sets the overall system direction and works with API Machinery to ensure the system
supports that direction. API Governance works with other SIGs building on that foundation to define
conventions and patterns, ensuring consistent use of what API Machinery provides.
--&gt;
&lt;p&gt;SIG Architecture 负责系统整体方向，并与 API Machinery 协作，
确保系统能力能支撑这个方向。
API 治理则和其他基于这套基础设施构建能力的 SIG 协作，定义约定与模式，
确保大家以一致方式使用 API Machinery 提供的能力。&lt;/p&gt;
&lt;!--
**FM: Thank you. That clarifies the flow. Going back to [release cycles](https://kubernetes.io/releases/release/): do release phases - enhancements freeze, code
freeze - change your workload? Or is API Governance mostly continuous?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：谢谢，这样流程就很清晰了。再回到&lt;a href=&#34;https://kubernetes.io/releases/release/&#34;&gt;发布周期&lt;/a&gt;：
增强冻结、代码冻结这些阶段会改变你们的工作负载吗？还是说 API 治理更多是持续性的工作？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: We get involved in two places: design and implementation. Design involvement increases
before enhancements freeze; implementation involvement increases before code freeze. However, many
efforts span multiple releases, so there is always some design and implementation happening, even
for work targeting future releases. Between those intense periods, we often have time to work on
long-term design work.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：我们主要在两个地方介入：设计和实现。
增强冻结前，设计相关介入会增加；代码冻结前，实现相关介入会增加。
不过很多工作会跨多个发布周期，所以即便是在相对平缓的阶段，
也始终会有一些面向未来版本的设计与实现在推进。
在这些高强度时段之间，我们通常会有时间投入长期设计工作。&lt;/p&gt;
&lt;!--
An anti-pattern we see is teams thinking about a large feature for months and then presenting it
three weeks before enhancements freeze, saying, &#34;Here is the design, please review.&#34; For big changes
with API impact, it&#39;s much better to involve API Governance early.
--&gt;
&lt;p&gt;我们看到的一个反模式是：团队构思一个大特性几个月，
然后在增强冻结前三周才拿出来说“这是设计，请评审”。
对这类有 API 影响的大变更，更好的做法是尽早让 API 治理参与进来。&lt;/p&gt;
&lt;!--
And there are good times in the cycle for this - between freezes - when people have bandwidth.
That&#39;s when long-term review work fits best.
--&gt;
&lt;p&gt;而且发布周期里确实有适合做这件事的窗口期，
比如两个冻结阶段之间，大家带宽相对更充足。
这是做长期评审工作的最佳时机。&lt;/p&gt;
&lt;!--
## Getting involved
--&gt;
&lt;h2 id=&#34;如何参与&#34;&gt;如何参与&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e5%8f%82%e4%b8%8e&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**FM: Clearly. Now, regarding team dynamics and new contributors: how can someone get involved in
API Governance? What should they focus on?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：很明确。那从团队协作和新贡献者角度看，大家可以如何参与 API 治理？
应该从什么入手？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: It&#39;s usually best to follow a specific change rather than trying to learn everything at
once. Pick a small API change, perhaps one someone else is making or one you want to make, and
observe the full process: design, implementation, review.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：通常最好的办法是跟一个具体变更，而不是试图一次性学完所有东西。
挑一个小 API 变更，可以是别人正在做的，也可以是你自己想做的，
然后完整观察它的全流程：设计、实现、评审。&lt;/p&gt;
&lt;!--
High-bandwidth review - live discussion over video - is often very effective. If you&#39;re making or
following a change, ask whether there&#39;s a time to go over the design or PR together. Observing those
discussions is extremely instructive.
--&gt;
&lt;p&gt;高带宽评审（例如视频实时讨论）通常非常有效。
如果你正在做或跟踪某个变更，可以问问是否能约个时间一起过设计或 PR。
旁听这类讨论会非常有帮助。&lt;/p&gt;
&lt;!--
Start with a small change. Then move to a bigger one. Then maybe a new API. That builds
understanding of conventions as they are applied in practice.
--&gt;
&lt;p&gt;先从小变更开始，再做更大的，再到一个全新的 API。
这样你会逐步理解这些约定在实践中是如何应用的。&lt;/p&gt;
&lt;!--
**FM: Excellent. Any final comments, or anything we missed?**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：非常好。最后还有什么想补充的吗？&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: Yes... the reason we care so much about compatibility and stability is for our users. It&#39;s
easy for contributors to see those requirements as painful obstacles preventing cleanup or requiring
tedious work... but users integrated with our system, and we made a promise to them: we want them to
trust that we won&#39;t break that contract. So even when it requires more work, moves slower, or
involves duplication, we choose stability.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：有。我们之所以如此重视兼容性和稳定性，是为了用户。
对贡献者来说，这些要求有时像痛苦的阻碍，妨碍重构或带来繁琐工作；
但用户已经把自己的系统和我们集成在一起，而我们对他们有承诺：
我们希望他们相信，我们不会打破这份契约。
所以即使这意味着更多工作、更慢节奏，甚至需要重复实现，我们依然选择稳定性。&lt;/p&gt;
&lt;!--
We are not trying to be obstructive; we are trying to make life good for users.
--&gt;
&lt;p&gt;我们并不是想设置障碍，而是希望让用户有更好的使用体验。&lt;/p&gt;
&lt;!--
A lot of our questions focus on the future: you want to do something now... how will you evolve it
later without breaking it? We assume we will know more in the future, and we want the design to
leave room for that.
--&gt;
&lt;p&gt;我们很多问题都在关注未来：你现在想做的这个东西，
以后如何演进而不破坏兼容性？
我们假设未来会知道得更多，因此希望设计能为未来变化留出空间。&lt;/p&gt;
&lt;!--
We also assume we will make mistakes. The question then is: how do we leave ourselves avenues to
improve while keeping compatibility promises?
--&gt;
&lt;p&gt;我们也假设自己会犯错。那关键问题就是：如何给自己留下改进通道，
同时继续履行兼容性承诺？&lt;/p&gt;
&lt;!--
**FM: Exactly. Jordan, thank you, I think we&#39;ve covered everything. This has been an insightful view
into the API Governance project and its role in the wider Kubernetes project.**
--&gt;
&lt;p&gt;&lt;strong&gt;FM：完全同意。Jordan，谢谢你，我想我们已经覆盖了所有关键点。
这次访谈让大家对 API 治理项目及其在 Kubernetes 全局中的作用有了非常清晰的认识。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
**JL**: Thank you.
--&gt;
&lt;p&gt;&lt;strong&gt;JL&lt;/strong&gt;：谢谢。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>节点就绪控制器简介</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/02/03/introducing-node-readiness-controller/</link>
      <pubDate>Tue, 03 Feb 2026 10:00:00 +0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/02/03/introducing-node-readiness-controller/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Introducing Node Readiness Controller&#34;
date: 2026-02-03T10:00:00+08:00
slug: introducing-node-readiness-controller
author: &gt;
  Ajay Sundar Karuppasamy (Google)
--&gt;
&lt;img style=&#34;float: right; display: inline-block; margin-left: 2em; max-width: 15em;&#34; src=&#34;./node-readiness-controller-logo.svg&#34; alt=&#34;Logo for node readiness controller&#34; /&gt;
&lt;!--
In the standard Kubernetes model, a node’s suitability for workloads hinges on a single binary &#34;Ready&#34; condition. However, in modern Kubernetes environments, nodes require complex infrastructure dependencies—such as network agents, storage drivers, GPU firmware, or custom health checks—to be fully operational before they can reliably host pods.

Today, on behalf of the Kubernetes project, I am announcing the [Node Readiness Controller](https://node-readiness-controller.sigs.k8s.io/).
This project introduces a declarative system for managing node taints, extending the readiness guardrails during node bootstrapping beyond standard conditions.
By dynamically managing taints based on custom health signals, the controller ensures that workloads are only placed on nodes that met all infrastructure-specific requirements.
--&gt;
&lt;p&gt;在标准的 Kubernetes 模型中，节点是否适合运行工作负载取决于一个简单的“就绪”状态。
然而，在现代 Kubernetes 环境中，节点需要复杂的底层架构依赖项
（例如网络代理、存储驱动程序、GPU 固件或自定义健康检查）才能完全运行，从而可靠地托管 Pod。&lt;/p&gt;
&lt;p&gt;今天，我代表 Kubernetes 项目宣布推出&lt;a href=&#34;https://node-readiness-controller.sigs.k8s.io/&#34;&gt;节点就绪控制器&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;该项目引入了一个声明式系统来管理节点污点，从而在节点启动过程中扩展了就绪保护机制，使其超越了标准条件。&lt;/p&gt;
&lt;p&gt;通过基于自定义健康信号动态管理污点，该控制器确保工作负载仅部署在满足所有底层架构特定要求的节点上。&lt;/p&gt;
&lt;!--
## Why the Node Readiness Controller?

Core Kubernetes Node &#34;Ready&#34; status is often insufficient for clusters with sophisticated bootstrapping requirements. Operators frequently struggle to ensure that specific DaemonSets or local services are healthy before a node enters the scheduling pool.

The Node Readiness Controller fills this gap by allowing operators to define custom scheduling gates tailored to specific node groups. This enables you to enforce
distinct readiness requirements across heterogeneous clusters, ensuring for example, that GPU equipped nodes only accept pods once specialized drivers are verified,
while general purpose nodes follow a standard path.
--&gt;
&lt;h2 id=&#34;为什么需要节点就绪控制器&#34;&gt;为什么需要节点就绪控制器？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%ba%e4%bb%80%e4%b9%88%e9%9c%80%e8%a6%81%e8%8a%82%e7%82%b9%e5%b0%b1%e7%bb%aa%e6%8e%a7%e5%88%b6%e5%99%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;对于具有复杂引导要求的集群，Kubernetes 核心节点的“就绪”状态通常不足以满足需求。
运维人员经常需要确保特定的 DaemonSet 或本地服务在节点进入调度池之前处于健康状态。&lt;/p&gt;
&lt;p&gt;节点就绪控制器通过允许运维人员定义针对特定节点组的自定义调度门控来弥补这一不足。
这使你能够在异构集群中强制执行不同的就绪要求，例如，确保配备 GPU 的节点只有在验证了专用驱动程序后才能接受 Pod，
而通用节点则遵循标准路径。&lt;/p&gt;
&lt;!--
It provides three primary advantages:

- **Custom Readiness Definitions**: Define what _ready_ means for your specific platform.
- **Automated Taint Management**: The controller automatically applies or removes node taints based on condition status, preventing pods from landing on unready infrastructure.
- **Declarative Node Bootstrapping**: Manage multi-step node initialization reliably, with a clear observability into the bootstrapping process.
--&gt;
&lt;p&gt;它提供三大主要优势：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;自定义就绪状态定义&lt;/strong&gt;：定义特定平台上的“就绪”状态。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;自动化污点管理&lt;/strong&gt;：控制器会根据状态自动应用或移除节点污点，防止 Pod 部署到未就绪的基础设施上。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;声明式节点引导&lt;/strong&gt;：可靠地管理多步骤节点初始化，并清晰地观察引导过程。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Core concepts and features

The controller centers around the NodeReadinessRule (NRR) API, which allows you to define declarative _gates_ for your nodes.
--&gt;
&lt;h2 id=&#34;核心概念和特性&#34;&gt;核心概念和特性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%a0%b8%e5%bf%83%e6%a6%82%e5%bf%b5%e5%92%8c%e7%89%b9%e6%80%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;控制器以节点就绪规则（NodeReadinessRule，NRR）API 为核心，该 API 允许你为节点定义声明式的“门控”。&lt;/p&gt;
&lt;!--
### Flexible enforcement modes

The controller supports two distinct operational modes:

Continuous enforcement
: Actively maintains the readiness guarantee throughout the node’s entire lifecycle. If a critical dependency (like a device driver) fails later, the node is immediately tainted to prevent new scheduling.

Bootstrap-only enforcement
: Specifically for one-time initialization steps, such as pre-pulling heavy images or hardware provisioning. Once conditions are met, the controller marks the bootstrap as complete and stops monitoring that specific rule for the node.
--&gt;
&lt;h3 id=&#34;灵活的强制执行模式&#34;&gt;灵活的强制执行模式&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%81%b5%e6%b4%bb%e7%9a%84%e5%bc%ba%e5%88%b6%e6%89%a7%e8%a1%8c%e6%a8%a1%e5%bc%8f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;控制器支持两种不同的运行模式：&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;持续强制执行&lt;/dt&gt;
&lt;dd&gt;在节点的整个生命周期内主动维护就绪保证。
如果关键依赖项（例如设备驱动程序）之后发生故障，则该节点会立即被标记为“已污染”，以防止新的调度。&lt;/dd&gt;
&lt;dt&gt;仅引导强制执行&lt;/dt&gt;
&lt;dd&gt;专门用于一次性初始化步骤，例如预拉取大型镜像或硬件配置。
一旦满足条件，控制器会将引导过程标记为已完成，并停止监控该节点的该特定规则。&lt;/dd&gt;
&lt;/dl&gt;
&lt;!--
### Condition reporting

The controller reacts to Node Conditions rather than performing health checks itself. This decoupled design allows it to integrate seamlessly with other tools existing in the ecosystem as well as custom solutions:

- **[Node Problem Detector](https://github.com/kubernetes/node-problem-detector) (NPD)**: Use existing NPD setups and custom scripts to report node health.
- **Readiness Condition Reporter**: A lightweight agent provided by the project that can be deployed to periodically check local HTTP endpoints and patch node conditions accordingly.
--&gt;
&lt;h3 id=&#34;状态报告&#34;&gt;状态报告&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%8a%b6%e6%80%81%e6%8a%a5%e5%91%8a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;控制器响应节点状态，而非自行执行健康检查。
这种解耦设计使其能够与生态系统中现有的其他工具以及自定义解决方案无缝集成：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/kubernetes/node-problem-detector&#34;&gt;节点问题检测器&lt;/a&gt;（NPD）&lt;/strong&gt;：
使用现有的 NPD 配置和自定义脚本来报告节点健康状况。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;就绪状态报告器&lt;/strong&gt;：项目提供的一个轻量级代理，可以部署用于定期检查本地 HTTP 端点并相应地更新节点状态。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Operational safety with dry run

Deploying new readiness rules across a fleet carries inherent risk. To mitigate this, _dry run_ mode allows operators to first simulate impact on the cluster.
In this mode, the controller logs intended actions and updates the rule&#39;s status to show affected nodes without applying actual taints, enabling safe validation before enforcement.
--&gt;
&lt;h3 id=&#34;通过试运行确保运行安全&#34;&gt;通过试运行确保运行安全&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%80%9a%e8%bf%87%e8%af%95%e8%bf%90%e8%a1%8c%e7%a1%ae%e4%bf%9d%e8%bf%90%e8%a1%8c%e5%ae%89%e5%85%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;在整个集群中部署新的就绪规则存在固有风险。
为了降低这种风险，&lt;strong&gt;试运行&lt;/strong&gt;模式允许运维人员首先模拟对集群的影响。
在此模式下，控制器会记录预期操作并更新规则状态以显示受影响的节点，
而无需实际应用污点，从而在强制执行前实现安全验证。&lt;/p&gt;
&lt;!--
## Example: CNI bootstrapping

The following NodeReadinessRule ensures a node remains unschedulable until its CNI agent is functional. The controller monitors a custom `cniplugin.example.net/NetworkReady` condition and only removes the `readiness.k8s.io/acme.com/network-unavailable` taint once the status is True.
--&gt;
&lt;h2 id=&#34;示例-cni-引导&#34;&gt;示例：CNI 引导&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%a4%ba%e4%be%8b-cni-%e5%bc%95%e5%af%bc&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;以下 NodeReadinessRule 确保节点在 CNI 代理正常工作之前保持不可调度状态。
控制器监控自定义的 &lt;code&gt;cniplugin.example.net/NetworkReady&lt;/code&gt; 条件，
并且仅当该状态为 True 时才移除 &lt;code&gt;readiness.k8s.io/acme.com/network-unavailable&lt;/code&gt; 污点。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;readiness.node.x-k8s.io/v1alpha1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;NodeReadinessRule&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;network-readiness-rule&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;conditions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;cniplugin.example.net/NetworkReady&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requiredStatus&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;True&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;taint&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;readiness.k8s.io/acme.com/network-unavailable&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;pending&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;enforcementMode&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;bootstrap-only&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nodeSelector&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matchLabels&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;node-role.kubernetes.io/worker&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
**Demo**:
--&gt;
&lt;p&gt;&lt;strong&gt;演示&lt;/strong&gt;：&lt;/p&gt;
&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen=&#34;allowfullscreen&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/hohIIEXlNpo?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;Node Readiness Controller Demo&#34;&gt;&lt;/iframe&gt;
    &lt;/div&gt;

&lt;!--
## Getting involved

The Node Readiness Controller is just getting started, with our [initial releases](https://github.com/kubernetes-sigs/node-readiness-controller/releases/tag/v0.1.1) out, and we are seeking community feedback to refine the roadmap. Following our productive Unconference discussions at KubeCon NA 2025, we are excited to continue the conversation in person.

Join us at KubeCon + CloudNativeCon Europe 2026 for our maintainer track session: *[Addressing Non-Deterministic Scheduling: Introducing the Node Readiness Controller](https://sched.co/2EF6E)*.
--&gt;
&lt;h2 id=&#34;参与方式&#34;&gt;参与方式&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e6%96%b9%e5%bc%8f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;节点就绪控制器（Node Readiness Controller）刚刚起步，
我们的&lt;a href=&#34;https://github.com/kubernetes-sigs/node-readiness-controller/releases/tag/v0.1.1&#34;&gt;初始版本&lt;/a&gt;已经发布，
我们正在寻求社区反馈以完善路线图。
继我们在 KubeCon NA 2025 上富有成效的非正式会议讨论之后，我们很高兴能继续进行线下交流。&lt;/p&gt;
&lt;p&gt;欢迎参加 KubeCon + CloudNativeCon Europe 2026 的维护者专场会议：
&lt;strong&gt;&lt;a href=&#34;https://sched.co/2EF6E&#34;&gt;解决非确定性调度问题：节点就绪控制器简介&lt;/a&gt;&lt;/strong&gt;。&lt;/p&gt;
&lt;!--
In the meantime, you can contribute or track our progress here:

- GitHub: https://sigs.k8s.io/node-readiness-controller
- Slack: Join the conversation in [#sig-node-readiness-controller](https://kubernetes.slack.com/messages/sig-node-readiness-controller) 
- Documentation: [Getting Started](https://node-readiness-controller.sigs.k8s.io/)
--&gt;
&lt;p&gt;与此同时，你可以通过以下方式贡献力量或关注我们的进展：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHub：https://sigs.k8s.io/node-readiness-controller&lt;/li&gt;
&lt;li&gt;Slack：加入 &lt;a href=&#34;https://kubernetes.slack.com/messages/sig-node-readiness-controller&#34;&gt;#sig-node-readiness-controller&lt;/a&gt; 参与讨论&lt;/li&gt;
&lt;li&gt;文档：&lt;a href=&#34;https://node-readiness-controller.sigs.k8s.io/&#34;&gt;入门指南&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Ingress NGINX：Kubernetes 指导委员会和安全响应委员会的声明</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/29/ingress-nginx-statement/</link>
      <pubDate>Thu, 29 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/29/ingress-nginx-statement/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Ingress NGINX: Statement from the Kubernetes Steering and Security Response Committees&#34;
date: 2026-01-29
slug: ingress-nginx-statement
author: &gt;
  [Kat Cosgrove](https://github.com/katcosgrove) (Steering Committee)
--&gt;
&lt;!--
**In March 2026, Kubernetes will retire Ingress NGINX, a piece of critical infrastructure for about half of cloud native environments.** 
The retirement of Ingress NGINX was [announced](https://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/) for March 2026,
after years of [public warnings](https://groups.google.com/a/kubernetes.io/g/dev/c/rxtrKvT_Q8E/m/6_ej0c1ZBAAJ)
that the project was in dire need of contributors and maintainers.
There will be no more releases for bug fixes, security patches, or any updates of any kind after the project is retired.
This cannot be ignored, brushed off, or left until the last minute to address.
We cannot overstate the severity of this situation or the importance of beginning migration
to alternatives like [Gateway API](https://gateway-api.sigs.k8s.io/guides/getting-started/)
or one of the many [third-party Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/) immediately.
---&gt;
&lt;p&gt;&lt;strong&gt;Kubernetes 将于 2026 年 3 月停止维护 Ingress NGINX，
该基础设施是大约一半云原生环境的关键组成部分。&lt;/strong&gt;
Ingress NGINX 的停止维护计划已于 2026 年 3 月正式宣布，此前多年来，
Kubernetes 一直公开警告该项目急需贡献者和维护者。
项目停止维护后，将不再发布任何错误修复、安全补丁或任何类型的更新。
此事不能被忽视、敷衍了事，更不能拖延到最后一刻才处理。
我们再怎么强调这种情况的严重性，以及立即开始迁移到替代方案
（例如 &lt;a href=&#34;https://gateway-api.sigs.k8s.io/guides/getting-started/&#34;&gt;Gateway API&lt;/a&gt;
或众多&lt;a href=&#34;https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/&#34;&gt;第三方 Ingress 控制器&lt;/a&gt;）
的重要性都不为过。&lt;/p&gt;
&lt;!--
To be abundantly clear: choosing to remain with Ingress NGINX after its retirement leaves you and your users vulnerable to attack. None of the available alternatives are direct drop-in replacements. This will require planning and engineering time. Half of you will be affected. You have two months left to prepare.

**Existing deployments will continue to work, so unless you proactively check, you may not know you are affected until you are compromised.** In most cases, you can check to find out whether or not you rely on Ingress NGINX by running `kubectl get pods --all-namespaces --selector app.kubernetes.io/name=ingress-nginx` with cluster administrator permissions.
--&gt;
&lt;p&gt;必须明确指出：在 Ingress NGINX 退役后继续使用，将使你和你的用户面临攻击风险。
目前没有任何替代方案可以直接替换 Ingress NGINX。这需要规划和工程时间。
大约一半的用户会受到影响。你还有两个月的时间来准备。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;现有部署将继续运行，因此，除非你主动检查，否则你可能直到系统遭到入侵才会意识到自己受到影响。&lt;/strong&gt;
在大多数情况下，你可以使用集群管理员权限运行
&lt;code&gt;kubectl get pods --all-namespaces --selector app.kubernetes.io/name=ingress-nginx&lt;/code&gt;
命令，来检查你是否依赖于 Ingress NGINX。&lt;/p&gt;
&lt;!--
Despite its broad appeal and widespread use by companies of all sizes,
and repeated calls for help from the maintainers,
the Ingress NGINX project never received the contributors it so desperately needed.
According to internal Datadog research, about 50% of cloud native environments
currently rely on this tool, and yet for the last several years,
it has been maintained solely by one or two people working in their free time.
Without sufficient staffing to maintain the tool to a standard both ourselves
and our users would consider secure, the responsible choice is to wind it
down and refocus efforts on modern alternatives like [Gateway API](https://gateway-api.sigs.k8s.io/guides/getting-started/).
--&gt;
&lt;p&gt;尽管 Ingress NGINX 项目广受欢迎，被各种规模的公司广泛使用，而且维护者也多次呼吁贡献者加入，
但它始终未能获得急需的贡献者。根据 Datadog 的内部研究，
目前约有 50% 的云原生环境依赖于该工具，然而在过去的几年里，
它一直由一两个人利用业余时间维护。
由于没有足够的人员来将该工具维护到我们和用户都认为安全的水平，
负责任的选择是逐步停止该项目，并将精力重新集中到诸如
&lt;a href=&#34;https://gateway-api.sigs.k8s.io/guides/getting-started/&#34;&gt;Gateway API&lt;/a&gt; 等现代替代方案上。&lt;/p&gt;
&lt;!--
We did not make this decision lightly; as inconvenient as it is now,
doing so is necessary for the safety of all users and the ecosystem as a whole.
Unfortunately, the flexibility Ingress NGINX was designed with, that was once a boon,
has become a burden that cannot be resolved. With the technical debt that has piled up,
and fundamental design decisions that exacerbate security flaws,
it is no longer reasonable or even possible to continue maintaining the tool even if resources did materialize.
--&gt;
&lt;p&gt;我们做出这个决定并非轻率之举；尽管目前会带来诸多不便，
但为了所有用户和整个生态系统的安全，这是必要的。
遗憾的是，Ingress NGINX 最初设计的灵活性 —— 曾经是一大优势——如今却成了无法解决的负担。
由于技术债务不断累积，以及一些根本性的设计决策加剧了安全漏洞，即便未来资源到位，
继续维护该工具也已不再合理，甚至不可能。&lt;/p&gt;
&lt;!--
We issue this statement together to reinforce the scale of this change
and the potential for serious risk to a significant percentage of
Kubernetes users if this issue is ignored.
It is imperative that you check your clusters now.
If you are reliant on Ingress NGINX, you must begin planning for migration.
--&gt;
&lt;p&gt;我们联合发布此声明，旨在强调此次变更的规模之大，
以及若忽视此问题可能对相当一部分 Kubernetes 用户造成严重风险。
你务必立即检查你的集群。如果你依赖 Ingress NGINX，则必须开始规划迁移。&lt;/p&gt;
&lt;!--
Thank you,

Kubernetes Steering Committee

Kubernetes Security Response Committee
--&gt;
&lt;p&gt;谢谢，&lt;/p&gt;
&lt;p&gt;Kubernetes 指导委员会&lt;/p&gt;
&lt;p&gt;Kubernetes 安全响应委员会&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>使用 kind 体验 Gateway API</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/28/experimenting-gateway-api-with-kind/</link>
      <pubDate>Wed, 28 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/28/experimenting-gateway-api-with-kind/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Experimenting with Gateway API using kind&#34;
date: 2026-01-28
slug: experimenting-gateway-api-with-kind
evergreen: true
author: &gt;
  [Ricardo Katz](https://github.com/rikatz) (Red Hat)
--&gt;
&lt;!--
This document will guide you through setting up a local experimental environment with [Gateway API](https://gateway-api.sigs.k8s.io/) on [kind](https://kind.sigs.k8s.io/). This setup is designed for learning and testing. It helps you understand Gateway API concepts without production complexity.
--&gt;
&lt;p&gt;本文档将指导你在 &lt;a href=&#34;https://kind.sigs.k8s.io/&#34;&gt;kind&lt;/a&gt; 上设置一个使用
&lt;a href=&#34;https://gateway-api.sigs.k8s.io/&#34;&gt;Gateway API&lt;/a&gt; 的本地实验环境。
此设置专为学习和测试而设计，可帮助你在没有生产环境复杂性的情况下理解 Gateway API 概念。&lt;/p&gt;
&lt;div class=&#34;alert alert-caution&#34; role=&#34;note&#34;&gt;&lt;h4 class=&#34;alert-heading&#34;&gt;注意：&lt;/h4&gt;&lt;!--
This is an experimentation learning setup, and should not be used for production. The components used on this document are not suited for production usage.
Once you&#39;re ready to deploy Gateway API in a production environment, 
select an [implementation](https://gateway-api.sigs.k8s.io/implementations/) that suits your needs.
--&gt;
&lt;p&gt;这是一个实验性学习设置，不应用于生产环境。本文档中使用的组件不适合生产使用。
当你准备在生产环境中部署 Gateway API 时，
请选择适合你需求的&lt;a href=&#34;https://gateway-api.sigs.k8s.io/implementations/&#34;&gt;实现&lt;/a&gt;。&lt;/p&gt;&lt;/div&gt;

&lt;!--
## Overview
--&gt;
&lt;h2 id=&#34;概述&#34;&gt;概述&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%a6%82%e8%bf%b0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
In this guide, you will:
- Set up a local Kubernetes cluster using kind (Kubernetes in Docker)
- Deploy [cloud-provider-kind](https://github.com/kubernetes-sigs/cloud-provider-kind), which provides both LoadBalancer Services and a Gateway API controller
- Create a Gateway and HTTPRoute to route traffic to a demo application
- Test your Gateway API configuration locally
--&gt;
&lt;p&gt;在本指南中，你将：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;使用 kind（Kubernetes in Docker）设置本地 Kubernetes 集群&lt;/li&gt;
&lt;li&gt;部署 &lt;a href=&#34;https://github.com/kubernetes-sigs/cloud-provider-kind&#34;&gt;cloud-provider-kind&lt;/a&gt;，
它提供 LoadBalancer Service 和 Gateway API 控制器&lt;/li&gt;
&lt;li&gt;创建 Gateway 和 HTTPRoute 以将流量路由到演示应用&lt;/li&gt;
&lt;li&gt;在本地测试你的 Gateway API 配置&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
This setup is ideal for learning, development, and experimentation with Gateway API concepts.
--&gt;
&lt;p&gt;此设置非常适合学习、开发和体验 Gateway API 概念。&lt;/p&gt;
&lt;!--
## Prerequisites
--&gt;
&lt;h2 id=&#34;前提条件&#34;&gt;前提条件&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%89%8d%e6%8f%90%e6%9d%a1%e4%bb%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Before you begin, ensure you have the following installed on your local machine:
--&gt;
&lt;p&gt;在开始之前，请确保你的本地机器上安装了以下工具：&lt;/p&gt;
&lt;!--
- **[Docker](https://docs.docker.com/get-docker/)** - Required to run kind and cloud-provider-kind
- **[kubectl](https://kubernetes.io/docs/tasks/tools/)** - The Kubernetes command-line tool
- **[kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)** - Kubernetes in Docker
- **[curl](https://curl.se/)** - Required to test the routes
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://docs.docker.com/get-docker/&#34;&gt;Docker&lt;/a&gt;&lt;/strong&gt; - 运行 kind 和 cloud-provider-kind 所需&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://kubernetes.io/docs/tasks/tools/&#34;&gt;kubectl&lt;/a&gt;&lt;/strong&gt; - Kubernetes 命令行工具&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://kind.sigs.k8s.io/docs/user/quick-start/#installation&#34;&gt;kind&lt;/a&gt;&lt;/strong&gt; - Kubernetes in Docker&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://curl.se/&#34;&gt;curl&lt;/a&gt;&lt;/strong&gt; - 测试路由所需&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Create a kind cluster
--&gt;
&lt;h3 id=&#34;创建-kind-集群&#34;&gt;创建 kind 集群&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%88%9b%e5%bb%ba-kind-%e9%9b%86%e7%be%a4&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Create a new kind cluster by running:
--&gt;
&lt;p&gt;运行以下命令创建一个新的 kind 集群：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kind create cluster
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This will create a single-node Kubernetes cluster running in a Docker container.
--&gt;
&lt;p&gt;这将创建一个在 Docker 容器中运行的单节点 Kubernetes 集群。&lt;/p&gt;
&lt;!--
### Install cloud-provider-kind
--&gt;
&lt;h3 id=&#34;安装-cloud-provider-kind&#34;&gt;安装 cloud-provider-kind&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%ae%89%e8%a3%85-cloud-provider-kind&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Next, you need [cloud-provider-kind](https://github.com/kubernetes-sigs/cloud-provider-kind/), which provides two key components for this setup:
- A LoadBalancer controller that assigns addresses to LoadBalancer-type Services
- A Gateway API controller that implements the Gateway API specification

It also automatically installs the Gateway API Custom Resource Definitions (CRDs) in your cluster.
--&gt;
&lt;p&gt;接下来，你需要 &lt;a href=&#34;https://github.com/kubernetes-sigs/cloud-provider-kind/&#34;&gt;cloud-provider-kind&lt;/a&gt;，
它为此设置提供两个关键组件：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;为 LoadBalancer 类型的 Service 分配地址的 LoadBalancer 控制器&lt;/li&gt;
&lt;li&gt;实现 Gateway API 规范的 Gateway API 控制器&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;它还会自动在你的集群中安装 Gateway API 的自定义资源定义（CRD）。&lt;/p&gt;
&lt;!--
Run cloud-provider-kind as a Docker container on the same host where you created the kind cluster:
--&gt;
&lt;p&gt;在创建 kind 集群的同一主机上，将 cloud-provider-kind 作为 Docker 容器运行：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;VERSION&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;$(&lt;/span&gt;basename &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;$(&lt;/span&gt;curl -s -L -o /dev/null -w &lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;%{url_effective}&amp;#39;&lt;/span&gt; https://github.com/kubernetes-sigs/cloud-provider-kind/releases/latest&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;))&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -d --name cloud-provider-kind --rm --network host -v /var/run/docker.sock:/var/run/docker.sock registry.k8s.io/cloud-provider-kind/cloud-controller-manager:&lt;span style=&#34;color:#b68;font-weight:bold&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;VERSION&lt;/span&gt;&lt;span style=&#34;color:#b68;font-weight:bold&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
**Note:** On some systems, you may need elevated privileges to access the Docker socket.
--&gt;
&lt;p&gt;&lt;strong&gt;注意&lt;/strong&gt;：在某些系统上，你可能需要提升权限才能访问 Docker socket。&lt;/p&gt;
&lt;!--
Verify that cloud-provider-kind is running:
--&gt;
&lt;p&gt;验证 cloud-provider-kind 是否正在运行：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker ps --filter &lt;span style=&#34;color:#b8860b&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;cloud-provider-kind
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
You should see the container listed and in a running state. You can also check the logs:
--&gt;
&lt;p&gt;你应该看到容器已列出并处于运行状态。你也可以检查日志：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker logs cloud-provider-kind
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Experimenting with Gateway API
--&gt;
&lt;h2 id=&#34;体验-gateway-api&#34;&gt;体验 Gateway API&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bd%93%e9%aa%8c-gateway-api&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Now that your cluster is set up, you can start experimenting with Gateway API resources.

cloud-provider-kind automatically provisions a GatewayClass called `cloud-provider-kind`. You&#39;ll use this class to create your Gateway.

It is worth noticing that while kind is not a cloud provider, the project is named as `cloud-provider-kind` as it provides features that simulate a cloud-enabled environment.
--&gt;
&lt;p&gt;现在你的集群已设置完成，你可以开始体验 Gateway API 资源。&lt;/p&gt;
&lt;p&gt;cloud-provider-kind 会自动提供一个名为 &lt;code&gt;cloud-provider-kind&lt;/code&gt;
的 GatewayClass。你将使用此类来创建你的 Gateway。&lt;/p&gt;
&lt;p&gt;值得注意的是，虽然 kind 不是云提供商，但该项目命名为
&lt;code&gt;cloud-provider-kind&lt;/code&gt;，因为它提供模拟云环境的功能。&lt;/p&gt;
&lt;!--
### Deploy a Gateway
--&gt;
&lt;h3 id=&#34;部署-gateway&#34;&gt;部署 Gateway&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%83%a8%e7%bd%b2-gateway&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The following manifest will:
- Create a new namespace called `gateway-infra`
- Deploy a Gateway that listens on port 80
- Accept HTTPRoutes with hostnames matching the `*.exampledomain.example` pattern
- Allow routes from any namespace to attach to the Gateway. 
  **Note**: In real clusters, prefer Same or Selector values on the [`allowedRoutes` namespace selector](https://gateway-api.sigs.k8s.io/reference/spec/#fromnamespaces) field to limit attachments.
--&gt;
&lt;p&gt;以下清单将：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;创建一个名为 &lt;code&gt;gateway-infra&lt;/code&gt; 的新命名空间&lt;/li&gt;
&lt;li&gt;部署一个监听端口 80 的 Gateway&lt;/li&gt;
&lt;li&gt;接受主机名匹配 &lt;code&gt;*.exampledomain.example&lt;/code&gt; 模式的 HTTPRoute&lt;/li&gt;
&lt;li&gt;允许来自任何命名空间的路由附加到 Gateway。
&lt;strong&gt;注意&lt;/strong&gt;：在实际集群中，建议在
&lt;a href=&#34;https://gateway-api.sigs.k8s.io/reference/spec/#fromnamespaces&#34;&gt;&lt;code&gt;allowedRoutes&lt;/code&gt; namespace selector&lt;/a&gt;
字段上使用 Same 或 Selector 值来限制附加。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Apply the following manifest:
--&gt;
&lt;p&gt;应用以下清单：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Namespace&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway-infra&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Gateway&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway-infra&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gatewayClassName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;cloud-provider-kind&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;listeners&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;default&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostname&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;*.exampledomain.example&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;protocol&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;allowedRoutes&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespaces&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;from&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;All&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Then verify that your Gateway is properly programmed and has an address assigned:
--&gt;
&lt;p&gt;然后验证你的 Gateway 是否已正确编程并分配了地址：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get gateway -n gateway-infra gateway
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Expected output:
--&gt;
&lt;p&gt;预期输出：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;NAME      CLASS                 ADDRESS      PROGRAMMED   AGE
gateway   cloud-provider-kind   172.18.0.3   True         5m6s
&lt;/code&gt;&lt;/pre&gt;&lt;!--
The PROGRAMMED column should show True, and the ADDRESS field should contain an IP address.
--&gt;
&lt;p&gt;PROGRAMMED 列应显示 True，ADDRESS 字段应包含 IP 地址。&lt;/p&gt;
&lt;!--
### Deploy a demo application
--&gt;
&lt;h3 id=&#34;部署演示应用&#34;&gt;部署演示应用&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%83%a8%e7%bd%b2%e6%bc%94%e7%a4%ba%e5%ba%94%e7%94%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Next, deploy a simple echo application that will help you test your Gateway configuration. This application:
- Listens on port 3000
- Echoes back request details including path, headers, and environment variables
- Runs in a namespace called `demo`
--&gt;
&lt;p&gt;接下来，部署一个简单的 echo 应用来帮助你测试 Gateway 配置。此应用：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;监听端口 3000&lt;/li&gt;
&lt;li&gt;回显请求详情，包括路径、头部和环境变量&lt;/li&gt;
&lt;li&gt;在名为 &lt;code&gt;demo&lt;/code&gt; 的命名空间中运行&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Apply the following manifest:
--&gt;
&lt;p&gt;应用以下清单：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Namespace&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;demo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Service&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;labels&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;demo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;ports&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;http&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;3000&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;protocol&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;TCP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;targetPort&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;3000&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;selector&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ClusterIP&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;apps/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Deployment&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;labels&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;demo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;selector&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matchLabels&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;template&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;labels&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;env&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;POD_NAME&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;valueFrom&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;            &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;fieldRef&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;              &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;              &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;fieldPath&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;metadata.name&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;NAMESPACE&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;valueFrom&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;            &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;fieldRef&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;              &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;              &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;fieldPath&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;metadata.namespace&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;registry.k8s.io/gateway-api/echo-basic:v20251204-v1.4.1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo-basic&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Create an HTTPRoute
--&gt;
&lt;h3 id=&#34;创建-httproute&#34;&gt;创建 HTTPRoute&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%88%9b%e5%bb%ba-httproute&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Now create an HTTPRoute to route traffic from your Gateway to the echo application.
This HTTPRoute will:
- Respond to requests for the hostname `some.exampledomain.example`
- Route traffic to the echo application
- Attach to the Gateway in the `gateway-infra` namespace
--&gt;
&lt;p&gt;现在创建一个 HTTPRoute，将流量从你的 Gateway 路由到 echo 应用。
此 HTTPRoute 将：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;响应对主机名 &lt;code&gt;some.exampledomain.example&lt;/code&gt; 的请求&lt;/li&gt;
&lt;li&gt;将流量路由到 echo 应用&lt;/li&gt;
&lt;li&gt;附加到 &lt;code&gt;gateway-infra&lt;/code&gt; 命名空间中的 Gateway&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Apply the following manifest:
--&gt;
&lt;p&gt;应用以下清单：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway.networking.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;HTTPRoute&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;demo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;parentRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gateway-infra&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostnames&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;some.exampledomain.example&amp;#34;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;rules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;matches&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;path&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PathPrefix&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;/&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;backendRefs&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;echo&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;port&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;3000&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Test your route
--&gt;
&lt;h3 id=&#34;测试路由&#34;&gt;测试路由&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%b5%8b%e8%af%95%e8%b7%af%e7%94%b1&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The final step is to test your route using curl. You&#39;ll make a request to the Gateway&#39;s IP address with the hostname `some.exampledomain.example`. The command below is for POSIX shell only, and may need to be adjusted for your environment:
--&gt;
&lt;p&gt;最后一步是使用 curl 测试你的路由。你将使用主机名 &lt;code&gt;some.exampledomain.example&lt;/code&gt;
向 Gateway 的 IP 地址发出请求。以下命令仅适用于 POSIX shell，
可能需要根据你的环境进行调整：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;GW_ADDR&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;$(&lt;/span&gt;kubectl get gateway -n gateway-infra gateway -o &lt;span style=&#34;color:#b8860b&#34;&gt;jsonpath&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;{.status.addresses[0].value}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl --resolve some.exampledomain.example:80:&lt;span style=&#34;color:#b68;font-weight:bold&#34;&gt;${&lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;GW_ADDR&lt;/span&gt;&lt;span style=&#34;color:#b68;font-weight:bold&#34;&gt;}&lt;/span&gt; http://some.exampledomain.example
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
You should receive a JSON response similar to this:
--&gt;
&lt;p&gt;你应该收到类似以下的 JSON 响应：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;path&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;host&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;some.exampledomain.example&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;method&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;GET&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;proto&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;HTTP/1.1&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;headers&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;Accept&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;*/*&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ],
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;User-Agent&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;curl/8.15.0&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;namespace&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;demo&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;ingress&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;service&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;pod&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;echo-dc48d7cf8-vs2df&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
If you see this response, congratulations! Your Gateway API setup is working correctly.
--&gt;
&lt;p&gt;如果你看到此响应，恭喜你！你的 Gateway API 设置工作正常。&lt;/p&gt;
&lt;!--
## Troubleshooting
--&gt;
&lt;h2 id=&#34;故障排除&#34;&gt;故障排除&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%95%85%e9%9a%9c%e6%8e%92%e9%99%a4&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If something isn&#39;t working as expected, you can troubleshoot by checking the status of your resources.
--&gt;
&lt;p&gt;如果某些内容未按预期工作，你可以通过检查资源状态进行故障排除。&lt;/p&gt;
&lt;!--
### Check the Gateway status
--&gt;
&lt;h3 id=&#34;检查-gateway-状态&#34;&gt;检查 Gateway 状态&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%a3%80%e6%9f%a5-gateway-%e7%8a%b6%e6%80%81&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
First, inspect your Gateway resource:
--&gt;
&lt;p&gt;首先，检查你的 Gateway 资源：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get gateway -n gateway-infra gateway -o yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Look at the `status` section for conditions. Your Gateway should have:
- `Accepted: True` - The Gateway was accepted by the controller
- `Programmed: True` - The Gateway was successfully configured
- `.status.addresses` populated with an IP address
--&gt;
&lt;p&gt;查看 &lt;code&gt;status&lt;/code&gt; 部分的条件。你的 Gateway 应该有：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Accepted: True&lt;/code&gt; - Gateway 已被控制器接受&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Programmed: True&lt;/code&gt; - Gateway 已成功配置&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.status.addresses&lt;/code&gt; 填充了 IP 地址&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Check the HTTPRoute status
--&gt;
&lt;h3 id=&#34;检查-httproute-状态&#34;&gt;检查 HTTPRoute 状态&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%a3%80%e6%9f%a5-httproute-%e7%8a%b6%e6%80%81&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Next, inspect your HTTPRoute:
--&gt;
&lt;p&gt;接下来，检查你的 HTTPRoute：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get httproute -n demo &lt;span style=&#34;color:#a2f&#34;&gt;echo&lt;/span&gt; -o yaml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Check the `status.parents` section for conditions. Common issues include:

- ResolvedRefs set to False with reason `BackendNotFound`; this means that the backend Service doesn&#39;t exist or has the wrong name
- Accepted set to False; this means that the route couldn&#39;t attach to the Gateway (check namespace permissions or hostname matching)
--&gt;
&lt;p&gt;检查 &lt;code&gt;status.parents&lt;/code&gt; 部分的条件。常见问题包括：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ResolvedRefs 设置为 False，原因是 &lt;code&gt;BackendNotFound&lt;/code&gt;；这意味着后端 Service 不存在或名称错误&lt;/li&gt;
&lt;li&gt;Accepted 设置为 False；这意味着路由无法附加到 Gateway（检查命名空间权限或主机名匹配）&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Example error when a backend is not found:
--&gt;
&lt;p&gt;后端未找到时的示例错误：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;status&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;parents&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;conditions&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;lastTransitionTime&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;2026-01-19T17:13:35Z&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;message&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;backend not found&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;observedGeneration&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;reason&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;BackendNotFound&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;status&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;False&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;type&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ResolvedRefs&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;controllerName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kind.sigs.k8s.io/gateway-controller&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Check controller logs
--&gt;
&lt;h3 id=&#34;检查控制器日志&#34;&gt;检查控制器日志&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%a3%80%e6%9f%a5%e6%8e%a7%e5%88%b6%e5%99%a8%e6%97%a5%e5%bf%97&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
If the resource statuses don&#39;t reveal the issue, check the cloud-provider-kind logs:
--&gt;
&lt;p&gt;如果资源状态没有揭示问题，请检查 cloud-provider-kind 日志：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker logs -f cloud-provider-kind
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This will show detailed logs from both the LoadBalancer and Gateway API controllers.
--&gt;
&lt;p&gt;这将显示 LoadBalancer 和 Gateway API 控制器的详细日志。&lt;/p&gt;
&lt;!--
## Cleanup
--&gt;
&lt;h2 id=&#34;清理&#34;&gt;清理&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%b8%85%e7%90%86&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
When you&#39;re finished with your experiments, you can clean up the resources:
--&gt;
&lt;p&gt;当你完成实验后，可以清理资源：&lt;/p&gt;
&lt;!--
### Remove Kubernetes resources
--&gt;
&lt;h3 id=&#34;删除-kubernetes-资源&#34;&gt;删除 Kubernetes 资源&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%88%a0%e9%99%a4-kubernetes-%e8%b5%84%e6%ba%90&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Delete the namespaces (this will remove all resources within them):
--&gt;
&lt;p&gt;删除命名空间（这将删除其中的所有资源）：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl delete namespace gateway-infra
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl delete namespace demo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Stop cloud-provider-kind
--&gt;
&lt;h3 id=&#34;停止-cloud-provider-kind&#34;&gt;停止 cloud-provider-kind&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%81%9c%e6%ad%a2-cloud-provider-kind&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Stop and remove the cloud-provider-kind container:
--&gt;
&lt;p&gt;停止并移除 cloud-provider-kind 容器：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker stop cloud-provider-kind
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Because the container was started with the `--rm` flag, it will be automatically removed when stopped.
--&gt;
&lt;p&gt;由于容器是使用 &lt;code&gt;--rm&lt;/code&gt; 标志启动的，停止时会自动移除。&lt;/p&gt;
&lt;!--
### Delete the kind cluster
--&gt;
&lt;h3 id=&#34;删除-kind-集群&#34;&gt;删除 kind 集群&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%88%a0%e9%99%a4-kind-%e9%9b%86%e7%be%a4&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Finally, delete the kind cluster:
--&gt;
&lt;p&gt;最后，删除 kind 集群：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kind delete cluster
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Next steps
--&gt;
&lt;h2 id=&#34;下一步&#34;&gt;下一步&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%8b%e4%b8%80%e6%ad%a5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Now that you&#39;ve experimented with Gateway API locally, you&#39;re ready to explore production-ready implementations:

- **Production Deployments**: Review the [Gateway API implementations](https://gateway-api.sigs.k8s.io/implementations/) to find a controller that matches your production requirements
- **Learn More**: Explore the [Gateway API documentation](https://gateway-api.sigs.k8s.io/) to learn about advanced features like TLS, traffic splitting, and header manipulation
- **Advanced Routing**: Experiment with path-based routing, header matching, request mirroring and other features following [Gateway API user guides](https://gateway-api.sigs.k8s.io/guides/getting-started/)
--&gt;
&lt;p&gt;现在你已经在本地体验了 Gateway API，准备好探索生产就绪的实现了：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;生产部署&lt;/strong&gt;：查看 &lt;a href=&#34;https://gateway-api.sigs.k8s.io/implementations/&#34;&gt;Gateway API 实现&lt;/a&gt;
以找到符合你生产要求的控制器&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;了解更多&lt;/strong&gt;：探索 &lt;a href=&#34;https://gateway-api.sigs.k8s.io/&#34;&gt;Gateway API 文档&lt;/a&gt;了解
TLS、流量拆分和头部操作等高级功能&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;高级路由&lt;/strong&gt;：按照 &lt;a href=&#34;https://gateway-api.sigs.k8s.io/guides/getting-started/&#34;&gt;Gateway API 用户指南&lt;/a&gt;
体验基于路径的路由、头部匹配、请求镜像和其他功能&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### A final word of caution
This _kind_ setup is for development and learning only.
Always use a production-grade Gateway API implementation for real workloads.
--&gt;
&lt;h3 id=&#34;最后提醒&#34;&gt;最后提醒&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%9c%80%e5%90%8e%e6%8f%90%e9%86%92&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;这个 kind 设置仅用于开发和学习。
对于实际工作负载，请始终使用生产级的 Gateway API 实现。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Headlamp 2025 年度项目亮点</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/22/headlamp-in-2025-project-highlights/</link>
      <pubDate>Thu, 22 Jan 2026 10:00:00 +0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/22/headlamp-in-2025-project-highlights/</guid>
      <description>
        
        
        &lt;!--
title: &#34;Headlamp in 2025: Project Highlights&#34;
date: 2026-01-22T10:00:00+08:00
slug: headlamp-in-2025-project-highlights
author: &gt;
  Evangelos Skopelitis (Microsoft)
--&gt;
&lt;!--
_This announcement is a recap from a post originally [published](https://headlamp.dev/blog/2025/11/13/headlamp-in-2025) on the Headlamp blog._
--&gt;
&lt;p&gt;&lt;strong&gt;本公告是对最初在 Headlamp 博客上&lt;a href=&#34;https://headlamp.dev/blog/2025/11/13/headlamp-in-2025&#34;&gt;发布&lt;/a&gt;的帖子的回顾。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
[Headlamp](https://headlamp.dev/) has come a long way in 2025. The project has continued to grow – reaching more teams across platforms, powering new workflows and integrations through plugins, and seeing increased collaboration from the broader community.
--&gt;
&lt;p&gt;&lt;a href=&#34;https://headlamp.dev/&#34;&gt;Headlamp&lt;/a&gt; 在 2025 年取得了长足的发展。该项目持续成长，覆盖了更多平台和团队；
通过插件机制支持了新的工作流和集成方式；同时也看到了来自更广泛社区的协作不断增强。&lt;/p&gt;
&lt;!--
We wanted to take a moment to share a few updates and highlight how Headlamp has evolved over the past year.
--&gt;
&lt;p&gt;我们想借此机会分享一些最新进展，并重点介绍 Headlamp 在过去一年中的演进与变化。&lt;/p&gt;
&lt;!--
## Updates
--&gt;
&lt;h2 id=&#34;updates&#34;&gt;更新&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#updates&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Joining Kubernetes SIG UI
--&gt;
&lt;h3 id=&#34;joining-kubernetes-sig-ui&#34;&gt;加入 Kubernetes SIG UI&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#joining-kubernetes-sig-ui&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
This year marked a big milestone for the project: Headlamp is now officially part of Kubernetes [SIG UI](https://github.com/kubernetes/community/blob/master/sig-ui/README.md). This move brings roadmap and design discussions even closer to the core Kubernetes community and reinforces Headlamp&#39;s role as a modern, extensible UI for the project.
--&gt;
&lt;p&gt;今年标志着该项目的一个重要里程碑：Headlamp 现已成为 Kubernetes &lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-ui/README.md&#34;&gt;SIG UI&lt;/a&gt;
的正式组成部分。此举使路线图和设计讨论更贴近 Kubernetes 核心社区，并强化了 Headlamp 作为该项目现代化、可扩展 UI 的角色。&lt;/p&gt;
&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen=&#34;allowfullscreen&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/Q5xkeoj6JiA?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;
    &lt;/div&gt;

&lt;!--
As part of that, we&#39;ve also been sharing more about making Kubernetes approachable for a wider audience, including an [appearance on Enlightening with Whitney Lee](https://www.youtube.com/watch?v=VFOSyKVOPxs) and a [talk at KCD New York 2025](https://www.youtube.com/watch?v=Q7cbT2UBfE0).
--&gt;
&lt;p&gt;作为其中的一部分，我们还分享了更多关于让 Kubernetes 面向更广泛受众的内容，
包括在 &lt;a href=&#34;https://www.youtube.com/watch?v=VFOSyKVOPxs&#34;&gt;Enlightening with Whitney Lee&lt;/a&gt;
上的亮相以及在 &lt;a href=&#34;https://www.youtube.com/watch?v=Q7cbT2UBfE0&#34;&gt;KCD New York 2025&lt;/a&gt; 上的演讲。&lt;/p&gt;
&lt;!--
### Linux Foundation mentorship
--&gt;
&lt;h3 id=&#34;linux-foundation-mentorship&#34;&gt;Linux Foundation 导师计划&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#linux-foundation-mentorship&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
This year, we were excited to work with several students through the Linux Foundation&#39;s Mentorship program, and our mentees have already left a visible mark on Headlamp:
--&gt;
&lt;p&gt;今年，我们很高兴通过 Linux Foundation 的导师计划与多名学生合作，我们的学员已经在 Headlamp 上留下了明显的印记：&lt;/p&gt;
&lt;!--
- [**Adwait Godbole**](https://github.com/adwait-godbole) built the KEDA plugin, adding a UI in Headlamp to view and manage KEDA resources like ScaledObjects and ScaledJobs.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/adwait-godbole&#34;&gt;&lt;strong&gt;Adwait Godbole&lt;/strong&gt;&lt;/a&gt; 构建了 KEDA 插件，
在 Headlamp 中添加了用于查看和管理 KEDA 资源（如 ScaledObjects 和 ScaledJobs）的 UI。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**Dhairya Majmudar**](https://github.com/DhairyaMajmudar) set up an OpenTelemetry-based observability stack for Headlamp, wiring up metrics, logs, and traces so the project is easier to monitor and debug.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/DhairyaMajmudar&#34;&gt;&lt;strong&gt;Dhairya Majmudar&lt;/strong&gt;&lt;/a&gt; 为 Headlamp 设置了基于 OpenTelemetry 的可观测性堆栈，
连接指标、日志和追踪，使项目更易于监控和调试。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**Aishwarya Ghatole**](https://www.linkedin.com/in/aishwarya-ghatole-506745231/) led a UX audit of Headlamp plugins, identifying usability issues and proposing design improvements and personas for plugin users.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.linkedin.com/in/aishwarya-ghatole-506745231/&#34;&gt;&lt;strong&gt;Aishwarya Ghatole&lt;/strong&gt;&lt;/a&gt; 领导了 Headlamp 插件的 UX 审计，
识别可用性问题，并提出设计改进和插件用户画像。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**Anirban Singha**](https://github.com/SinghaAnirban005) developed the Karpenter plugin, giving Headlamp a focused view into Karpenter autoscaling resources and decisions.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/SinghaAnirban005&#34;&gt;&lt;strong&gt;Anirban Singha&lt;/strong&gt;&lt;/a&gt; 开发了 Karpenter 插件，
为 Headlamp 提供了专注于 Karpenter 自动扩缩容资源和决策的视图。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**Aditya Chaudhary**](https://github.com/useradityaa) improved Gateway API support, so you can see networking relationships on the resource map, as well as improved support for many of the new Gateway API resources.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/useradityaa&#34;&gt;&lt;strong&gt;Aditya Chaudhary&lt;/strong&gt;&lt;/a&gt; 改进了 Gateway API 支持，
你可以在资源映射上看到网络关系，以及对许多新的 Gateway API 资源的改进支持。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**Faakhir Zahid**](https://github.com/Faakhir30) completed a way to easily [manage plugin installation](https://headlamp.dev/docs/latest/installation/in-cluster/#plugin-management) with Headlamp deployed in clusters.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/Faakhir30&#34;&gt;&lt;strong&gt;Faakhir Zahid&lt;/strong&gt;&lt;/a&gt; 完成了一种在集群中部署 Headlamp 时
轻松&lt;a href=&#34;https://headlamp.dev/docs/latest/installation/in-cluster/#plugin-management&#34;&gt;管理插件安装&lt;/a&gt;的方法。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**Saurav Upadhyay**](https://github.com/upsaurav12) worked on backend caching for Kubernetes API calls, reducing load on the API server and improving performance in Headlamp.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/upsaurav12&#34;&gt;&lt;strong&gt;Saurav Upadhyay&lt;/strong&gt;&lt;/a&gt; 致力于 Kubernetes API 调用的后端缓存，
减少 API 服务器负载并提高 Headlamp 的性能。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## New changes
--&gt;
&lt;h2 id=&#34;new-changes&#34;&gt;新变更&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#new-changes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Multi-cluster view
--&gt;
&lt;h3 id=&#34;multi-cluster-view&#34;&gt;多集群视图&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#multi-cluster-view&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Managing multiple clusters is challenging: teams often switch between tools and lose context when trying to see what runs where. Headlamp solves this by giving you a single view to compare clusters side-by-side. This makes it easier to understand workloads across environments and reduces the time spent hunting for resources.
--&gt;
&lt;p&gt;管理多个集群具有挑战性：团队经常在工具之间切换，在尝试查看哪些内容在哪里运行时失去上下文。
Headlamp 通过提供单一视图来并排比较集群来解决这个问题。这使得跨环境理解工作负载变得更容易，
并减少了查找资源所花费的时间。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/multi-cluster-view.png&#34;
         alt=&#34;Multi-cluster view&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of multi-cluster workloads&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
### Projects
--&gt;
&lt;h3 id=&#34;projects&#34;&gt;项目&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#projects&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes apps often span multiple namespaces and resource types, which makes troubleshooting feel like piecing together a puzzle. We&#39;ve added **Projects** to give you an application-centric view that groups related resources across multiple namespaces – and even clusters. This allows you to reduce sprawl, troubleshoot faster, and collaborate without digging through YAML or cluster-wide lists.
--&gt;
&lt;p&gt;Kubernetes 应用通常跨越多个命名空间和资源类型，这使得故障排除感觉像是在拼拼图一样。
我们添加了&lt;strong&gt;项目（Projects）&lt;/strong&gt;，为你提供以应用为中心的视图，将相关资源分组到多个命名空间——甚至集群中。
这使你能够减少蔓延、更快地进行故障排除，并在无需深入研究 YAML 或集群范围列表的情况下进行协作。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/projects-feature.png&#34;
         alt=&#34;Projects feature&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of the new Projects feature&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Changes:
--&gt;
&lt;p&gt;变更：&lt;/p&gt;
&lt;!--
- New &#34;Projects&#34; feature for grouping namespaces into app- or team-centric projects
--&gt;
&lt;ul&gt;
&lt;li&gt;新的&amp;quot;项目（Projects）&amp;quot;特性，用于将命名空间分组为以应用或团队为中心的项目&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Extensible Projects details view that plugins can customize with their own tabs and actions
--&gt;
&lt;ul&gt;
&lt;li&gt;可扩展的项目详细信息视图，插件可以使用自己的标签页和操作进行自定义&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Navigation and Activities
--&gt;
&lt;h3 id=&#34;navigation-and-activities&#34;&gt;导航和活动&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#navigation-and-activities&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Day-to-day ops in Kubernetes often means juggling logs, terminals, YAML, and dashboards across clusters. We redesigned Headlamp&#39;s navigation to treat these as first-class &#34;activities&#34; you can keep open and come back to, instead of one-off views you lose as soon as you click away.
--&gt;
&lt;p&gt;Kubernetes 中的日常运维通常意味着在集群之间处理日志、终端、YAML 和仪表板。
我们重新设计了 Headlamp 的导航，将这些视为一流的&amp;quot;活动&amp;quot;，你可以保持打开并随时返回，
而不是在点击离开后立即丢失的一次性视图。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/new-task-bar.png&#34;
         alt=&#34;New task bar&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of the new task bar&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Changes:
--&gt;
&lt;p&gt;变更：&lt;/p&gt;
&lt;!--
- A new task bar/activities model lets you pin logs, exec sessions, and details as ongoing activities
--&gt;
&lt;ul&gt;
&lt;li&gt;新的任务栏/活动模型允许你将日志、exec 会话和详细信息固定为正在进行的活动&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- An activity overview with a &#34;Close all&#34; action and cluster information
--&gt;
&lt;ul&gt;
&lt;li&gt;活动概览，带有&amp;quot;全部关闭&amp;quot;操作和集群信息&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Multi-select and global filters in tables
--&gt;
&lt;ul&gt;
&lt;li&gt;表格中的多选和全局过滤器&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Thanks to [Jan Jansen](https://github.com/farodin91) and [Aditya Chaudhary](https://github.com/useradityaa).
--&gt;
&lt;p&gt;感谢 &lt;a href=&#34;https://github.com/farodin91&#34;&gt;Jan Jansen&lt;/a&gt; 和 &lt;a href=&#34;https://github.com/useradityaa&#34;&gt;Aditya Chaudhary&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### Search and map
--&gt;
&lt;h3 id=&#34;search-and-map&#34;&gt;搜索和映射&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#search-and-map&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
When something breaks in production, the first two questions are usually &#34;where is it?&#34; and &#34;what is it connected to?&#34; We&#39;ve upgraded both search and the map view so you can get from a high-level symptom to the right set of objects much faster.
--&gt;
&lt;p&gt;当生产环境中出现问题时，前两个问题通常是&amp;quot;它在哪里？&amp;quot;和&amp;quot;它连接到什么？&amp;quot;我们升级了搜索和映射视图，
以便你可以更快地从高级症状定位到正确的对象集。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/advanced-search.png&#34;
         alt=&#34;Advanced search&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of the new Advanced Search feature&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Changes:
--&gt;
&lt;p&gt;变更：&lt;/p&gt;
&lt;!--
- An Advanced search view that supports rich, expression-based queries over Kubernetes objects
--&gt;
&lt;ul&gt;
&lt;li&gt;高级搜索视图，支持对 Kubernetes 对象进行丰富的、基于表达式的查询&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Improved global search that understands labels and multiple search items, and can even update your current namespace based on what you find
--&gt;
&lt;ul&gt;
&lt;li&gt;改进的全局搜索，理解标签和多个搜索项，甚至可以根据你找到的内容更新当前命名空间&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- EndpointSlice support in the Network section
--&gt;
&lt;ul&gt;
&lt;li&gt;网络部分中的 EndpointSlice 支持&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- A richer map view that now includes Custom Resources and Gateway API objects
--&gt;
&lt;ul&gt;
&lt;li&gt;更丰富的映射视图，现在包括自定义资源和 Gateway API 对象&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Thanks to [Fabian](https://github.com/faebr), [Alexander North](https://github.com/alexandernorth), and [Victor Marcolino](https://github.com/victormarcolino) from Swisscom, and also to [Aditya Chaudhary](https://github.com/useradityaa).
--&gt;
&lt;p&gt;感谢来自 Swisscom 的 &lt;a href=&#34;https://github.com/faebr&#34;&gt;Fabian&lt;/a&gt;、&lt;a href=&#34;https://github.com/alexandernorth&#34;&gt;Alexander North&lt;/a&gt;
和 &lt;a href=&#34;https://github.com/victormarcolino&#34;&gt;Victor Marcolino&lt;/a&gt;，以及 &lt;a href=&#34;https://github.com/useradityaa&#34;&gt;Aditya Chaudhary&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### OIDC and authentication
--&gt;
&lt;h3 id=&#34;oidc-and-authentication&#34;&gt;OIDC 和身份认证&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#oidc-and-authentication&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
We&#39;ve put real work into making OIDC setup clearer and more resilient, especially for in-cluster deployments.
--&gt;
&lt;p&gt;我们在使 OIDC 设置更清晰、更具弹性方面做了实际工作，特别是对于集群内部署。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/user-info.png&#34;
         alt=&#34;User info&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of user information for OIDC clusters&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Changes:
--&gt;
&lt;p&gt;变更：&lt;/p&gt;
&lt;!--
- User information displayed in the top bar for OIDC-authenticated users
--&gt;
&lt;ul&gt;
&lt;li&gt;在顶部栏中为 OIDC 认证用户显示用户信息&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- PKCE support for more secure authentication flows, as well as hardened token refresh handling
--&gt;
&lt;ul&gt;
&lt;li&gt;PKCE 支持更安全的身份认证流程，以及强化的令牌刷新处理&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Documentation for using the access token using `-oidc-use-access-token=true`
--&gt;
&lt;ul&gt;
&lt;li&gt;使用 &lt;code&gt;-oidc-use-access-token=true&lt;/code&gt; 使用访问令牌的文档&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Improved support for public OIDC clients like AKS and EKS
--&gt;
&lt;ul&gt;
&lt;li&gt;改进了对 AKS 和 EKS 等公共 OIDC 客户端的支持&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- New guide for setting up Headlamp [on AKS with Azure Entra-ID using OAuth2Proxy](https://headlamp.dev/docs/latest/installation/in-cluster/aks-cluster-oauth/)
--&gt;
&lt;ul&gt;
&lt;li&gt;使用 OAuth2Proxy 在 AKS 上使用 Azure Entra-ID 设置 Headlamp 的&lt;a href=&#34;https://headlamp.dev/docs/latest/installation/in-cluster/aks-cluster-oauth/&#34;&gt;新指南&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Thanks to [David Dobmeier](https://github.com/daviddob) and [Harsh Srivastava](https://github.com/HarshSrivastava275).
--&gt;
&lt;p&gt;感谢 &lt;a href=&#34;https://github.com/daviddob&#34;&gt;David Dobmeier&lt;/a&gt; 和 &lt;a href=&#34;https://github.com/HarshSrivastava275&#34;&gt;Harsh Srivastava&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### App Catalog and Helm
--&gt;
&lt;h3 id=&#34;app-catalog-and-helm&#34;&gt;应用目录和 Helm&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#app-catalog-and-helm&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
We&#39;ve broadened how you deploy and source apps via Headlamp, specifically supporting vanilla Helm repos.
--&gt;
&lt;p&gt;我们扩展了通过 Headlamp 部署和获取应用的方式，特别是支持原生 Helm 仓库。&lt;/p&gt;
&lt;!--
Changes:
--&gt;
&lt;p&gt;变更：&lt;/p&gt;
&lt;!--
- A more capable Helm chart with optional backend TLS termination, PodDisruptionBudgets, custom pod labels, and more
--&gt;
&lt;ul&gt;
&lt;li&gt;功能更强大的 Helm chart，具有可选的后端 TLS 终止、PodDisruptionBudgets、自定义 Pod 标签等&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Improved formatting and added missing access token arg in the Helm chart
--&gt;
&lt;ul&gt;
&lt;li&gt;改进了 Helm chart 中的格式并添加了缺失的访问令牌参数&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- New in-cluster Helm support with an `--enable-helm` flag and a service proxy
--&gt;
&lt;ul&gt;
&lt;li&gt;新的集群内 Helm 支持，带有 &lt;code&gt;--enable-helm&lt;/code&gt; 标志和服务代理&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Thanks to [Vrushali Shah](https://github.com/shahvrushali22) and [Murali Annamneni](https://github.com/muraliinformal) from Oracle, and also to [Pat Riehecky](https://github.com/jcpunk), [Joshua Akers](https://github.com/jda258), [Rostislav Stříbrný](https://github.com/rstribrn), [Rick L](https://github.com/rickliujh), and [Victor](https://github.com/vnea).
--&gt;
&lt;p&gt;感谢来自 Oracle 的 &lt;a href=&#34;https://github.com/shahvrushali22&#34;&gt;Vrushali Shah&lt;/a&gt; 和 &lt;a href=&#34;https://github.com/muraliinformal&#34;&gt;Murali Annamneni&lt;/a&gt;，
以及 &lt;a href=&#34;https://github.com/jcpunk&#34;&gt;Pat Riehecky&lt;/a&gt;、&lt;a href=&#34;https://github.com/jda258&#34;&gt;Joshua Akers&lt;/a&gt;、
&lt;a href=&#34;https://github.com/rstribrn&#34;&gt;Rostislav Stříbrný&lt;/a&gt;、&lt;a href=&#34;https://github.com/rickliujh&#34;&gt;Rick L&lt;/a&gt; 和 &lt;a href=&#34;https://github.com/vnea&#34;&gt;Victor&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### Performance, accessibility, and UX
--&gt;
&lt;h3 id=&#34;performance-accessibility-and-ux&#34;&gt;性能、可访问性和用户体验&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#performance-accessibility-and-ux&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Finally, we&#39;ve spent a lot of time on the things you notice every day but don&#39;t always make headlines: startup time, list views, log viewers, accessibility, and small network UX details. A continuous accessibility self-audit has also helped us identify key issues and make Headlamp easier for everyone to use.
--&gt;
&lt;p&gt;最后，我们在你每天注意到但不总是成为头条的事情上花费了大量时间：启动时间、列表视图、日志查看器、可访问性以及小的网络 UX 细节。
持续的可访问性自我审计也帮助我们识别关键问题，并使 Headlamp 更易于每个人使用。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/learn-section.png&#34;
         alt=&#34;Learn section&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of the Learn section in docs&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Changes:
--&gt;
&lt;p&gt;变更：&lt;/p&gt;
&lt;!--
- Significant desktop improvements, with up to 60% faster app loads and much quicker dev-mode reloads for contributors
--&gt;
&lt;ul&gt;
&lt;li&gt;显著的桌面改进，应用加载速度提高高达 60%，为贡献者提供更快的开发模式重载&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Numerous table and log viewer refinements: persistent sort order, consistent row actions, copy-name buttons, better tooltips, and more forgiving log inputs
--&gt;
&lt;ul&gt;
&lt;li&gt;大量表格和日志查看器改进：持久排序顺序、一致的行操作、复制名称按钮、更好的工具提示以及更宽松的日志输入&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Accessibility and localization improvements, including fixes for zoom-related layout issues, better color contrast, improved screen reader support, and expanded language coverage
--&gt;
&lt;ul&gt;
&lt;li&gt;可访问性和本地化改进，包括修复与缩放相关的布局问题、更好的颜色对比度、改进的屏幕阅读器支持以及扩展的语言覆盖范围&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- More control over resources, with live pod CPU/memory metrics, richer pod details, and inline editing for secrets and CRD fields
--&gt;
&lt;ul&gt;
&lt;li&gt;对资源的更多控制，包括实时 Pod CPU/内存指标、更丰富的 Pod 详细信息以及 Secret 和 CRD 字段的内联编辑&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- A refreshed documentation and plugin onboarding experience, including a &#34;Learn&#34; section and plugin showcase
--&gt;
&lt;ul&gt;
&lt;li&gt;刷新的文档和插件入门体验，包括&amp;quot;学习&amp;quot;部分和插件展示&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- A more complete NetworkPolicy UI and network-related polish
--&gt;
&lt;ul&gt;
&lt;li&gt;更完整的 NetworkPolicy UI 和网络相关的改进&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Nightly builds available for early testing
--&gt;
&lt;ul&gt;
&lt;li&gt;提供夜间构建版本用于早期测试&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Thanks to [Jaehan Byun](https://github.com/jaehanbyun) and [Jan Jansen](https://github.com/farodin91).
--&gt;
&lt;p&gt;感谢 &lt;a href=&#34;https://github.com/jaehanbyun&#34;&gt;Jaehan Byun&lt;/a&gt; 和 &lt;a href=&#34;https://github.com/farodin91&#34;&gt;Jan Jansen&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Plugins and extensibility
--&gt;
&lt;h2 id=&#34;plugins-and-extensibility&#34;&gt;插件和可扩展性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#plugins-and-extensibility&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Discovering plugins is simpler now – no more hopping between Artifact Hub and assorted GitHub repos. Browse our dedicated [Plugins page](https://headlamp.dev/plugins) for a curated catalog of Headlamp-endorsed plugins, along with a showcase of featured plugins.
--&gt;
&lt;p&gt;现在发现插件更简单了——不再需要在 Artifact Hub 和各种 GitHub 仓库之间跳转。浏览我们专门的&lt;a href=&#34;https://headlamp.dev/plugins&#34;&gt;插件页面&lt;/a&gt;，
查看 Headlamp 认可的插件精选目录以及特色插件展示。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/plugins-page.png&#34;
         alt=&#34;Plugins page&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of the Plugins showcase&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
### Headlamp AI Assistant
--&gt;
&lt;h3 id=&#34;headlamp-ai-assistant&#34;&gt;Headlamp AI 助手&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#headlamp-ai-assistant&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Managing Kubernetes often means memorizing commands and juggling tools. Headlamp&#39;s new AI Assistant changes this by adding a natural-language interface built into the UI. Now, instead of typing `kubectl` or digging through YAML you can ask, &#34;Is my app healthy?&#34; or &#34;Show logs for this deployment,&#34; and get answers in context, speeding up troubleshooting and smoothing onboarding for new users. Learn more about it [here](https://headlamp.dev/blog/2025/08/07/introducing-the-headlamp-ai-assistant/).
--&gt;
&lt;p&gt;管理 Kubernetes 通常意味着记忆命令和处理各种工具。Headlamp 的新 AI 助手通过添加内置在 UI 中的自然语言界面改变了这一点。
现在，你可以问&amp;quot;我的应用是否健康？&amp;quot;或&amp;quot;显示此部署的日志&amp;quot;，而不是输入 &lt;code&gt;kubectl&lt;/code&gt; 或深入研究 YAML，并在上下文中获得答案，
加快故障排除速度并简化新用户的入门。&lt;a href=&#34;https://headlamp.dev/blog/2025/08/07/introducing-the-headlamp-ai-assistant/&#34;&gt;在此&lt;/a&gt;了解更多信息。&lt;/p&gt;
&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; allowfullscreen=&#34;allowfullscreen&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/GzXkUuCTcd4?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;
    &lt;/div&gt;

&lt;!--
### New plugins additions
--&gt;
&lt;h3 id=&#34;new-plugins-additions&#34;&gt;新增插件&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#new-plugins-additions&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Alongside the new AI Assistant, we&#39;ve been growing Headlamp&#39;s plugin ecosystem so you can bring more of your workflows into a single UI, with integrations like Minikube, Karpenter, and more.
--&gt;
&lt;p&gt;除了新的 AI 助手，我们一直在发展 Headlamp 的插件生态系统，以便你可以将更多工作流集成到单个 UI 中，包括 Minikube、Karpenter 等集成。&lt;/p&gt;
&lt;!--
Highlights from the latest plugin releases:
--&gt;
&lt;p&gt;最新插件发布的亮点：&lt;/p&gt;
&lt;!--
- Minikube plugin, providing a locally stored single node Minikube cluster
--&gt;
&lt;ul&gt;
&lt;li&gt;Minikube 插件，提供本地存储的单节点 Minikube 集群&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Karpenter plugin, with support for Azure Node Auto-Provisioning (NAP)
--&gt;
&lt;ul&gt;
&lt;li&gt;Karpenter 插件，支持 Azure 节点自动预配（NAP）&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- KEDA plugin, which you can learn more about [here](https://headlamp.dev/blog/2025/07/25/enabling-event-driven-autoscaling-with-the-new-keda-plugin-for-headlamp/)
--&gt;
&lt;ul&gt;
&lt;li&gt;KEDA 插件，你可以&lt;a href=&#34;https://headlamp.dev/blog/2025/07/25/enabling-event-driven-autoscaling-with-the-new-keda-plugin-for-headlamp/&#34;&gt;在此&lt;/a&gt;
了解更多信息&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Community-maintained plugins for [Gatekeeper](https://github.com/sozercan/gatekeeper-headlamp-plugin) and [KAITO](https://github.com/kaito-project/headlamp-kaito)
--&gt;
&lt;ul&gt;
&lt;li&gt;社区维护的 &lt;a href=&#34;https://github.com/sozercan/gatekeeper-headlamp-plugin&#34;&gt;Gatekeeper&lt;/a&gt;
和 &lt;a href=&#34;https://github.com/kaito-project/headlamp-kaito&#34;&gt;KAITO&lt;/a&gt; 插件&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Thanks to [Vrushali Shah](https://github.com/shahvrushali22) and [Murali Annamneni](https://github.com/muraliinformal) from Oracle, and also to [Anirban Singha](https://github.com/SinghaAnirban005), [Adwait Godbole](https://github.com/adwait-godbole), [Sertaç Özercan](https://github.com/sozercan), [Ernest Wong](https://github.com/chewong), and [Chloe Lim](https://github.com/chloe608).
--&gt;
&lt;p&gt;感谢来自 Oracle 的 &lt;a href=&#34;https://github.com/shahvrushali22&#34;&gt;Vrushali Shah&lt;/a&gt; 和 &lt;a href=&#34;https://github.com/muraliinformal&#34;&gt;Murali Annamneni&lt;/a&gt;，
以及 &lt;a href=&#34;https://github.com/SinghaAnirban005&#34;&gt;Anirban Singha&lt;/a&gt;、&lt;a href=&#34;https://github.com/adwait-godbole&#34;&gt;Adwait Godbole&lt;/a&gt;、
&lt;a href=&#34;https://github.com/sozercan&#34;&gt;Sertaç Özercan&lt;/a&gt;、&lt;a href=&#34;https://github.com/chewong&#34;&gt;Ernest Wong&lt;/a&gt; 和 &lt;a href=&#34;https://github.com/chloe608&#34;&gt;Chloe Lim&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### Other plugins updates
--&gt;
&lt;h3 id=&#34;other-plugins-updates&#34;&gt;其他插件更新&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#other-plugins-updates&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Alongside new additions, we&#39;ve also spent time refining plugins that many of you already use, focusing on smoother workflows and better integration with the core UI.
--&gt;
&lt;p&gt;除了新增内容，我们还花时间改进了你们许多人已经在使用的插件，专注于更流畅的工作流和与核心 UI 的更好集成。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/backstage-plugin.png&#34;
         alt=&#34;Backstage plugin&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of the Backstage plugin&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Changes:
--&gt;
&lt;p&gt;变更：&lt;/p&gt;
&lt;!--
- **Flux plugin**: Updated for Flux v2.7, with support for newer CRDs, navigation fixes so it works smoothly on recent clusters
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Flux 插件&lt;/strong&gt;：更新以支持 Flux v2.7，支持更新的 CRD，导航修复使其在最近的集群上平稳运行&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **App Catalog**: Now supports Helm repos in addition to Artifact Hub, can run in-cluster via /serviceproxy, and shows both current and latest app versions
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;应用目录&lt;/strong&gt;：现在除了 Artifact Hub 之外还支持 Helm 仓库，可以通过 /serviceproxy 在集群内运行，并显示当前和最新的应用版本&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Plugin Catalog**: Improved card layout and accessibility, plus dependency and Storybook test updates
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;插件目录&lt;/strong&gt;：改进了卡片布局和可访问性，以及依赖项和 Storybook 测试更新&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Backstage plugin**: Dependency and build updates, more info [here](https://headlamp.dev/blog/2025/11/05/strengthening-backstage-and-headlamp-integration/)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Backstage 插件&lt;/strong&gt;：依赖项和构建更新，&lt;a href=&#34;https://headlamp.dev/blog/2025/11/05/strengthening-backstage-and-headlamp-integration/&#34;&gt;在此&lt;/a&gt;
了解更多信息&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Plugin development
--&gt;
&lt;h3 id=&#34;plugin-development&#34;&gt;插件开发&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#plugin-development&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
We&#39;ve focused on making it faster and clearer to build, test, and ship Headlamp plugins, backed by improved documentation and lighter tooling.
--&gt;
&lt;p&gt;我们专注于使构建、测试和发布 Headlamp 插件更快、更清晰，并辅以改进的文档和更轻量的工具。&lt;/p&gt;


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2026/01/22/headlamp-in-2025-project-highlights/plugin-development.png&#34;
         alt=&#34;Plugin development&#34;/&gt; &lt;figcaption&gt;
            &lt;p&gt;View of the Plugin Development guide&lt;/p&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;!--
Changes:
--&gt;
&lt;p&gt;变更：&lt;/p&gt;
&lt;!--
- New and expanded guides for [plugin architecture](https://headlamp.dev/docs/latest/development/architecture#plugins) and [development](https://headlamp.dev/docs/latest/development/plugins/getting-started), including how to publish and ship plugins
--&gt;
&lt;ul&gt;
&lt;li&gt;新增和扩展的&lt;a href=&#34;https://headlamp.dev/docs/latest/development/architecture#plugins&#34;&gt;插件架构&lt;/a&gt;
和&lt;a href=&#34;https://headlamp.dev/docs/latest/development/plugins/getting-started&#34;&gt;开发&lt;/a&gt;指南，包括如何发布和交付插件&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Added [i18n support documentation](https://headlamp.dev/docs/latest/development/plugins/i18n) so plugins can be translated and localized
--&gt;
&lt;ul&gt;
&lt;li&gt;添加了 &lt;a href=&#34;https://headlamp.dev/docs/latest/development/plugins/i18n&#34;&gt;i18n 支持文档&lt;/a&gt;，以便插件可以被翻译和本地化&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Added example plugins: [ui-panels](https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples/ui-panels), [resource-charts](https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples/resource-charts), [custom-theme](https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples/custom-theme), and [projects](https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples/projects)
--&gt;
&lt;ul&gt;
&lt;li&gt;添加了示例插件：&lt;a href=&#34;https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples/ui-panels&#34;&gt;ui-panels&lt;/a&gt;、
&lt;a href=&#34;https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples/resource-charts&#34;&gt;resource-charts&lt;/a&gt;、
&lt;a href=&#34;https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples/custom-theme&#34;&gt;custom-theme&lt;/a&gt;
和&lt;a href=&#34;https://github.com/kubernetes-sigs/headlamp/tree/main/plugins/examples/projects&#34;&gt;projects&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Improved type checking for Headlamp APIs, restored Storybook support for component testing, and reduced dependencies for faster installs and fewer updates
--&gt;
&lt;ul&gt;
&lt;li&gt;改进了 Headlamp API 的类型检查，恢复了用于组件测试的 Storybook 支持，并减少了依赖项以加快安装速度并减少更新&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Documented plugin install locations, UI signifiers in Plugin Settings, and labels that differentiated shipped, UI-installed, and dev-mode plugins
--&gt;
&lt;ul&gt;
&lt;li&gt;记录了插件安装位置、插件设置中的 UI 标识符，以及区分已交付、UI 安装和开发模式插件的标签&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Security upgrades
--&gt;
&lt;h2 id=&#34;security-upgrades&#34;&gt;安全升级&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#security-upgrades&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
We&#39;ve also been investing in keeping Headlamp secure – both by tightening how authentication works and by staying on top of upstream vulnerabilities and tooling.
--&gt;
&lt;p&gt;我们还在投资保持 Headlamp 的安全性——既通过加强身份认证的工作方式，也密切关注上游漏洞和工具的更新。&lt;/p&gt;
&lt;!--
Updates:
--&gt;
&lt;p&gt;更新：&lt;/p&gt;
&lt;!--
- We&#39;ve been keeping up with security updates, regularly updating dependencies and addressing upstream security issues.
--&gt;
&lt;ul&gt;
&lt;li&gt;我们一直在跟进安全更新，定期更新依赖项并解决上游安全问题。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- We tightened the Helm chart&#39;s default security context and fixed a regression that broke the plugin manager.
--&gt;
&lt;ul&gt;
&lt;li&gt;我们加强了 Helm chart 的默认安全上下文，并修复了破坏插件管理器的回归问题。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- We&#39;ve improved OIDC security with PKCE support, helping unblock more secure and standards-compliant OIDC setups when deploying Headlamp in-cluster.
--&gt;
&lt;ul&gt;
&lt;li&gt;我们通过 PKCE 支持改进了 OIDC 安全性，帮助在集群中部署 Headlamp 时解除更安全和符合标准的 OIDC 设置的阻碍。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Conclusion
--&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;结论&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#conclusion&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Thank you to everyone who has contributed to Headlamp this year – whether through pull requests, plugins, or simply sharing how you&#39;re using the project. Seeing the different ways teams are adopting and extending the project is a big part of what keeps us moving forward. If your organization uses Headlamp, consider adding it to our [adopters list](https://github.com/kubernetes-sigs/headlamp/blob/main/ADOPTERS.md).
--&gt;
&lt;p&gt;感谢今年为 Headlamp 做出贡献的每个人——无论是通过合并请求、插件，还是简单地分享你如何使用该项目。
看到团队采用和扩展该项目的不同方式是我们继续前进的重要动力。如果你的组织使用 Headlamp，
请考虑将其添加到我们的&lt;a href=&#34;https://github.com/kubernetes-sigs/headlamp/blob/main/ADOPTERS.md&#34;&gt;采用者列表&lt;/a&gt;中。&lt;/p&gt;
&lt;!--
If you haven&#39;t tried Headlamp recently, all these updates are available today. Check out the latest Headlamp release, explore the new views, plugins, and docs, and share your feedback with us on Slack or GitHub – your feedback helps shape where Headlamp goes next
--&gt;
&lt;p&gt;如果你最近还没有尝试过 Headlamp，所有这些更新今天都可以使用。查看最新的 Headlamp 版本，探索新的视图、插件和文档，
并在 Slack 或 GitHub 上与我们分享你的反馈——你的反馈有助于塑造 Headlamp 的未来发展方向。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>宣布成立 Checkpoint/Restore 工作组</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/21/introducing-checkpoint-restore-wg/</link>
      <pubDate>Wed, 21 Jan 2026 10:00:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/21/introducing-checkpoint-restore-wg/</guid>
      <description>
        
        
        &lt;!--
title: &#34;Announcing the Checkpoint/Restore Working Group&#34;
date: 2026-01-21T10:00:00-08:00
canonicalUrl: https://www.kubernetes.dev/blog/2026/01/21/introducing-checkpoint-restore-wg/
slug: introducing-checkpoint-restore-wg
author: &gt;
  [Radostin Stoyanov](https://github.com/rst0git),
  [Viktória Spišaková](https://github.com/viktoriaas),
  [Adrian Reber](https://github.com/adrianreber),
  [Peter Hunt](https://github.com/haircommander)
--&gt;
&lt;!--
The community around Kubernetes includes a number of Special Interest Groups (SIGs) and Working Groups (WGs) facilitating discussions on important topics between interested contributors. Today we would like to announce the new [Kubernetes Checkpoint Restore WG](https://github.com/kubernetes/community/tree/master/wg-checkpoint-restore) focusing on the integration of Checkpoint/Restore functionality into Kubernetes.
--&gt;
&lt;p&gt;Kubernetes 社区包含多个特别兴趣小组（SIG）和工作组（WG），
旨在促进感兴趣的贡献者之间就重要议题展开讨论。
今天，我们宣布成立新的
&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/wg-checkpoint-restore&#34;&gt;Kubernetes Checkpoint Restore WG&lt;/a&gt;，
专注于将 Checkpoint/Restore 功能集成到 Kubernetes 中。&lt;/p&gt;
&lt;!--
## Motivation and use cases

There are several high-level scenarios discussed in the working group:
--&gt;
&lt;h2 id=&#34;动机和应用场景&#34;&gt;动机和应用场景&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8a%a8%e6%9c%ba%e5%92%8c%e5%ba%94%e7%94%a8%e5%9c%ba%e6%99%af&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;工作组讨论了以下几个高层次的应用场景：&lt;/p&gt;
&lt;!--
- Optimizing resource utilization for interactive workloads, such as Jupyter notebooks and AI chatbots
- Accelerating startup of applications with long initialization times, including Java applications and [LLM inference services](https://doi.org/10.1145/3731599.3767354)
- Using periodic checkpointing to enable fault-tolerance for long-running workloads, such as distributed model training
- Providing [interruption-aware scheduling](https://doi.org/10.1007/978-3-032-10507-3_3) with transparent checkpoint/restore, allowing lower-priority Pods to be preempted while preserving the runtime state of applications
- Facilitating Pod migration across nodes for load balancing and maintenance, without disrupting workloads.
- Enabling forensic checkpointing to investigate and analyze security incidents such as cyberattacks, data breaches, and unauthorized access.
--&gt;
&lt;ul&gt;
&lt;li&gt;优化交互式工作负载（例如 Jupyter Notebook 和 AI 聊天机器人）的资源利用率&lt;/li&gt;
&lt;li&gt;加速初始化时间较长的应用程序启动，包括 Java 应用程序和 &lt;a href=&#34;https://doi.org/10.1145/3731599.3767354&#34;&gt;LLM 推理服务&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;使用周期性 Checkpoint 机制，为长时间运行的工作负载（例如分布式模型训练）提供容错能力&lt;/li&gt;
&lt;li&gt;提供具有透明 Checkpoint/Restore 功能的&lt;a href=&#34;https://doi.org/10.1007/978-3-032-10507-3_3&#34;&gt;中断感知调度&lt;/a&gt;，
允许抢占低优先级 Pod，同时保持应用程序的运行时状态&lt;/li&gt;
&lt;li&gt;促进 Pod 跨节点迁移，以实现负载均衡和维护，而不会中断工作负载&lt;/li&gt;
&lt;li&gt;启用 Checkpoint 取证功能，用于调查和分析安全事件，例如网络攻击、数据泄露和未经授权的访问。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Across these scenarios, the goal is to help facilitate discussions of ideas between the Kubernetes community and the growing Checkpoint/Restore in Userspace (CRIU) ecosystem. The CRIU community includes several projects that support these use cases, including:
--&gt;
&lt;p&gt;在这些场景中，目标是促进 Kubernetes 社区与日益壮大的用户空间
Checkpoint/Restore（CRIU）生态系统之间的思想交流。CRIU 社区包含多个支持这些用例的项目，其中包括：&lt;/p&gt;
&lt;!--
- [CRIU](https://github.com/checkpoint-restore/criu) - A tool for checkpointing and restoring running applications and containers
- [checkpointctl](https://github.com/checkpoint-restore/checkpointctl) - A tool for in-depth analysis of container checkpoints
- [criu-coordinator](https://github.com/checkpoint-restore/criu-coordinator) - A tool for coordinated checkpoint/restore of distributed applications with CRIU
- [checkpoint-restore-operator](https://github.com/checkpoint-restore/checkpoint-restore-operator) - A Kubernetes operator for managing checkpoints
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/checkpoint-restore/criu&#34;&gt;CRIU&lt;/a&gt; - 用于对运行中的应用程序和容器进行 Checkpoint 维护和 Restore 的工具&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/checkpoint-restore/checkpointctl&#34;&gt;checkpointctl&lt;/a&gt; - 用于深入分析容器 Checkpoint 的工具&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/checkpoint-restore/criu-coordinator&#34;&gt;criu-coordinator&lt;/a&gt; - 用于与 CRIU 协同执行分布式应用程序 Checkpoint/Restore 的工具&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/checkpoint-restore/checkpoint-restore-operator&#34;&gt;checkpoint-restore-operator&lt;/a&gt; - 用于管理 Checkpoint 的 Kubernetes Operator&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
More information about the checkpoint/restore integration with Kubernetes is also available [here](https://criu.org/Kubernetes).
--&gt;
&lt;p&gt;有关 Kubernetes 的 Checkpoint/Restore 集成的更多信息，请参阅&lt;a href=&#34;https://criu.org/Kubernetes&#34;&gt;此处&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Related events

Following our presentation about [transparent checkpointing](https://sched.co/1tx7i) at KubeCon EU 2025, we are excited to welcome you to our [panel discussion](https://sched.co/2CW6P) and [AI + ML session](https://sched.co/2CW7Z) at KubeCon + CloudNativeCon Europe 2026.
--&gt;
&lt;h2 id=&#34;相关活动&#34;&gt;相关活动&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%9b%b8%e5%85%b3%e6%b4%bb%e5%8a%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;继我们在 KubeCon EU 2025 上就&lt;a href=&#34;https://sched.co/1tx7i&#34;&gt;透明 Checkpoint&lt;/a&gt;
发表演讲之后，我们非常高兴地邀请你参加我们在
KubeCon + CloudNativeCon Europe 2026
上的&lt;a href=&#34;https://sched.co/2CW6P&#34;&gt;小组讨论&lt;/a&gt;和&lt;a href=&#34;https://sched.co/2CW7Z&#34;&gt;人工智能 + 机器学习专题研讨会&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Connect with us

If you are interested in contributing to Kubernetes or CRIU, there are several ways to participate:
--&gt;
&lt;h2 id=&#34;联系我们&#34;&gt;联系我们&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%81%94%e7%b3%bb%e6%88%91%e4%bb%ac&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;如果你有兴趣为 Kubernetes 或 CRIU 做贡献，可以通过以下几种方式参与：&lt;/p&gt;
&lt;!--
- Join our meeting every second Thursday at 17:00 UTC via the Zoom link in our [meeting notes](https://docs.google.com/document/d/1ZMtHBibXfTw4cQerM4O4DJonzVs3W7Hp2K5ml6pTufs/edit); recordings of our prior meetings are available [here](https://www.youtube.com/playlist?list=PL69nYSiGNLP1P7F40IMVL3NsNiIm5AGos).
- Chat with us on the [Kubernetes Slack](http://slack.k8s.io/): [#wg-checkpoint-restore](https://kubernetes.slack.com/messages/wg-checkpoint-restore)
- Email us at the [wg-checkpoint-restore mailing list](https://groups.google.com/a/kubernetes.io/g/wg-checkpoint-restore)
--&gt;
&lt;ul&gt;
&lt;li&gt;请于每隔一周的周四 17:00 UTC 通过&lt;a href=&#34;https://docs.google.com/document/d/1ZMtHBibXfTw4cQerM4O4DJonzVs3W7Hp2K5ml6pTufs/edit&#34;&gt;会议记录&lt;/a&gt;中的
Zoom 链接加入我们的会议；之前的会议录像可在&lt;a href=&#34;https://www.youtube.com/playlist?list=PL69nYSiGNLP1P7F40IMVL3NsNiIm5AGos&#34;&gt;此处&lt;/a&gt;观看。&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;http://slack.k8s.io/&#34;&gt;Kubernetes Slack&lt;/a&gt;
上与我们交流：&lt;a href=&#34;https://kubernetes.slack.com/messages/wg-checkpoint-restore&#34;&gt;#wg-checkpoint-restore&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;发送邮件至 &lt;a href=&#34;https://groups.google.com/a/kubernetes.io/g/wg-checkpoint-restore&#34;&gt;wg-checkpoint-restore 邮件列表&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>使用 clientcmd 实现统一的 API 服务器访问</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/19/clientcmd-apiserver-access/</link>
      <pubDate>Mon, 19 Jan 2026 10:00:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/19/clientcmd-apiserver-access/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#39;Uniform API server access using clientcmd&#39;
date: 2026-01-19T10:00:00-08:00
slug: clientcmd-apiserver-access
author: &gt;
  [Stephen Kitt](https://github.com/skitt) (Red Hat)
--&gt;
&lt;!--
If you&#39;ve ever wanted to develop a command line client for a Kubernetes API,
especially if you&#39;ve considered making your client usable as a `kubectl` plugin,
you might have wondered how to make your client feel familiar to users of `kubectl`.
A quick glance at the output of `kubectl options` might put a damper on that:
&#34;Am I really supposed to implement all those options?&#34;
--&gt;
&lt;p&gt;如果你曾经想为 Kubernetes API 开发命令行客户端，
特别是如果你考虑过让你的客户端可用作 &lt;code&gt;kubectl&lt;/code&gt; 插件，
你可能想知道如何让你的客户端让 &lt;code&gt;kubectl&lt;/code&gt; 用户感到熟悉。
快速浏览一下 &lt;code&gt;kubectl options&lt;/code&gt; 的输出可能会让你感到沮丧：
&amp;quot;我真的需要实现所有这些选项吗？&amp;quot;&lt;/p&gt;
&lt;!--
Fear not, others have done a lot of the work involved for you.
In fact, the Kubernetes project provides two libraries to help you handle
`kubectl`-style command line arguments in Go programs:
[`clientcmd`](https://pkg.go.dev/k8s.io/client-go/tools/clientcmd) and
[`cli-runtime`](https://pkg.go.dev/k8s.io/cli-runtime)
(which uses `clientcmd`).
This article will show how to use the former.
--&gt;
&lt;p&gt;别担心，其他人已经为你做了很多相关工作。
实际上，Kubernetes 项目提供了两个库来帮助你在 Go 程序中处理
&lt;code&gt;kubectl&lt;/code&gt; 风格的命令行参数：
&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd&#34;&gt;&lt;code&gt;clientcmd&lt;/code&gt;&lt;/a&gt; 和
&lt;a href=&#34;https://pkg.go.dev/k8s.io/cli-runtime&#34;&gt;&lt;code&gt;cli-runtime&lt;/code&gt;&lt;/a&gt;（后者使用 &lt;code&gt;clientcmd&lt;/code&gt;）。
本文将展示如何使用前者。&lt;/p&gt;
&lt;!--
## General philosophy
--&gt;
&lt;h2 id=&#34;总体理念&#34;&gt;总体理念&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%80%bb%e4%bd%93%e7%90%86%e5%bf%b5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
As might be expected since it&#39;s part of `client-go`,
`clientcmd`&#39;s ultimate purpose is to provide an instance of
[`restclient.Config`](https://pkg.go.dev/k8s.io/client-go/rest#Config)
that can issue requests to an API server.
--&gt;
&lt;p&gt;作为 &lt;code&gt;client-go&lt;/code&gt; 的一部分，&lt;code&gt;clientcmd&lt;/code&gt; 的最终目的是提供
&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/rest#Config&#34;&gt;&lt;code&gt;restclient.Config&lt;/code&gt;&lt;/a&gt;
的一个实例，该实例可以向 API 服务器发出请求。&lt;/p&gt;
&lt;!--
It follows `kubectl` semantics:
* defaults are taken from `~/.kube` or equivalent;
* files can be specified using the `KUBECONFIG` environment variable;
* all of the above settings can be further overridden using command line arguments.
--&gt;
&lt;p&gt;它遵循 &lt;code&gt;kubectl&lt;/code&gt; 语义：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;默认值取自 &lt;code&gt;~/.kube&lt;/code&gt; 或等效位置；&lt;/li&gt;
&lt;li&gt;可以使用 &lt;code&gt;KUBECONFIG&lt;/code&gt; 环境变量指定文件；&lt;/li&gt;
&lt;li&gt;所有上述设置都可以通过命令行参数进一步覆盖。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
It doesn&#39;t set up a `--kubeconfig` command line argument,
which you might want to do to align with `kubectl`;
you&#39;ll see how to do this
in the [&#34;Bind the flags&#34;](#bind-the-flags) section.
--&gt;
&lt;p&gt;它不会设置 &lt;code&gt;--kubeconfig&lt;/code&gt; 命令行参数，
你可能希望这样做以与 &lt;code&gt;kubectl&lt;/code&gt; 保持一致；
你将在&lt;a href=&#34;#bind-the-flags&#34;&gt;&amp;quot;绑定标志&amp;quot;&lt;/a&gt;一节中看到如何做到这一点。&lt;/p&gt;
&lt;!--
## Available features
--&gt;
&lt;h2 id=&#34;可用特性&#34;&gt;可用特性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%af%e7%94%a8%e7%89%b9%e6%80%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
`clientcmd` allows programs to handle
--&gt;
&lt;p&gt;&lt;code&gt;clientcmd&lt;/code&gt; 允许程序处理。&lt;/p&gt;
&lt;!--
* `kubeconfig` selection (using `KUBECONFIG`);
* context selection;
* namespace selection;
* client certificates and private keys;
* user impersonation;
* HTTP Basic authentication support (username/password).
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kubeconfig&lt;/code&gt; 选择（使用 &lt;code&gt;KUBECONFIG&lt;/code&gt;）；&lt;/li&gt;
&lt;li&gt;上下文选择；&lt;/li&gt;
&lt;li&gt;命名空间选择；&lt;/li&gt;
&lt;li&gt;客户端证书和私钥；&lt;/li&gt;
&lt;li&gt;用户模拟；&lt;/li&gt;
&lt;li&gt;HTTP 基本认证支持（用户名/密码）。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Configuration merging
--&gt;
&lt;h2 id=&#34;配置合并&#34;&gt;配置合并&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%85%8d%e7%bd%ae%e5%90%88%e5%b9%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
In various scenarios, `clientcmd` supports _merging_ configuration settings:
`KUBECONFIG` can specify multiple files whose contents are combined.
This can be confusing, because settings are merged in different directions
depending on how they are implemented.
If a setting is defined in a map, the first definition wins,
subsequent definitions are ignored.
If a setting is not defined in a map, the last definition wins.
--&gt;
&lt;p&gt;在各种场景中，&lt;code&gt;clientcmd&lt;/code&gt; 支持&lt;strong&gt;合并&lt;/strong&gt;配置设置：
&lt;code&gt;KUBECONFIG&lt;/code&gt; 可以指定多个文件，其内容会被组合。
这可能令人困惑，因为设置根据实现方式的不同而以不同方向合并。
如果设置在 Map 中定义，第一个定义获胜，后续定义将被忽略。
如果设置不在 Map 中定义，最后一个定义获胜。&lt;/p&gt;
&lt;!--
When settings are retrieved using `KUBECONFIG`,
missing files result in warnings only.
If the user explicitly specifies a path (in `--kubeconfig` style),
there must be a corresponding file.
--&gt;
&lt;p&gt;当使用 &lt;code&gt;KUBECONFIG&lt;/code&gt; 检索设置时，缺失的文件只会导致警告。
如果用户显式指定路径（以 &lt;code&gt;--kubeconfig&lt;/code&gt; 方式），则必须有相应的文件。&lt;/p&gt;
&lt;!--
If `KUBECONFIG` isn&#39;t defined,
the default configuration file, `~/.kube/config`, is used instead,
if present.
--&gt;
&lt;p&gt;如果未定义 &lt;code&gt;KUBECONFIG&lt;/code&gt;，
则使用默认配置文件 &lt;code&gt;~/.kube/config&lt;/code&gt;（如果存在）。&lt;/p&gt;
&lt;!--
### Overall process
--&gt;
&lt;h3 id=&#34;整体流程&#34;&gt;整体流程&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%95%b4%e4%bd%93%e6%b5%81%e7%a8%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The general usage pattern is succinctly expressed in
the [`clientcmd`](https://pkg.go.dev/k8s.io/client-go/tools/clientcmd) package documentation:
--&gt;
&lt;p&gt;一般使用模式在
&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd&#34;&gt;&lt;code&gt;clientcmd&lt;/code&gt;&lt;/a&gt;
包文档中有简洁的表达：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;loadingRules &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; clientcmd.&lt;span style=&#34;color:#00a000&#34;&gt;NewDefaultClientConfigLoadingRules&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// if you want to change the loading rules (which files in which order), you can do so here&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;configOverrides &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#666&#34;&gt;&amp;amp;&lt;/span&gt;clientcmd.ConfigOverrides{}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// if you want to change override values or bind them to flags, there are methods to help you&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubeConfig &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; clientcmd.&lt;span style=&#34;color:#00a000&#34;&gt;NewNonInteractiveDeferredLoadingClientConfig&lt;/span&gt;(loadingRules, configOverrides)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;config, err &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; kubeConfig.&lt;span style=&#34;color:#00a000&#34;&gt;ClientConfig&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;if&lt;/span&gt; err &lt;span style=&#34;color:#666&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;nil&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// Do something&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;client, err &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; metav1.&lt;span style=&#34;color:#00a000&#34;&gt;New&lt;/span&gt;(config)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// ...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
In the context of this article, there are six steps:
--&gt;
&lt;p&gt;在本文的上下文中，有六个步骤：&lt;/p&gt;
&lt;!--
1. [Configure the loading rules](#configure-the-loading-rules).
1. [Configure the overrides](#configure-the-overrides).
1. [Build a set of flags](#build-a-set-of-flags).
1. [Bind the flags](#bind-the-flags).
1. [Build the merged configuration](#build-the-merged-configuration).
1. [Obtain an API client](#obtain-an-api-client).
--&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;#configure-the-loading-rules&#34;&gt;配置加载规则&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#configure-the-overrides&#34;&gt;配置覆盖&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#build-a-set-of-flags&#34;&gt;构建一组标志&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#bind-the-flags&#34;&gt;绑定标志&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#build-the-merged-configuration&#34;&gt;构建合并配置&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#obtain-an-api-client&#34;&gt;获取 API 客户端&lt;/a&gt;。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
### Configure the loading rules
--&gt;
&lt;h3 id=&#34;配置加载规则&#34;&gt;配置加载规则&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%85%8d%e7%bd%ae%e5%8a%a0%e8%bd%bd%e8%a7%84%e5%88%99&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
`clientcmd.NewDefaultClientConfigLoadingRules()` builds loading rules which will use either the contents of the `KUBECONFIG` environment variable,
or the default configuration file name (`~/.kube/config`).
In addition, if the default configuration file is used,
it is able to migrate settings from the (very) old default configuration file
(`~/.kube/.kubeconfig`).
--&gt;
&lt;p&gt;&lt;code&gt;clientcmd.NewDefaultClientConfigLoadingRules()&lt;/code&gt; 构建加载规则，
该规则将使用 &lt;code&gt;KUBECONFIG&lt;/code&gt; 环境变量的内容或默认配置文件名（&lt;code&gt;~/.kube/config&lt;/code&gt;）。
此外，如果使用默认配置文件，
它能够从（非常）旧的默认配置文件（&lt;code&gt;~/.kube/.kubeconfig&lt;/code&gt;）迁移设置。&lt;/p&gt;
&lt;!--
You can build your own `ClientConfigLoadingRules`,
but in most cases the defaults are fine.
--&gt;
&lt;p&gt;你可以构建自己的 &lt;code&gt;ClientConfigLoadingRules&lt;/code&gt;，
但在大多数情况下默认值就足够了。&lt;/p&gt;
&lt;!--
### Configure the overrides
--&gt;
&lt;h3 id=&#34;配置覆盖&#34;&gt;配置覆盖&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%85%8d%e7%bd%ae%e8%a6%86%e7%9b%96&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
`clientcmd.ConfigOverrides` is a `struct` storing overrides which will be applied over the settings loaded from the configuration derived using the loading rules.
In the context of this article,
its primary purpose is to store values obtained from command line arguments.
These are handled using the [pflag](https://github.com/spf13/pflag) library,
which is a drop-in replacement for Go&#39;s [`flag`](https://pkg.go.dev/flag) package,
adding support for double-hyphen arguments with long names.
--&gt;
&lt;p&gt;&lt;code&gt;clientcmd.ConfigOverrides&lt;/code&gt; 是一个 &lt;code&gt;struct&lt;/code&gt;，存储将应用于从加载规则派生的配置中加载的设置的覆盖。
在本文的上下文中，其主要目的是存储从命令行参数获取的值。
这些使用 &lt;a href=&#34;https://github.com/spf13/pflag&#34;&gt;pflag&lt;/a&gt; 库处理，
该库是 Go 的 &lt;a href=&#34;https://pkg.go.dev/flag&#34;&gt;&lt;code&gt;flag&lt;/code&gt;&lt;/a&gt; 包的直接替代品，
添加了对带长名称的双连字符参数的支持。&lt;/p&gt;
&lt;!--
In most cases there&#39;s nothing to set in the overrides;
I will only bind them to flags.
--&gt;
&lt;p&gt;在大多数情况下，覆盖中没有什么需要设置的；我只会将它们绑定到标志上。&lt;/p&gt;
&lt;!--
### Build a set of flags
--&gt;
&lt;h3 id=&#34;构建一组标志&#34;&gt;构建一组标志&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%9e%84%e5%bb%ba%e4%b8%80%e7%bb%84%e6%a0%87%e5%bf%97&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In this context, a flag is a representation of a command line argument,
specifying its long name (such as `--namespace`),
its short name if any (such as `-n`),
its default value,
and a description shown in the usage information.
Flags are stored in instances of
the [`FlagInfo`](https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#FlagInfo) struct.
--&gt;
&lt;p&gt;在此上下文中，标志是命令行参数的表示，
指定其长名称（如 &lt;code&gt;--namespace&lt;/code&gt;）、短名称（如 &lt;code&gt;-n&lt;/code&gt;）、默认值以及使用信息中显示的描述。
标志存储在
&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#FlagInfo&#34;&gt;&lt;code&gt;FlagInfo&lt;/code&gt;&lt;/a&gt;
结构体的实例中。&lt;/p&gt;
&lt;!--
Three sets of flags are available,
representing the following command line arguments:
--&gt;
&lt;p&gt;有三组标志可用，表示以下命令行参数：&lt;/p&gt;
&lt;!--
* authentication arguments (certificates, tokens, impersonations, username/password);
* cluster arguments (API server, certificate authority, TLS configuration, proxy, compression)
* context arguments (cluster name, `kubeconfig` user name, namespace)
--&gt;
&lt;ul&gt;
&lt;li&gt;认证参数（证书、令牌、模拟、用户名/密码）；&lt;/li&gt;
&lt;li&gt;集群参数（API 服务器、证书机构、TLS 配置、代理、压缩）&lt;/li&gt;
&lt;li&gt;上下文参数（集群名称、&lt;code&gt;kubeconfig&lt;/code&gt; 用户名、命名空间）&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
The recommended selection includes all three with a named context selection argument and a timeout argument.
--&gt;
&lt;p&gt;推荐的选择包括所有三组，以及命名的上下文选择参数和超时参数。&lt;/p&gt;
&lt;!--
These are all available using the `Recommended…Flags` functions.
The functions take a prefix, which is prepended to all the argument long names.
--&gt;
&lt;p&gt;这些都可以使用 &lt;code&gt;Recommended…Flags&lt;/code&gt; 函数获得。
这些函数接受一个前缀，该前缀会添加到所有参数长名称之前。&lt;/p&gt;
&lt;!--
So calling
[`clientcmd.RecommendedConfigOverrideFlags(&#34;&#34;)`](https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#RecommendedConfigOverrideFlags)
results in command line arguments such as `--context`, `--namespace`, and so on.
The `--timeout` argument is given a default value of 0,
and the `--namespace` argument has a corresponding short variant, `-n`.
--&gt;
&lt;p&gt;因此调用
&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#RecommendedConfigOverrideFlags&#34;&gt;&lt;code&gt;clientcmd.RecommendedConfigOverrideFlags(&amp;quot;&amp;quot;)&lt;/code&gt;&lt;/a&gt;
会产生诸如 &lt;code&gt;--context&lt;/code&gt;、&lt;code&gt;--namespace&lt;/code&gt; 等命令行参数。
&lt;code&gt;--timeout&lt;/code&gt; 参数的默认值为 0，&lt;code&gt;--namespace&lt;/code&gt; 参数有一个对应的短变体 &lt;code&gt;-n&lt;/code&gt;。&lt;/p&gt;
&lt;!--
Adding a prefix, such as `&#34;from-&#34;`, results in command line arguments such as
`--from-context`, `--from-namespace`, etc.
This might not seem particularly useful on commands involving a single API server,
but they come in handy when multiple API servers are involved,
such as in multi-cluster scenarios.
--&gt;
&lt;p&gt;添加前缀（如 &lt;code&gt;&amp;quot;from-&amp;quot;&lt;/code&gt;）会产生诸如 &lt;code&gt;--from-context&lt;/code&gt;、&lt;code&gt;--from-namespace&lt;/code&gt; 等命令行参数。
这在涉及单个 API 服务器的命令上可能看起来不是特别有用，
但在涉及多个 API 服务器时（例如在多集群场景中）会派上用场。&lt;/p&gt;
&lt;!--
There&#39;s a potential gotcha here: prefixes don&#39;t modify the short name,
so `--namespace` needs some care if multiple prefixes are used:
only one of the prefixes can be associated with the `-n` short name.
You&#39;ll have to clear the short names associated with the other prefixes&#39;
`--namespace` , or perhaps all prefixes if there&#39;s no sensible
`-n` association.
Short names can be cleared as follows:
--&gt;
&lt;p&gt;这里有一个潜在的陷阱：前缀不会修改短名称，因此如果使用多个前缀，&lt;code&gt;--namespace&lt;/code&gt; 需要小心：
只有一个前缀可以与 &lt;code&gt;-n&lt;/code&gt; 短名称关联。
你必须清除与其他前缀的 &lt;code&gt;--namespace&lt;/code&gt; 关联的短名称，
或者如果没有合理的 &lt;code&gt;-n&lt;/code&gt; 关联，则清除所有前缀的短名称。
可以按以下方式清除短名称：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kflags &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; clientcmd.&lt;span style=&#34;color:#00a000&#34;&gt;RecommendedConfigOverrideFlags&lt;/span&gt;(prefix)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kflags.ContextOverrideFlags.Namespace.ShortName = &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
In a similar fashion, flags can be disabled entirely by clearing their long name:
--&gt;
&lt;p&gt;类似地，可以通过清除长名称来完全禁用标志：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kflags.ContextOverrideFlags.Namespace.LongName = &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Bind the flags
--&gt;
&lt;h3 id=&#34;绑定标志&#34;&gt;绑定标志&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%bb%91%e5%ae%9a%e6%a0%87%e5%bf%97&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Once a set of flags has been defined,
it can be used to bind command line arguments to overrides using
[`clientcmd.BindOverrideFlags`](https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#BindOverrideFlags).
This requires a
[`pflag`](https://pkg.go.dev/github.com/spf13/pflag) `FlagSet`
rather than one from Go&#39;s `flag` package.
--&gt;
&lt;p&gt;一旦定义了一组标志，
就可以使用
&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#BindOverrideFlags&#34;&gt;&lt;code&gt;clientcmd.BindOverrideFlags&lt;/code&gt;&lt;/a&gt;
将命令行参数绑定到覆盖标志。
这需要一个 &lt;a href=&#34;https://pkg.go.dev/github.com/spf13/pflag&#34;&gt;&lt;code&gt;pflag&lt;/code&gt;&lt;/a&gt; &lt;code&gt;FlagSet&lt;/code&gt;，
而不是 Go 的 &lt;code&gt;flag&lt;/code&gt; 包中的 FlagSet。&lt;/p&gt;
&lt;!--
If you also want to bind `--kubeconfig`, you should do so now,
by binding `ExplicitPath` in the loading rules:
--&gt;
&lt;p&gt;如果你还想绑定 &lt;code&gt;--kubeconfig&lt;/code&gt;，现在就应该这样做，
通过绑定加载规则中的 &lt;code&gt;ExplicitPath&lt;/code&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;flags.&lt;span style=&#34;color:#00a000&#34;&gt;StringVarP&lt;/span&gt;(&lt;span style=&#34;color:#666&#34;&gt;&amp;amp;&lt;/span&gt;loadingRules.ExplicitPath, &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;kubeconfig&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;absolute path(s) to the kubeconfig file(s)&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Build the merged configuration
--&gt;
&lt;h3 id=&#34;构建合并配置&#34;&gt;构建合并配置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%9e%84%e5%bb%ba%e5%90%88%e5%b9%b6%e9%85%8d%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Two functions are available to build a merged configuration:
--&gt;
&lt;p&gt;有两个函数可用于构建合并配置：&lt;/p&gt;
&lt;!--
* [`clientcmd.NewInteractiveDeferredLoadingClientConfig`](https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#NewInteractiveDeferredLoadingClientConfig)
* [`clientcmd.NewNonInteractiveDeferredLoadingClientConfig`](https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#NewNonInteractiveDeferredLoadingClientConfig)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#NewInteractiveDeferredLoadingClientConfig&#34;&gt;&lt;code&gt;clientcmd.NewInteractiveDeferredLoadingClientConfig&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#NewNonInteractiveDeferredLoadingClientConfig&#34;&gt;&lt;code&gt;clientcmd.NewNonInteractiveDeferredLoadingClientConfig&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
As the names suggest, the difference between the two is that the first
can ask for authentication information interactively,
using a provided reader,
whereas the second only operates on the information given to it by the caller.
--&gt;
&lt;p&gt;顾名思义，两者之间的区别在于第一个可以使用提供的阅读器交互式地请求认证信息，
而第二个仅根据调用者提供的信息进行操作。&lt;/p&gt;
&lt;!--
The &#34;deferred&#34; mention in these function names refers to the fact that
the final configuration will be determined as late as possible.
This means that these functions can be called before the command line arguments are parsed,
and the resulting configuration will use whatever values have been parsed
by the time it&#39;s actually constructed.
--&gt;
&lt;p&gt;这些函数名称中的&amp;quot;延迟（deferred）&amp;quot;指的是最终配置将尽可能晚地确定。
这意味着这些函数可以在解析命令行参数之前调用，生成的配置将使用实际构建时已解析的任何值。&lt;/p&gt;
&lt;!--
### Obtain an API client
--&gt;
&lt;h3 id=&#34;获取-api-客户端&#34;&gt;获取 API 客户端&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%8e%b7%e5%8f%96-api-%e5%ae%a2%e6%88%b7%e7%ab%af&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The merged configuration is returned as a
[`ClientConfig`](https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#ClientConfig) instance.
An API client can be obtained from that by calling the `ClientConfig()` method.
--&gt;
&lt;p&gt;合并配置作为
&lt;a href=&#34;https://pkg.go.dev/k8s.io/client-go/tools/clientcmd#ClientConfig&#34;&gt;&lt;code&gt;ClientConfig&lt;/code&gt;&lt;/a&gt; 实例返回。
可以通过调用 &lt;code&gt;ClientConfig()&lt;/code&gt; 方法从中获取 API 客户端。&lt;/p&gt;
&lt;!--
If no configuration is given
(`KUBECONFIG` is empty or points to non-existent files,
`~/.kube/config` doesn&#39;t exist,
and no configuration is given using command line arguments),
the default setup will return an obscure error referring to `KUBERNETES_MASTER`.
This is legacy behaviour;
several attempts have been made to get rid of it,
but it is preserved for the `--local` and `--dry-run` command line arguments in `--kubectl`.
You should check for &#34;empty configuration&#34; errors by calling `clientcmd.IsEmptyConfig()`
and provide a more explicit error message.
--&gt;
&lt;p&gt;如果没有提供配置
（&lt;code&gt;KUBECONFIG&lt;/code&gt; 为空或指向不存在的文件、&lt;code&gt;~/.kube/config&lt;/code&gt; 不存在、并且没有通过命令行参数提供配置），
默认设置将返回一个引用 &lt;code&gt;KUBERNETES_MASTER&lt;/code&gt; 的模糊错误。
这是遗留行为；已经多次尝试摆脱它，但为了 &lt;code&gt;--kubectl&lt;/code&gt; 中的 &lt;code&gt;--local&lt;/code&gt; 和 &lt;code&gt;--dry-run&lt;/code&gt; 命令行参数而保留。
你应该通过调用 &lt;code&gt;clientcmd.IsEmptyConfig()&lt;/code&gt; 检&lt;strong&gt;空配置&lt;/strong&gt;错误，并提供更明确的错误消息。&lt;/p&gt;
&lt;!--
The `Namespace()` method is also useful:
it returns the namespace that should be used.
It also indicates whether the namespace was overridden by the user
(using `--namespace`).
--&gt;
&lt;p&gt;&lt;code&gt;Namespace()&lt;/code&gt; 方法也很有用：
它返回应该使用的名字空间。
它还指示名字空间是否被用户覆盖（使用 &lt;code&gt;--namespace&lt;/code&gt;）。&lt;/p&gt;
&lt;!--
## Full example
--&gt;
&lt;h2 id=&#34;完整示例&#34;&gt;完整示例&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%ae%8c%e6%95%b4%e7%a4%ba%e4%be%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Here&#39;s a complete example.
--&gt;
&lt;p&gt;这是一个完整的示例。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;package&lt;/span&gt; main
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;import&lt;/span&gt; (
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;context&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;os&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;github.com/spf13/pflag&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	v1 &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;k8s.io/apimachinery/pkg/apis/meta/v1&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;k8s.io/client-go/kubernetes&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;k8s.io/client-go/tools/clientcmd&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#00a000&#34;&gt;main&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// Loading rules, no configuration&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	loadingRules &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; clientcmd.&lt;span style=&#34;color:#00a000&#34;&gt;NewDefaultClientConfigLoadingRules&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// Overrides and flag (command line argument) setup&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	configOverrides &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#666&#34;&gt;&amp;amp;&lt;/span&gt;clientcmd.ConfigOverrides{}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	flags &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; pflag.&lt;span style=&#34;color:#00a000&#34;&gt;NewFlagSet&lt;/span&gt;(&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;clientcmddemo&amp;#34;&lt;/span&gt;, pflag.ExitOnError)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	clientcmd.&lt;span style=&#34;color:#00a000&#34;&gt;BindOverrideFlags&lt;/span&gt;(configOverrides, flags,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		clientcmd.&lt;span style=&#34;color:#00a000&#34;&gt;RecommendedConfigOverrideFlags&lt;/span&gt;(&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	flags.&lt;span style=&#34;color:#00a000&#34;&gt;StringVarP&lt;/span&gt;(&lt;span style=&#34;color:#666&#34;&gt;&amp;amp;&lt;/span&gt;loadingRules.ExplicitPath, &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;kubeconfig&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;absolute path(s) to the kubeconfig file(s)&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	flags.&lt;span style=&#34;color:#00a000&#34;&gt;Parse&lt;/span&gt;(os.Args)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// Client construction&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	kubeConfig &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; clientcmd.&lt;span style=&#34;color:#00a000&#34;&gt;NewNonInteractiveDeferredLoadingClientConfig&lt;/span&gt;(loadingRules, configOverrides)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	config, err &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; kubeConfig.&lt;span style=&#34;color:#00a000&#34;&gt;ClientConfig&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;if&lt;/span&gt; err &lt;span style=&#34;color:#666&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;nil&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;if&lt;/span&gt; clientcmd.&lt;span style=&#34;color:#00a000&#34;&gt;IsEmptyConfig&lt;/span&gt;(err) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;			&lt;span style=&#34;color:#a2f&#34;&gt;panic&lt;/span&gt;(&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Please provide a configuration pointing to the Kubernetes API server&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		&lt;span style=&#34;color:#a2f&#34;&gt;panic&lt;/span&gt;(err)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	client, err &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; kubernetes.&lt;span style=&#34;color:#00a000&#34;&gt;NewForConfig&lt;/span&gt;(config)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;if&lt;/span&gt; err &lt;span style=&#34;color:#666&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;nil&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		&lt;span style=&#34;color:#a2f&#34;&gt;panic&lt;/span&gt;(err)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// How to find out what namespace to use&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	namespace, overridden, err &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; kubeConfig.&lt;span style=&#34;color:#00a000&#34;&gt;Namespace&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;if&lt;/span&gt; err &lt;span style=&#34;color:#666&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;nil&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		&lt;span style=&#34;color:#a2f&#34;&gt;panic&lt;/span&gt;(err)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	fmt.&lt;span style=&#34;color:#00a000&#34;&gt;Printf&lt;/span&gt;(&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Chosen namespace: %s; overridden: %t\n&amp;#34;&lt;/span&gt;, namespace, overridden)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// Let&amp;#39;s use the client&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	nodeList, err &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; client.&lt;span style=&#34;color:#00a000&#34;&gt;CoreV1&lt;/span&gt;().&lt;span style=&#34;color:#00a000&#34;&gt;Nodes&lt;/span&gt;().&lt;span style=&#34;color:#00a000&#34;&gt;List&lt;/span&gt;(context.&lt;span style=&#34;color:#00a000&#34;&gt;TODO&lt;/span&gt;(), v1.ListOptions{})
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;if&lt;/span&gt; err &lt;span style=&#34;color:#666&#34;&gt;!=&lt;/span&gt; &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;nil&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		&lt;span style=&#34;color:#a2f&#34;&gt;panic&lt;/span&gt;(err)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;for&lt;/span&gt; _, node &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;range&lt;/span&gt; nodeList.Items {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;		fmt.&lt;span style=&#34;color:#00a000&#34;&gt;Println&lt;/span&gt;(node.Name)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Happy coding, and thank you for your interest in implementing tools with
familiar usage patterns!
--&gt;
&lt;p&gt;祝你编码愉快，感谢你有兴趣实现具有熟悉使用模式的工具！&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35：通过 exec 插件 allowList 限制 kubeconfig 调用的可执行文件，该插件已添加到 kuberc</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/09/kubernetes-v1-35-kuberc-credential-plugin-allowlist/</link>
      <pubDate>Fri, 09 Jan 2026 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/09/kubernetes-v1-35-kuberc-credential-plugin-allowlist/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.35: Restricting executables invoked by kubeconfigs via exec plugin allowList added to kuberc&#34;
date: 2026-01-09T10:30:00-08:00
slug: kubernetes-v1-35-kuberc-credential-plugin-allowlist
author: &gt;
  [Peter Engelbert](https://github.com/pmengelbert) (Microsoft)
  [Ben Petersen](https://github.com/benjaminapetersen) (Microsoft)
--&gt;
&lt;!--
Did you know that `kubectl` can run arbitrary executables, including shell
scripts, with the full privileges of the invoking user, and without your
knowledge? Whenever you download or auto-generate a `kubeconfig`, the
`users[n].exec.command` field can specify an executable to fetch credentials on
your behalf. Don&#39;t get me wrong, this is an incredible feature that allows you
to authenticate to the cluster with external identity providers. Nevertheless,
you probably see the problem: Do you know exactly what executables your `kubeconfig`
is running on your system? Do you trust the pipeline that generated your `kubeconfig`?
If there has been a supply-chain attack on the code that generates the kubeconfig,
or if the generating pipeline has been compromised, an attacker might well be
doing unsavory things to your machine by tricking your `kubeconfig` into running
arbitrary code.
--&gt;
&lt;p&gt;你知道吗？&lt;code&gt;kubectl&lt;/code&gt; 可以在你不知情的情况下，以调用用户的完整权限运行任意可执行文件（包括 shell 脚本）。
每当你下载或自动生成 &lt;code&gt;kubeconfig&lt;/code&gt; 时，&lt;code&gt;users[n].exec.command&lt;/code&gt; 字段可以指定一个可执行文件代表你获取凭证。
别误会，这是一个很棒的特性，允许你使用外部身份提供者向集群进行身份验证。
然而，你可能已经看到了问题：你确切知道你的 &lt;code&gt;kubeconfig&lt;/code&gt; 在系统上运行的是什么可执行文件吗？
你信任生成你 &lt;code&gt;kubeconfig&lt;/code&gt; 的流水线吗？
如果生成 kubeconfig 的代码遭受了供应链攻击，或者生成流水线被入侵，
攻击者很可能通过诱骗你的 &lt;code&gt;kubeconfig&lt;/code&gt; 运行任意代码来对你的机器做些不好的事情。&lt;/p&gt;
&lt;!--
To give the user more control over what gets run on their system, [SIG-Auth](https://git.k8s.io/community/sig-auth) and [SIG-CLI](https://git.k8s.io/community/sig-cli) added the credential plugin policy and allowlist as a beta feature to
Kubernetes 1.35. This is available to all clients using the `client-go` library,
by filling out the [ExecProvider.PluginPolicy](https://github.com/kubernetes/client-go/blob/master/tools/clientcmd/api/types.go#L290) struct on a REST config. To
broaden the impact of this change, Kubernetes v1.35 also lets you manage this without
writing a line of application code. You can configure `kubectl` to enforce
the policy and allowlist by adding two fields to the `kuberc` configuration
file: `credentialPluginPolicy` and `credentialPluginAllowlist`. Adding one or
both of these fields restricts which credential plugins `kubectl` is allowed to execute.
--&gt;
&lt;p&gt;为了让用户更好地控制在其系统上运行的内容，&lt;a href=&#34;https://git.k8s.io/community/sig-auth&#34;&gt;SIG-Auth&lt;/a&gt;
和 &lt;a href=&#34;https://git.k8s.io/community/sig-cli&#34;&gt;SIG-CLI&lt;/a&gt; 在 Kubernetes 1.35
中将凭证插件策略和允许列表作为 Beta 特性添加。
所有使用 &lt;code&gt;client-go&lt;/code&gt; 库的客户端都可以通过在 REST 配置上填写
&lt;a href=&#34;https://github.com/kubernetes/client-go/blob/master/tools/clientcmd/api/types.go#L290&#34;&gt;ExecProvider.PluginPolicy&lt;/a&gt;
结构体来使用此特性。
为了扩大此更改的影响，Kubernetes v1.35 还允许你无需编写任何应用代码即可管理此特性。
你可以通过在 &lt;code&gt;kuberc&lt;/code&gt; 配置文件中添加两个字段来配置 &lt;code&gt;kubectl&lt;/code&gt;
强制执行策略和允许列表：&lt;code&gt;credentialPluginPolicy&lt;/code&gt; 和 &lt;code&gt;credentialPluginAllowlist&lt;/code&gt;。
添加其中一个或两个字段会限制 &lt;code&gt;kubectl&lt;/code&gt; 允许执行的凭证插件。&lt;/p&gt;
&lt;!--
## How it works
--&gt;
&lt;h2 id=&#34;工作原理&#34;&gt;工作原理&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b7%a5%e4%bd%9c%e5%8e%9f%e7%90%86&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
A full description of this functionality is available in our [official documentation](/docs/reference/kubectl/kuberc/) for kuberc,
but this blog post will give a brief overview of the new security knobs. The new
features are in beta and available without using any feature gates.
--&gt;
&lt;p&gt;此特性的完整描述可在我们的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/kubectl/kuberc/&#34;&gt;官方文档&lt;/a&gt;中找到，
但这篇博客文章将简要概述新的安全控制选项。这些新特性处于 Beta 阶段，无需使用任何特性门控即可使用。&lt;/p&gt;
&lt;!--
The following example is the simplest one: simply don&#39;t specify the new fields.
--&gt;
&lt;p&gt;以下示例是最简单的情况：不指定新字段。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubectl.config.k8s.io/v1beta1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Preference&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This will keep `kubectl` acting as it always has, and all plugins will be
allowed.
--&gt;
&lt;p&gt;这将保持 &lt;code&gt;kubectl&lt;/code&gt; 的行为与以往相同，允许所有插件。&lt;/p&gt;
&lt;!--
The next example is functionally identical, but it is more explicit and
therefore preferred if it&#39;s actually what you want:
--&gt;
&lt;p&gt;下一个示例在特性上是相同的，但更明确，因此如果这确实是你想要的，建议使用：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubectl.config.k8s.io/v1beta1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Preference&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;credentialPluginPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;AllowAll&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
If you *don&#39;t know* whether or not you&#39;re using exec credential plugins, try
setting your policy to `DenyAll`:
--&gt;
&lt;p&gt;如果你&lt;em&gt;不知道&lt;/em&gt;是否正在使用 exec 凭证插件，请尝试将策略设置为 &lt;code&gt;DenyAll&lt;/code&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubectl.config.k8s.io/v1beta1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Preference&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;credentialPluginPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;DenyAll&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
If you *are* using credential plugins, you&#39;ll quickly find out what `kubectl` is
trying to execute. You&#39;ll get an error like the following.
--&gt;
&lt;p&gt;如果你&lt;em&gt;确实&lt;/em&gt;正在使用凭证插件，你会很快发现 &lt;code&gt;kubectl&lt;/code&gt; 尝试执行的内容。你会收到如下错误。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Unable to connect to the server: getting credentials: plugin &amp;quot;cloudco-login&amp;quot; not allowed: policy set to &amp;quot;DenyAll&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;!--
If there is insufficient information for you to debug the issue, increase the
logging verbosity when you run your next command.  For example:
--&gt;
&lt;p&gt;如果信息不足以调试问题，请在运行下一个命令时增加日志详细级别。例如：&lt;/p&gt;
&lt;!--
```bash
# 如果问题仍然不清楚，可以增加或减少描述过于冗长的内容。
kubectl get pods --verbosity 5
```
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# increase or decrease verbosity if the issue is still unclear&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get pods --verbosity &lt;span style=&#34;color:#666&#34;&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Selectively allowing plugins
--&gt;
&lt;h3 id=&#34;选择性允许插件&#34;&gt;选择性允许插件&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%80%89%e6%8b%a9%e6%80%a7%e5%85%81%e8%ae%b8%e6%8f%92%e4%bb%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
What if you need the `cloudco-login` plugin to do your daily work? That is why
there&#39;s a third option for your policy, `Allowlist`. To allow a specific plugin,
set the policy and add the `credentialPluginAllowlist`:
--&gt;
&lt;p&gt;如果你需要 &lt;code&gt;cloudco-login&lt;/code&gt; 插件来完成日常工作怎么办？这就是为什么策略有第三个选项 &lt;code&gt;Allowlist&lt;/code&gt;。
要允许特定插件，请设置策略并添加 &lt;code&gt;credentialPluginAllowlist&lt;/code&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;kubectl.config.k8s.io/v1beta1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Preference&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;credentialPluginPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Allowlist&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;credentialPluginAllowlist&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;/usr/local/bin/cloudco-login&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;get-identity&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
You&#39;ll notice that there are two entries in the allowlist. One of them is
specified by full path, and the other, `get-identity` is just a basename. When
you specify just the basename, the full path will be looked up using
`exec.LookPath`, which does not expand globbing or handle wildcards.
Globbing is not supported at this time. Both forms
(basename and full path) are acceptable, but the full path is preferable because
it narrows the scope of allowed binaries even further.
--&gt;
&lt;p&gt;你会注意到允许列表中有两个条目。其中一个通过完整路径指定，另一个 &lt;code&gt;get-identity&lt;/code&gt; 只是一个基本名称。
当你只指定基本名称时，将使用 &lt;code&gt;exec.LookPath&lt;/code&gt; 查找完整路径，它不展开通配符或处理通配符。
目前不支持通配符。两种形式（基本名称和完整路径）都可以接受，但完整路径更好，
因为它进一步缩小了允许的二进制文件的范围。&lt;/p&gt;
&lt;!--
### Future enhancements
--&gt;
&lt;h3 id=&#34;未来增强&#34;&gt;未来增强&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%9c%aa%e6%9d%a5%e5%a2%9e%e5%bc%ba&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Currently, an allowlist entry has only one field, `name`. In the future, we
(Kubernetes SIG CLI) want to see other requirements added. One idea that seems
useful is checksum verification whereby, for example, a binary would only be allowed
to run if it has the sha256 sum
`b9a3fad00d848ff31960c44ebb5f8b92032dc085020f857c98e32a5d5900ff9c` **and**
exists at the path `/usr/bin/cloudco-login`.
--&gt;
&lt;p&gt;目前，允许列表条目只有一个字段 &lt;code&gt;name&lt;/code&gt;。将来，我们（Kubernetes SIG CLI）希望添加其他要求。
一个有用的想法是校验和验证，例如，只有当二进制文件具有 sha256 校验和
&lt;code&gt;b9a3fad00d848ff31960c44ebb5f8b92032dc085020f857c98e32a5d5900ff9c&lt;/code&gt;
&lt;strong&gt;并且&lt;/strong&gt;存在于路径 &lt;code&gt;/usr/bin/cloudco-login&lt;/code&gt; 时，才允许运行。&lt;/p&gt;
&lt;!--
Another possibility is only allowing binaries that have been signed by one of a
set of a trusted signing keys.
--&gt;
&lt;p&gt;另一种可能性是只允许由一组可信签名密钥之一签名的二进制文件。&lt;/p&gt;
&lt;!--
## Get involved
--&gt;
&lt;h2 id=&#34;参与其中&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e5%85%b6%e4%b8%ad&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The credential plugin policy is still under development and we are very interested
in your feedback. We&#39;d love to hear what you like about it and what problems
you&#39;d like to see it solve. Or, if you have the cycles to contribute one of the
above enhancements, they&#39;d be a great way to get started contributing to
Kubernetes. Feel free to join in the discussion on slack:
- [#sig-cli](https://kubernetes.slack.com/archives/C2GL57FJ4),
- [#sig-auth](https://kubernetes.slack.com/archives/C0EN96KUY).
--&gt;
&lt;p&gt;凭证插件策略仍在开发中，我们非常感兴趣你的反馈。我们很想听听你喜欢它的哪些方面以及你希望它解决哪些问题。
或者，如果你有时间贡献上述增强特性之一，它们将是开始为 Kubernetes 做出贡献的好方法。
欢迎在 Slack 上加入讨论：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kubernetes.slack.com/archives/C2GL57FJ4&#34;&gt;#sig-cli&lt;/a&gt;，&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kubernetes.slack.com/archives/C0EN96KUY&#34;&gt;#sig-auth&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35：向 CSI 驱动程序传递服务账号令牌的最佳方式</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/07/kubernetes-v1-35-csi-sa-tokens-secrets-field-beta/</link>
      <pubDate>Wed, 07 Jan 2026 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/07/kubernetes-v1-35-csi-sa-tokens-secrets-field-beta/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.35: A Better Way to Pass Service Account Tokens to CSI Drivers&#34;
date: 2026-01-07T10:30:00-08:00
slug: kubernetes-v1-35-csi-sa-tokens-secrets-field-beta
author: &gt;
  [Anish Ramasekar](https://github.com/aramase) (Microsoft)
--&gt;
&lt;!--
If you maintain a CSI driver that uses service account tokens,
Kubernetes v1.35 brings a refinement you&#39;ll want to know about.
Since the introduction of the [TokenRequests feature](https://kubernetes-csi.github.io/docs/token-requests.html),
service account tokens requested by CSI drivers have been passed to them through the `volume_context` field.
While this has worked, it&#39;s not the ideal place for sensitive information,
and we&#39;ve seen instances where tokens were accidentally logged in CSI drivers.
--&gt;
&lt;p&gt;如果你维护使用服务账号令牌的 CSI 驱动程序，
Kubernetes v1.35 带来了一项你希望了解的改进。
自从引入 &lt;a href=&#34;https://kubernetes-csi.github.io/docs/token-requests.html&#34;&gt;TokenRequests 特性&lt;/a&gt;以来，
CSI 驱动程序请求的服务账号令牌一直通过 &lt;code&gt;volume_context&lt;/code&gt; 字段传递给他们。
虽然这可以工作，但它不是存储敏感信息的理想位置，
我们已经看到过在 CSI 驱动程序中意外记录令牌的情况。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 introduces a beta solution to address this:
*CSI Driver Opt-in for Service Account Tokens via Secrets Field*.
This allows CSI drivers to receive service account tokens
through the `secrets` field in `NodePublishVolumeRequest`,
which is the appropriate place for sensitive data in the CSI specification.
--&gt;
&lt;p&gt;Kubernetes v1.35 引入了一个 Beta 解决方案来解决这个问题：
&lt;strong&gt;通过 Secret 字段实现服务账号令牌的 CSI 驱动程序选择加入&lt;/strong&gt;。
这允许 CSI 驱动程序通过 &lt;code&gt;NodePublishVolumeRequest&lt;/code&gt; 中的 &lt;code&gt;secrets&lt;/code&gt; 字段接收服务账号令牌，
这是 CSI 规范中存储敏感数据的适当位置。&lt;/p&gt;
&lt;!--
## Understanding the existing approach
--&gt;
&lt;h2 id=&#34;理解现有方法&#34;&gt;理解现有方法&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%90%86%e8%a7%a3%e7%8e%b0%e6%9c%89%e6%96%b9%e6%b3%95&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
When CSI drivers use the [TokenRequests feature](https://kubernetes-csi.github.io/docs/token-requests.html),
they can request service account tokens for workload identity
by configuring the `TokenRequests` field in the CSIDriver spec.
These tokens are passed to drivers as part of the volume attributes map,
using the key `csi.storage.k8s.io/serviceAccount.tokens`.
--&gt;
&lt;p&gt;当 CSI 驱动程序使用 &lt;a href=&#34;https://kubernetes-csi.github.io/docs/token-requests.html&#34;&gt;TokenRequests 特性&lt;/a&gt;时，
它们可以通过在 CSIDriver spec 中配置 &lt;code&gt;TokenRequests&lt;/code&gt; 字段来请求工作负载身份的服务账号令牌。
这些令牌作为卷属性映射的一部分传递给驱动程序，
使用密钥 &lt;code&gt;csi.storage.k8s.io/serviceAccount.tokens&lt;/code&gt;。&lt;/p&gt;
&lt;!--
The `volume_context` field works, but it&#39;s not designed for sensitive data.
Because of this, there are a few challenges:
--&gt;
&lt;p&gt;&lt;code&gt;volume_context&lt;/code&gt; 字段可以工作，但它不是为敏感数据设计的。
正因为如此，存在一些挑战：&lt;/p&gt;
&lt;!--
First, the [`protosanitizer`](https://github.com/kubernetes-csi/csi-lib-utils/tree/master/protosanitizer) tool that CSI drivers use doesn&#39;t treat volume context as sensitive,
so service account tokens can end up in logs when gRPC requests are logged.
This happened with [CVE-2023-2878](https://github.com/kubernetes-sigs/secrets-store-csi-driver/security/advisories/GHSA-g82w-58jf-gcxx) in the Secrets Store CSI Driver
and [CVE-2024-3744](https://github.com/kubernetes/kubernetes/issues/124759) in the Azure File CSI Driver.
--&gt;
&lt;p&gt;首先，CSI 驱动程序使用的
&lt;a href=&#34;https://github.com/kubernetes-csi/csi-lib-utils/tree/master/protosanitizer&#34;&gt;&lt;code&gt;protosanitizer&lt;/code&gt;&lt;/a&gt;
工具不会将卷上下文视为敏感数据，
因此服务账号令牌可能会在记录 gRPC 请求时出现在日志中。
这在 Secret Store CSI 驱动程序的
&lt;a href=&#34;https://github.com/kubernetes-sigs/secrets-store-csi-driver/security/advisories/GHSA-g82w-58jf-gcxx&#34;&gt;CVE-2023-2878&lt;/a&gt;
和 Azure File CSI 驱动程序的
&lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/124759&#34;&gt;CCVE-2024-3744&lt;/a&gt; 中都发生过。&lt;/p&gt;
&lt;!--
Second, each CSI driver that wants to avoid this issue needs to implement its own sanitization logic,
which leads to inconsistency across drivers.
--&gt;
&lt;p&gt;其次，每个想避免此问题的 CSI 驱动程序都需要实现自己的清理逻辑，
这导致了驱动程序之间的不一致。&lt;/p&gt;
&lt;!--
The CSI specification already has a `secrets` field in `NodePublishVolumeRequest`
that&#39;s designed exactly for this kind of sensitive information.
The challenge is that we can&#39;t just change where we put the tokens
without breaking existing CSI drivers that expect them in volume context.
--&gt;
&lt;p&gt;CSI 规范在 &lt;code&gt;NodePublishVolumeRequest&lt;/code&gt; 中已经有一个 &lt;code&gt;secrets&lt;/code&gt; 字段，
这正是为这类敏感信息设计的。
挑战在于，我们不能仅仅改变令牌放置的位置，
而不破坏期望在卷上下文中获取令牌的现有 CSI 驱动程序。&lt;/p&gt;
&lt;!--
## How the opt-in mechanism works
--&gt;
&lt;h2 id=&#34;选择加入机制如何工作&#34;&gt;选择加入机制如何工作&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%80%89%e6%8b%a9%e5%8a%a0%e5%85%a5%e6%9c%ba%e5%88%b6%e5%a6%82%e4%bd%95%e5%b7%a5%e4%bd%9c&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes v1.35 introduces an opt-in mechanism that lets CSI drivers choose
how they receive service account tokens.
This way, existing drivers continue working as they do today,
and drivers can move to the more appropriate secrets field when they&#39;re ready.
--&gt;
&lt;p&gt;Kubernetes v1.35 引入了一个选择加入机制，让 CSI 驱动程序选择如何接收服务账号令牌。
这样，现有的驱动程序继续按当前方式工作，而驱动程序可以在准备好时迁移到更合适的 Secret 字段。&lt;/p&gt;
&lt;!--
CSI drivers can set a new field in their CSIDriver spec:
--&gt;
&lt;p&gt;CSI 驱动程序可以在其 CSIDriver &lt;code&gt;spec&lt;/code&gt; 中设置一个新字段：&lt;/p&gt;
&lt;!--
```yaml
#
# CAUTION: this is an example configuration.
#          Do not use this for your own cluster!
#
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
  name: example-csi-driver
spec:
  # ... existing fields ...
  tokenRequests:
  - audience: &#34;example.com&#34;
    expirationSeconds: 3600
  # New field for opting into secrets delivery
  serviceAccountTokenInSecrets: true  # defaults to false
```
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;#&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 注意：这只是一个配置示例。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;#      请勿将此配置用于你自己的集群！&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;#&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;storage.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;CSIDriver&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example-csi-driver&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# ... 现有字段...&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tokenRequests&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;audience&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;example.com&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;expirationSeconds&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;3600&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 新增 Secret 传递选项&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;serviceAccountTokenInSecrets&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 默认为 false&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
The behavior depends on the `serviceAccountTokenInSecrets` field:
--&gt;
&lt;p&gt;行为取决于 &lt;code&gt;serviceAccountTokenInSecrets&lt;/code&gt; 字段：&lt;/p&gt;
&lt;!--
When set to `false` (the default), tokens are placed in `VolumeContext` with the key `csi.storage.k8s.io/serviceAccount.tokens`, just like today.
When set to `true`, tokens are placed only in the `Secrets` field with the same key.
--&gt;
&lt;p&gt;当设置为 &lt;code&gt;false&lt;/code&gt;（默认）时，令牌会被放置在 &lt;code&gt;VolumeContext&lt;/code&gt; 中，
密钥为 &lt;code&gt;csi.storage.k8s.io/serviceAccount.tokens&lt;/code&gt;，与今天相同。
当设置为 &lt;code&gt;true&lt;/code&gt; 时，令牌仅被放置在 &lt;code&gt;Secrets&lt;/code&gt; 字段中，使用相同的密钥。&lt;/p&gt;
&lt;!--
## About the beta release
--&gt;
&lt;h2 id=&#34;关于-beta-发布&#34;&gt;关于 Beta 发布&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%85%b3%e4%ba%8e-beta-%e5%8f%91%e5%b8%83&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The `CSIServiceAccountTokenSecrets` feature gate is enabled by default
on both kubelet and kube-apiserver.
Since the `serviceAccountTokenInSecrets` field defaults to `false`,
enabling the feature gate doesn&#39;t change any existing behavior.
All drivers continue receiving tokens via volume context unless they explicitly opt in.
This is why we felt comfortable starting at beta rather than alpha.
--&gt;
&lt;p&gt;&lt;code&gt;CSIServiceAccountTokenSecrets&lt;/code&gt; 特性门控在 kubelet 和 kube-apiserver 上默认启用。
由于 &lt;code&gt;serviceAccountTokenInSecrets&lt;/code&gt; 字段默认为 &lt;code&gt;false&lt;/code&gt;，
启用特性门控不会改变任何现有行为。
所有驱动程序继续通过卷上下文接收令牌，除非它们明确选择加入。
这就是为什么我们觉得从 Beta 开始而不是 Alpha 会更安心。&lt;/p&gt;
&lt;!--
## Guide for CSI driver authors
--&gt;
&lt;h2 id=&#34;csi-驱动程序作者指南&#34;&gt;CSI 驱动程序作者指南&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#csi-%e9%a9%b1%e5%8a%a8%e7%a8%8b%e5%ba%8f%e4%bd%9c%e8%80%85%e6%8c%87%e5%8d%97&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you maintain a CSI driver that uses service account tokens, here&#39;s how to adopt this feature.
--&gt;
&lt;p&gt;如果你维护使用服务账号令牌的 CSI 驱动程序，以下是采用此特性的方法。&lt;/p&gt;
&lt;!--
### Adding fallback logic
--&gt;
&lt;h3 id=&#34;添加回退逻辑&#34;&gt;添加回退逻辑&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%b7%bb%e5%8a%a0%e5%9b%9e%e9%80%80%e9%80%bb%e8%be%91&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
First, update your driver code to check both locations for tokens.
This makes your driver compatible with both the old and new approaches:
--&gt;
&lt;p&gt;首先，更新驱动程序代码以检查两个位置的令牌。
这使你的驱动程序与新旧方法都兼容：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;const&lt;/span&gt; serviceAccountTokenKey = &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;csi.storage.k8s.io/serviceAccount.tokens&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#00a000&#34;&gt;getServiceAccountTokens&lt;/span&gt;(req &lt;span style=&#34;color:#666&#34;&gt;*&lt;/span&gt;csi.NodePublishVolumeRequest) (&lt;span style=&#34;color:#0b0;font-weight:bold&#34;&gt;string&lt;/span&gt;, &lt;span style=&#34;color:#0b0;font-weight:bold&#34;&gt;error&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// Check secrets field first (new behavior when driver opts in)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;if&lt;/span&gt; tokens, ok &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; req.Secrets[serviceAccountTokenKey]; ok {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;return&lt;/span&gt; tokens, &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;nil&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-style:italic&#34;&gt;// Fall back to volume context (existing behavior)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;if&lt;/span&gt; tokens, ok &lt;span style=&#34;color:#666&#34;&gt;:=&lt;/span&gt; req.VolumeContext[serviceAccountTokenKey]; ok {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;return&lt;/span&gt; tokens, &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;nil&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;return&lt;/span&gt; &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;, fmt.&lt;span style=&#34;color:#00a000&#34;&gt;Errorf&lt;/span&gt;(&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;service account tokens not found&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This fallback logic is backward compatible and safe to ship in any driver version,
even before clusters upgrade to v1.35.
--&gt;
&lt;p&gt;此回退逻辑向后兼容，可以安全地包含在任何驱动程序版本中，
即使在集群升级到 v1.35 之前也是如此。&lt;/p&gt;
&lt;!--
### Rollout sequence
--&gt;
&lt;h3 id=&#34;推出顺序&#34;&gt;推出顺序&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%8e%a8%e5%87%ba%e9%a1%ba%e5%ba%8f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
CSI driver authors need to follow a specific sequence when adopting this feature to avoid breaking existing volumes.
--&gt;
&lt;p&gt;CSI 驱动程序作者在采用此特性时需要遵循特定顺序，以避免破坏现有卷。&lt;/p&gt;
&lt;!--
**Driver preparation** (can happen anytime)
--&gt;
&lt;p&gt;&lt;strong&gt;驱动程序准备&lt;/strong&gt;（可以随时进行）&lt;/p&gt;
&lt;!--
You can start preparing your driver right away by adding fallback logic that checks both the secrets field and volume context for tokens.
This code change is backward compatible and safe to ship in any driver version, even before clusters upgrade to v1.35.
We encourage you to add this fallback logic early, cut releases, and even backport to maintenance branches where feasible.
--&gt;
&lt;p&gt;你可以立即通过添加检查 Secret 字段和卷上下文中令牌的回退逻辑来准备驱动程序。
此代码更改向后兼容，可以安全地包含在任何驱动程序版本中，即使在集群升级到 v1.35 之前也是如此。
我们鼓励你尽早添加此回退逻辑、发布版本，并在可行的情况下甚至 backport 到维护分支。&lt;/p&gt;
&lt;!--
**Cluster upgrade and feature enablement**
--&gt;
&lt;p&gt;&lt;strong&gt;集群升级和特性启用&lt;/strong&gt;&lt;/p&gt;
&lt;!--
Once your driver has the fallback logic deployed, here&#39;s the safe rollout order for enabling the feature in a cluster:
--&gt;
&lt;p&gt;一旦你的驱动程序部署了回退逻辑，以下是在集群中启用该特性的安全推出顺序：&lt;/p&gt;
&lt;!--
1. Complete the kube-apiserver upgrade to 1.35 or later
1. Complete kubelet upgrade to 1.35 or later on all nodes
1. Ensure CSI driver version with fallback logic is deployed (if not already done in preparation phase)
1. Fully complete CSI driver DaemonSet rollout across all nodes
1. Update your CSIDriver manifest to set `serviceAccountTokenInSecrets: true`
--&gt;
&lt;ol&gt;
&lt;li&gt;完成 kube-apiserver 升级到 1.35 或更高版本&lt;/li&gt;
&lt;li&gt;完成所有节点上 kubelet 升级到 1.35 或更高版本&lt;/li&gt;
&lt;li&gt;确保部署了具有回退逻辑的 CSI 驱动程序版本（如果尚未在准备阶段完成）&lt;/li&gt;
&lt;li&gt;在所有节点上完全完成 CSI 驱动程序 DaemonSet 推出&lt;/li&gt;
&lt;li&gt;更新你的 CSIDriver 清单以设置 &lt;code&gt;serviceAccountTokenInSecrets: true&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
### Important constraints
--&gt;
&lt;h3 id=&#34;重要约束&#34;&gt;重要约束&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%87%8d%e8%a6%81%e7%ba%a6%e6%9d%9f&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The most important thing to remember is timing.
If your CSI driver DaemonSet and CSIDriver object are in the same manifest or Helm chart,
you need two separate updates.
Deploy the new driver version with fallback logic first,
wait for the DaemonSet rollout to complete,
then update the CSIDriver spec to set `serviceAccountTokenInSecrets: true`.
--&gt;
&lt;p&gt;最重要需要记住的是时机。
如果你的 CSI 驱动程序 DaemonSet 和 CSIDriver 对象在同一个清单或 Helm Chart 中，
你需要两次单独的更新。
首先部署带有回退逻辑的新驱动程序版本，等待 DaemonSet 推出完成，
然后更新 CSIDriver 以设置 &lt;code&gt;serviceAccountTokenInSecrets: true&lt;/code&gt;。&lt;/p&gt;
&lt;!--
Also, don&#39;t update the CSIDriver before all driver pods have rolled out.
If you do, volume mounts will fail on nodes still running the old driver version,
since those pods only check volume context.
--&gt;
&lt;p&gt;此外，在所有驱动程序 Pod 推出完成之前不要更新 CSIDriver。
如果你这样做了，在仍在运行旧驱动程序版本的节点上，卷挂载将失败，
因为那些 Pod 只检查卷上下文。&lt;/p&gt;
&lt;!--
## Why this matters
--&gt;
&lt;h2 id=&#34;为什么这很重要&#34;&gt;为什么这很重要&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%ba%e4%bb%80%e4%b9%88%e8%bf%99%e5%be%88%e9%87%8d%e8%a6%81&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Adopting this feature helps in a few ways:
--&gt;
&lt;p&gt;采用此特性有助于以下几方面：&lt;/p&gt;
&lt;!--
- It eliminates the risk of accidentally logging service account tokens as part of volume context in gRPC requests
- It uses the CSI specification&#39;s designated field for sensitive data, which feels right
- The `protosanitizer` tool automatically handles the secrets field correctly, so you don&#39;t need driver-specific workarounds
- It&#39;s opt-in, so you can migrate at your own pace without breaking existing deployments
--&gt;
&lt;ul&gt;
&lt;li&gt;消除了在 gRPC 请求中作为卷上下文的一部分意外记录服务账号令牌的风险&lt;/li&gt;
&lt;li&gt;使用 CSI 规范指定用于敏感数据的字段，这是正确的&lt;/li&gt;
&lt;li&gt;&lt;code&gt;protosanitizer&lt;/code&gt; 工具自动正确处理 Secret 字段，因此你不需要特定于驱动程序的变通方法&lt;/li&gt;
&lt;li&gt;这是选择加入的，因此你可以按自己的节奏迁移，而不会破坏现有部署&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Call to action
--&gt;
&lt;h2 id=&#34;号召行动&#34;&gt;号召行动&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%b7%e5%8f%ac%e8%a1%8c%e5%8a%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
We (Kubernetes SIG Storage) encourage CSI driver authors to adopt this feature and provide feedback
on the migration experience.
If you have thoughts on the API design or run into any issues during adoption,
please reach out to us on the
[#csi](https://kubernetes.slack.com/archives/C8EJ01Z46) channel on Kubernetes Slack
(for an invitation, visit [https://slack.k8s.io/](https://slack.k8s.io/)).
--&gt;
&lt;p&gt;我们（Kubernetes SIG Storage）鼓励 CSI 驱动程序作者采用此特性并提供关于迁移体验的反馈。
如果你对 API 设计有想法或在采用过程中遇到任何问题，
请在 Kubernetes Slack 的 &lt;a href=&#34;https://kubernetes.slack.com/archives/C8EJ01Z46&#34;&gt;#csi&lt;/a&gt; 频道联系我们
（获取邀请，请访问 &lt;a href=&#34;https://slack.k8s.io/&#34;&gt;https://slack.k8s.io/&lt;/a&gt;）。&lt;/p&gt;
&lt;!--
You can follow along on
[KEP-5538](https://kep.k8s.io/5538)
to track progress across the coming Kubernetes releases.
--&gt;
&lt;p&gt;你可以在 &lt;a href=&#34;https://kep.k8s.io/5538&#34;&gt;KEP-5538&lt;/a&gt; 上跟踪后续 Kubernetes 版本的进度。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35: 通过就地重启 Pod 实现更高的效率</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/05/kubernetes-v1-35-restart-all-containers/</link>
      <pubDate>Mon, 05 Jan 2026 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/05/kubernetes-v1-35-restart-all-containers/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.35: New level of efficiency with in-place Pod restart&#34;
date: 2026-01-05T10:30:00-08:00
slug: kubernetes-v1-35-restart-all-containers
author: &gt;
  [Yuan Wang](https://github.com/yuanwang04)
  [Giuseppe Tinti Tomio](https://github.com/GiuseppeTT)
  [Sergey Kanzhelev](https://github.com/SergeyKanzhelev)
translator: &gt;
  [Xin Li](https://github.com/my-git9)
--&gt;
&lt;!--
The release of Kubernetes 1.35 introduces a powerful new feature that provides a much-requested capability: the ability to trigger a full, in-place restart of the Pod. This feature, *Restart All Containers* (alpha in 1.35), allows for an efficient way to reset a Pod&#39;s state compared to resource-intensive approach of deleting and recreating the entire Pod. This feature is especially useful for AI/ML workloads allowing application developers to concentrate on their core training logic while offloading complex failure-handling and recovery mechanisms to sidecars and declarative Kubernetes configuration. With `RestartAllContainers` and other planned enhancements, Kubernetes continues to add building blocks for creating the most flexible, robust, and efficient platforms for AI/ML workloads.

This new functionality is available by enabling the `RestartAllContainersOnContainerExits` feature gate. This alpha feature extends the [*Container Restart Rules* feature](/docs/concepts/workloads/pods/pod-lifecycle/#container-restart-rules), which graduated to beta in Kubernetes 1.35.
--&gt;
&lt;p&gt;Kubernetes 1.35 版本引入了一项强大的新特性，满足了用户对 Pod 就地重启的迫切需求。
这项名为“重启所有容器”（Restart All Containers，1.35 版本为 Alpha 版）的特性，
相比于资源用量较高的删除并重建整个 Pod 的方式，能够更高效地重置 Pod 的状态。
该特性对于 AI/ML 工作负载尤为实用，使应用程序开发人员能够专注于核心训练逻辑，
同时将复杂的故障处理和恢复机制交给边车容器和声明式 Kubernetes 配置来处理。
凭借 &lt;code&gt;RestartAllContainers&lt;/code&gt; 和其他计划中的增强特性，
Kubernetes 将继续构建更灵活、更健壮、更高效的 AI/ML 工作负载平台。&lt;/p&gt;
&lt;p&gt;启用 &lt;code&gt;RestartAllContainersOnContainerExits&lt;/code&gt; 特性门控即可使用此新特性。
此 Alpha 特性扩展了&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#container-restart-rules&#34;&gt;&lt;strong&gt;容器重启规则&lt;/strong&gt;特性&lt;/a&gt;，
该特性在 Kubernetes 1.35 中升级为 Beta 版。&lt;/p&gt;
&lt;!--
## The problem: when a single container restart isn&#39;t enough and recreating pods is too costly

Kubernetes has long supported restart policies at the Pod level (`restartPolicy`) and, more recently, at the [individual container level](/blog/2025/08/29/kubernetes-v1-34-per-container-restart-policy/). These policies are great for handling crashes in a single, isolated process. However, many modern applications have more complex inter-container dependencies. For instance:
--&gt;
&lt;h2 id=&#34;问题-当单个容器重启不足以解决问题-而重新创建-pod-成本过高时&#34;&gt;问题：当单个容器重启不足以解决问题，而重新创建 Pod 成本过高时&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%97%ae%e9%a2%98-%e5%bd%93%e5%8d%95%e4%b8%aa%e5%ae%b9%e5%99%a8%e9%87%8d%e5%90%af%e4%b8%8d%e8%b6%b3%e4%bb%a5%e8%a7%a3%e5%86%b3%e9%97%ae%e9%a2%98-%e8%80%8c%e9%87%8d%e6%96%b0%e5%88%9b%e5%bb%ba-pod-%e6%88%90%e6%9c%ac%e8%bf%87%e9%ab%98%e6%97%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kubernetes 长期以来一直支持 Pod 级别的重启策略（&lt;code&gt;restartPolicy&lt;/code&gt;），
最近也支持&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/08/29/kubernetes-v1-34-per-container-restart-policy/&#34;&gt;单个容器级别的重启策略&lt;/a&gt;。
这些策略非常适合处理单个独立进程中的崩溃。然而，许多现代应用程序具有更复杂的容器间依赖关系。例如：&lt;/p&gt;
&lt;!--
- An **init container** prepares the environment by mounting a volume or generating a configuration file. If the main application container corrupts this environment, simply restarting that one container is not enough. The entire initialization process needs to run again.
- A **watcher sidecar** monitors system health. If it detects an unrecoverable but retriable error state, it must trigger a restart of the main application container from a clean slate.
- A **sidecar** that manages a remote resource fails. Even if the sidecar restarts on its own, the main container may be stuck trying to access an outdated or broken connection.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;初始化容器&lt;/strong&gt;通过挂载卷或生成配置文件来准备环境。如果主应用程序容器损坏了此环境，
仅仅重启该容器是不够的，需要重新运行整个初始化过程。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;监视边车&lt;/strong&gt;监控系统健康状况。如果它检测到不可恢复但可重试的错误状态，则必须触发主应用程序容器从头开始重启。&lt;/li&gt;
&lt;li&gt;管理远程资源的&lt;strong&gt;边车&lt;/strong&gt;发生故障。即使边车自行重启，主容器也可能因为尝试访问过时或损坏的连接而卡住。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
In all these cases, the desired action is not to restart a single container, but all of them. Previously, the only way to achieve this was to delete the Pod and have a controller (like a Job or ReplicaSet) create a new one. This process is slow and expensive, involving the scheduler, node resource allocation and re-initialization of networking and storage.

This inefficiency becomes even worse when handling large-scale AI/ML workloads (&gt;= 1,000 Nodes with one Pod per Node). A common requirement for these synchronous workloads is that when a failure occurs (such as a Node crash), all Pods in the fleet must be recreated to reset the state before training can resume, even if all the other Pods were not directly affected by the failure. Deleting, creating and scheduling thousands of Pods simultaneously creates a massive bottleneck. The estimated overhead of this failure could cost [$100,000 per month in wasted resources](https://docs.google.com/document/d/16zexVooHKPc80F4dVtUjDYK9DOpkVPRNfSv0zRtfFpk/edit?tab=t.0#bookmark=id.qwqcnzf96avw).
--&gt;
&lt;p&gt;在所有这些情况下，我们期望的操作并非重启单个容器，而是重启所有容器。
此前，实现此目的的唯一方法是删除 Pod，然后由控制器（例如 Job 或 ReplicaSet）创建一个新的 Pod。
这个过程缓慢且成本高昂，涉及调度器、节点资源分配以及网络和存储的重新初始化。&lt;/p&gt;
&lt;p&gt;在处理大规模 AI/ML 工作负载（≥ 1000 个节点，每个节点一个 Pod）时，这种低效性会更加严重。
这些同步工作负载的一个常见要求是，当发生故障（例如节点崩溃）时，
必须重新创建集群中的所有 Pod 以重置状态，然后才能恢复训练，
即使其他 Pod 并未直接受到故障的影响。
同时删除、创建和调度数千个 Pod 会造成巨大的瓶颈。
此次故障造成的损失估计每月可能高达 10 万美元（资源浪费）。&lt;/p&gt;
&lt;!--
Handling these failures for AI/ML training jobs requires a complex integration touching both the training framework and Kubernetes, which are often fragile and toilsome. This feature introduces a Kubernetes-native solution, improving system robustness and allowing application developers to concentrate on their core training logic.

Another major benefit of restarting Pods in place is that keeping Pods on their assigned Nodes allows for further optimizations. For example, one can implement node-level caching tied to a specific Pod identity, something that is impossible when Pods are unnecessarily being recreated on different Nodes.
--&gt;
&lt;p&gt;处理 AI/ML 训练任务的这些故障需要复杂的集成，涉及训练框架和 Kubernetes，
而这两者通常都很脆弱且繁琐。
此特性引入了一种 Kubernetes 原生解决方案，
提高了系统健壮性，并使应用程序开发人员能够专注于其核心训练逻辑。&lt;/p&gt;
&lt;p&gt;就地重启 Pod 的另一个主要优势在于，将 Pod 保留在其分配的节点上可以进行进一步的优化。
例如，可以实现与特定 Pod 标识绑定的节点级缓存，
而当 Pod 不必要地在不同的节点上重新创建时，这种优化方式是无法实现的。&lt;/p&gt;
&lt;!--
## Introducing the `RestartAllContainers` action

To address this, Kubernetes v1.35 adds a new action to the container restart rules: `RestartAllContainers`. When a container exits in a way that matches a rule with this action, the kubelet initiates a fast, **in-place** restart of the Pod.
--&gt;
&lt;h2 id=&#34;引入-restartallcontainers-操作&#34;&gt;引入 &lt;code&gt;RestartAllContainers&lt;/code&gt; 操作&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bc%95%e5%85%a5-restartallcontainers-%e6%93%8d%e4%bd%9c&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;为了解决这个问题，Kubernetes v1.35 在容器重启规则中添加了一个新的操作：&lt;code&gt;RestartAllContainers&lt;/code&gt;。
当容器以符合此操作规则的方式退出时，kubelet 会启动对 Pod 的快速&lt;strong&gt;就地&lt;/strong&gt;重启。&lt;/p&gt;
&lt;!--
This in-place restart is highly efficient because it preserves the Pod&#39;s most important resources:
- The Pod&#39;s UID, IP address and network namespace.
- The Pod&#39;s sandbox and any attached devices.
- All volumes, including `emptyDir` and mounted volumes from PVCs.
--&gt;
&lt;p&gt;这种就地重启非常高效，因为它保留了 Pod 最重要的资源：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pod 的 UID、IP 地址和网络命名空间。&lt;/li&gt;
&lt;li&gt;Pod 的沙箱及其所有连接的设备。&lt;/li&gt;
&lt;li&gt;所有卷，包括 &lt;code&gt;emptyDir&lt;/code&gt; 和从 PVC 挂载的卷。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
After terminating all running containers, the Pod&#39;s startup sequence is re-executed from the very beginning. This means all **init containers** are run again in order, followed by the sidecar and regular containers, ensuring a completely fresh start in a known-good environment. With the exception of ephemeral containers (which are terminated), all other containers—including those that previously succeeded or failed—will be restarted, regardless of their individual restart policies.
--&gt;
&lt;p&gt;终止所有正在运行的容器后，Pod 的启动序列将从头开始重新执行。
这意味着所有&lt;strong&gt;初始化容器&lt;/strong&gt;将按顺序再次运行，随后是边车容器和常规容器，
从而确保在已知良好的环境中完全重新启动。
除了临时容器（会被终止）之外，所有其他容器——包括之前成功或失败的容器——都将重新启动，
而不管它们各自的重启策略如何。&lt;/p&gt;
&lt;!--
## Use cases

### 1. Efficient restarts for ML/Batch jobs

For ML training jobs, [rescheduling a worker Pod on failure](/blog/2025/07/03/navigating-failures-in-pods-with-devices/#roadmap-for-failure-modes-container-code-failed) is a costly operation that wastes valuable compute resources. On a 1,000-node training cluster, rescheduling overhead can waste [over $100,000 in compute resources monthly](https://docs.google.com/document/d/16zexVooHKPc80F4dVtUjDYK9DOpkVPRNfSv0zRtfFpk/edit?tab=t.0#bookmark=id.qwqcnzf96avw).
--&gt;
&lt;h2 id=&#34;应用案例&#34;&gt;应用案例&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%ba%94%e7%94%a8%e6%a1%88%e4%be%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;h3 id=&#34;1-高效重启机器学习-批处理作业&#34;&gt;1. 高效重启机器学习/批处理作业&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#1-%e9%ab%98%e6%95%88%e9%87%8d%e5%90%af%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0-%e6%89%b9%e5%a4%84%e7%90%86%e4%bd%9c%e4%b8%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;对于机器学习训练作业，
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/07/03/navigating-failures-in-pods-with-devices/#roadmap-for-failure-modes-container-code-failed&#34;&gt;在工作节点 Pod 发生故障时重新调度&lt;/a&gt;是一项代价高昂的操作，
会浪费宝贵的计算资源。
在一个拥有 1000 个节点的训练集群中，
重新调度带来的开销每月可能会浪费&lt;a href=&#34;https://docs.google.com/document/d/16zexVooHKPc80F4dVtUjDYK9DOpkVPRNfSv0zRtfFpk/edit?tab=t.0#bookmark=id.qwqcnzf96avw&#34;&gt;超过 10 万美元的计算资源&lt;/a&gt;。&lt;/p&gt;
&lt;!--
With `RestartAllContainers` actions you can address this by enabling a much faster, hybrid recovery strategy: recreate only the &#34;bad&#34; Pods (e.g., those on unhealthy Nodes) while triggering `RestartAllContainers` for the remaining healthy Pods. Benchmarks show this reduces the recovery overhead [from minutes to a few seconds](https://docs.google.com/document/d/16zexVooHKPc80F4dVtUjDYK9DOpkVPRNfSv0zRtfFpk/edit?tab=t.0#bookmark=id.cwkee8kar0i5).

With in-place restarts, a watcher sidecar can monitor the main training process. If it encounters a specific, retriable error, the watcher can exit with a designated code to trigger a fast reset of the worker Pod, allowing it to restart from the last checkpoint without involving the Job controller. This capability is now natively supported by Kubernetes.

Read more details about future development and JobSet features at [KEP-467 JobSet in-place restart](https://github.com/kubernetes-sigs/jobset/issues/467).
--&gt;
&lt;p&gt;借助 &lt;code&gt;RestartAllContainers&lt;/code&gt; 操作，你可以启用一种速度更快、混合的恢复策略来解决这个问题：
仅重新创建“故障”Pod（例如，位于不健康节点上的 Pod），同时对其余健康的 Pod
触发 &lt;code&gt;RestartAllContainers&lt;/code&gt; 操作。基准测试表明，这可以将恢复开销从几分钟降低到几秒钟。&lt;/p&gt;
&lt;p&gt;通过就地重启，监视器边车可以监控主训练过程。如果遇到特定的可重试错误，
监视器可以退出并返回指定的代码，从而触发工作 Pod 的快速重置，
使其能够从上一个检查点重新启动，而无需 Job 控制器的参与。Kubernetes 现在原生支持此特性。&lt;/p&gt;
&lt;p&gt;有关未来开发和 JobSet 特性的更多详细信息，请参阅
&lt;a href=&#34;https://github.com/kubernetes-sigs/jobset/issues/467&#34;&gt;KEP-467 JobSet 就地重启&lt;/a&gt;。&lt;/p&gt;
&lt;!--
```yaml
apiVersion: v1
kind: Pod
metadata:
  name: ml-worker-pod
spec:
  restartPolicy: Never
  initContainers:
  # This init container will re-run on every in-place restart
  - name: setup-environment
    image: my-repo/setup-worker:1.0
  - name: watcher-sidecar
    image: my-repo/watcher:1.0
    restartPolicy: Always
    restartPolicyRules:
    - action: RestartAllContainers
      onExit:
        exitCodes:
          operator: In
          # A specific exit code from the watcher triggers a full pod restart
          values: [88]
  containers:
  - name: main-application
    image: my-repo/training-app:1.0
```
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ml-worker-pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;restartPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Never&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;initContainers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 此初始化容器将在每次就地重启时重新运行。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;setup-environment&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-repo/setup-worker:1.0&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;watcher-sidecar&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-repo/watcher:1.0&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;restartPolicy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Always&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;restartPolicyRules&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;action&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;RestartAllContainers&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;onExit&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;exitCodes&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;In&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 监视器返回特定退出代码会触发 Pod 完全重启。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;values&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#666&#34;&gt;88&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;main-application&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;my-repo/training-app:1.0&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### 2. Re-running init containers for a clean state

Imagine a scenario where an init container is responsible for fetching credentials or setting up a shared volume. If the main application fails in a way that corrupts this shared state, you need the [init container to rerun](https://github.com/kubernetes/enhancements/issues/3676).

By configuring the main application to exit with a specific code upon detecting such a corruption, you can trigger the `RestartAllContainers` action, guaranteeing that the init container provides a clean setup before the application restarts.
--&gt;
&lt;h3 id=&#34;2-重新运行初始化容器以确保干净状态&#34;&gt;2. 重新运行初始化容器以确保干净状态&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#2-%e9%87%8d%e6%96%b0%e8%bf%90%e8%a1%8c%e5%88%9d%e5%a7%8b%e5%8c%96%e5%ae%b9%e5%99%a8%e4%bb%a5%e7%a1%ae%e4%bf%9d%e5%b9%b2%e5%87%80%e7%8a%b6%e6%80%81&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;设想这样一种场景：初始化容器负责获取凭据或设置共享卷。
如果主应用程序发生故障，导致共享状态损坏，则需要重新运行初始化容器。&lt;/p&gt;
&lt;p&gt;通过配置主应用程序在检测到此类损坏时以特定代码退出，你可以触发 &lt;code&gt;RestartAllContainers&lt;/code&gt;
操作，从而确保初始化容器在应用程序重启之前提供一个干净的设置。&lt;/p&gt;
&lt;!--
### 3. Handling high rate of similar tasks execution

There are cases when tasks are best represented as a Pod execution. And each task requires a clean execution. The task may be a game session backend or some queue item processing. If the rate of tasks is high, running the whole cycle of Pod creation, scheduling and initialization is simply too expensive, especially when tasks can be short. The ability to restart all containers from scratch enables a Kubernetes-native way to handle this scenario without custom solutions or frameworks. 
--&gt;
&lt;h3 id=&#34;3-处理高频率的类似任务执行&#34;&gt;3. 处理高频率的类似任务执行&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#3-%e5%a4%84%e7%90%86%e9%ab%98%e9%a2%91%e7%8e%87%e7%9a%84%e7%b1%bb%e4%bc%bc%e4%bb%bb%e5%8a%a1%e6%89%a7%e8%a1%8c&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;有些情况下，任务最好以 Pod 执行的形式呈现。每个任务都需要干净利落地执行。例如，游戏会话后端或队列项处理。
如果任务频率很高，运行完整的 Pod 创建、调度和初始化流程会非常耗费资源，
尤其是在任务执行时间可能很短的情况下。
Kubernetes 原生支持从头开始重启所有容器，无需自定义解决方案或框架即可处理这种情况。&lt;/p&gt;
&lt;!--
## How to use it

To try this feature, you must enable the `RestartAllContainersOnContainerExits` feature gate on your Kubernetes cluster components (API server and kubelet) running Kubernetes v1.35+. This alpha feature extends the `ContainerRestartRules` feature, which graduated to beta in v1.35 and is enabled by default.

Once enabled, you can add `restartPolicyRules` to any container (init, sidecar, or regular) and use the `RestartAllContainers` action.
--&gt;
&lt;h2 id=&#34;使用方法&#34;&gt;使用方法&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;要试用此特性，你必须在运行 Kubernetes v1.35 或更高版本的 Kubernetes
集群组件（API 服务器和 kubelet）上启用 &lt;code&gt;RestartAllContainersOnContainerExits&lt;/code&gt; 特性门控。
此 Alpha 特性扩展了 &lt;code&gt;ContainerRestartRules&lt;/code&gt; 特性，后者已在 v1.35 版本中升级为 beta 版，并默认启用。&lt;/p&gt;
&lt;p&gt;启用后，你可以将 &lt;code&gt;restartPolicyRules&lt;/code&gt; 添加到任何容器（Init、边车或常规容器），
并使用 &lt;code&gt;RestartAllContainers&lt;/code&gt; 操作。&lt;/p&gt;
&lt;!--
The feature is designed to be easily usable on existing apps. However, if an application does not follow some best practices, it may cause issues for the application or for observability tooling. When enabling the feature, make sure that all containers are reentrant and that external tooling is prepared for init containers to re-run. Also, when restarting all containers, the kubelet does not run `preStop` hooks. This means containers must be designed to handle abrupt termination without relying on `preStop` hooks for graceful shutdown. 
--&gt;
&lt;p&gt;该特性旨在方便现有应用程序使用。但是，如果应用程序不遵循某些最佳实践，
则可能会导致应用程序本身或可观测性工具出现问题。
启用此特性时，请确保所有容器都是可重入的，并且外部工具已准备好用于重新启动初始化容器。
此外，重启所有容器时，kubelet 不会运行 &lt;code&gt;preStop&lt;/code&gt; 钩子。
这意味着容器必须设计为能够处理突然终止的情况，而无需依赖 &lt;code&gt;preStop&lt;/code&gt; 钩子来实现优雅关闭。&lt;/p&gt;
&lt;!--
## Observing the restart

To make this process observable, a new Pod condition, `AllContainersRestarting`, is added to the Pod&#39;s status. When a restart is triggered, this condition becomes `True` and it reverts to `False` once all containers have terminated and the Pod is ready to start its lifecycle anew. This provides a clear signal to users and other cluster components about the Pod&#39;s state.

All containers restarted by this action will have their restart count incremented in the container status.
--&gt;
&lt;h2 id=&#34;观察重启&#34;&gt;观察重启&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%a7%82%e5%af%9f%e9%87%8d%e5%90%af&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;为了使重启过程可观察，Pod 的状态中添加了一个新的条件 &lt;code&gt;AllContainersRestarting&lt;/code&gt;。
当触发重启时，此条件变为 &lt;code&gt;True&lt;/code&gt;；当所有容器终止且 Pod 准备好重新开始其生命周期时，
此条件变为 &lt;code&gt;False&lt;/code&gt;。这为用户和其他集群组件提供了关于 Pod 状态的清晰信号。&lt;/p&gt;
&lt;p&gt;所有通过此操作重启的容器，其容器状态中的重启计数都会递增。&lt;/p&gt;
&lt;!--
## Learn more

- Read the official documentation on [Pod Lifecycle](/docs/concepts/workloads/pods/pod-lifecycle/#restart-all-containers).
- Read the detailed proposal in the [KEP-5532: Restart All Containers on Container Exits](https://kep.k8s.io/5532).
- Read the proposal for JobSet in-place restart in [JobSet issue #467](https://github.com/kubernetes-sigs/jobset/issues/467).
--&gt;
&lt;h2 id=&#34;了解更多&#34;&gt;了解更多&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%ba%86%e8%a7%a3%e6%9b%b4%e5%a4%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;阅读 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#restart-all-containers&#34;&gt;Pod 生命周期&lt;/a&gt;的官方文档。&lt;/li&gt;
&lt;li&gt;阅读 &lt;a href=&#34;https://kep.k8s.io/5532&#34;&gt;KEP-5532：容器退出时重启所有容器&lt;/a&gt;中的详细提案。&lt;/li&gt;
&lt;li&gt;阅读 &lt;a href=&#34;https://github.com/kubernetes-sigs/jobset/issues/467&#34;&gt;JobSet issue #467&lt;/a&gt;
中关于 JobSet 就地重启的提案。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## We want your feedback!

As an alpha feature, `RestartAllContainers` is ready for you to experiment with and any use cases and feedback are welcome. This feature is driven by the [SIG Node](https://github.com/kubernetes/community/blob/master/sig-node/README.md) community. If you are interested in getting involved, sharing your thoughts, or contributing, please join us!
--&gt;
&lt;h2 id=&#34;我们期待你的反馈&#34;&gt;我们期待你的反馈！&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%88%91%e4%bb%ac%e6%9c%9f%e5%be%85%e4%bd%a0%e7%9a%84%e5%8f%8d%e9%a6%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;作为一项 Alpha 特性，&lt;code&gt;RestartAllContainers&lt;/code&gt; 现已开放试用，
欢迎你提出任何使用案例和反馈意见。
此特性由 &lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-node/README.md&#34;&gt;SIG Node&lt;/a&gt; 社区驱动。
如果你有兴趣参与、分享想法或做出贡献，请加入我们！&lt;/p&gt;
&lt;!--
You can reach SIG Node through:
- Slack: [#sig-node](https://kubernetes.slack.com/messages/sig-node)
- [Mailing list](https://groups.google.com/forum/#!forum/kubernetes-sig-node)
--&gt;
&lt;p&gt;你可以通过以下方式联系 SIG Node：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Slack：&lt;a href=&#34;https://kubernetes.slack.com/messages/sig-node&#34;&gt;#sig-node&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://groups.google.com/forum/#!forum/kubernetes-sig-node&#34;&gt;邮件列表&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35：扩展容忍度运算符以支持数值比较（Alpha）</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/05/kubernetes-v1-35-numeric-toleration-operators/</link>
      <pubDate>Mon, 05 Jan 2026 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2026/01/05/kubernetes-v1-35-numeric-toleration-operators/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.35: Extended Toleration Operators to Support Numeric Comparisons (Alpha)&#34;
date: 2026-01-05T10:30:00-08:00
slug: kubernetes-v1-35-numeric-toleration-operators
author: &gt;
  Heba Elayoty (Microsoft)
--&gt;
&lt;!--
Many production Kubernetes clusters blend on-demand (higher-SLA) and spot/preemptible (lower-SLA) nodes to optimize costs while maintaining reliability for critical workloads. Platform teams need a safe default that keeps most workloads away from risky capacity, while allowing specific workloads to opt-in with explicit thresholds like &#34;I can tolerate nodes with failure probability up to 5%&#34;.
--&gt;
&lt;p&gt;许多生产级 Kubernetes 集群会混合使用按需（on-demand，高 SLA）节点与 spot/可抢占（preemptible，低 SLA）节点，
以在保证关键工作负载可靠性的同时优化成本。平台团队需要一个“安全默认值”，让大多数工作负载远离风险容量，
同时又允许特定工作负载用明确阈值显式选择接受（opt-in），例如“我可以容忍失败概率最高 5% 的节点”。&lt;/p&gt;
&lt;!--
Today, Kubernetes taints and tolerations can match exact values or check for existence, but they can&#39;t compare numeric thresholds. You&#39;d need to create discrete taint categories, use external admission controllers, or accept less-than-optimal placement decisions.
--&gt;
&lt;p&gt;目前，Kubernetes 的污点与容忍度（taints and tolerations）可以匹配精确值或检查键是否存在，
但&lt;strong&gt;无法进行数值阈值比较&lt;/strong&gt;。你不得不创建离散的污点类别、使用外部准入控制器，或接受不够理想的放置决策。&lt;/p&gt;
&lt;!--
In Kubernetes v1.35, we&#39;re introducing **Extended Toleration Operators** as an alpha feature. This enhancement adds `Gt` (Greater Than) and `Lt` (Less Than) operators to `spec.tolerations`, enabling threshold-based scheduling decisions that unlock new possibilities for SLA-based placement, cost optimization, and performance-aware workload distribution.
--&gt;
&lt;p&gt;在 Kubernetes v1.35 中，我们以 Alpha 形式引入 &lt;strong&gt;扩展容忍度运算符（Extended Toleration Operators）&lt;/strong&gt;。
该增强为 &lt;code&gt;spec.tolerations&lt;/code&gt; 增加 &lt;code&gt;Gt&lt;/code&gt;（Greater Than）与 &lt;code&gt;Lt&lt;/code&gt;（Less Than）运算符，
使调度器能够进行基于阈值的调度决策，从而为基于 SLA 的放置、成本优化以及面向性能的工作负载分发打开新可能。&lt;/p&gt;
&lt;!--
## The evolution of tolerations
--&gt;
&lt;h2 id=&#34;容忍度的演进&#34;&gt;容忍度的演进&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%ae%b9%e5%bf%8d%e5%ba%a6%e7%9a%84%e6%bc%94%e8%bf%9b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Historically, Kubernetes supported two primary toleration operators:
--&gt;
&lt;p&gt;从历史上看，Kubernetes 主要支持两种容忍度运算符：&lt;/p&gt;
&lt;!--
- **`Equal`**: The toleration matches a taint if the key and value are exactly equal
- **`Exists`**: The toleration matches a taint if the key exists, regardless of value
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Equal&lt;/code&gt;&lt;/strong&gt;：当 key 与 value 完全相等时，容忍度匹配该污点&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Exists&lt;/code&gt;&lt;/strong&gt;：只要 key 存在（无论 value 是什么），容忍度就匹配该污点&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
While these worked well for categorical scenarios, they fell short for numeric comparisons. Starting with v1.35, we are closing this gap.
--&gt;
&lt;p&gt;这两者对“类别型”场景很好用，但在数值比较方面就显得力不从心。从 v1.35 开始，我们在补齐这一缺口。&lt;/p&gt;
&lt;!--
Consider these real-world scenarios:
--&gt;
&lt;p&gt;请看一些真实世界的场景：&lt;/p&gt;
&lt;!--
- **SLA requirements**: Schedule high-availability workloads only on nodes with failure probability below a certain threshold
- **Cost optimization**: Allow cost-sensitive batch jobs to run on cheaper nodes that exceed a specific cost-per-hour value
- **Performance guarantees**: Ensure latency-sensitive applications run only on nodes with disk IOPS or network bandwidth above minimum thresholds
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SLA 要求&lt;/strong&gt;：只把高可用工作负载调度到失败概率低于某个阈值的节点上&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;成本优化&lt;/strong&gt;：允许对成本敏感的批处理作业运行在更便宜、且“每小时成本”超过某个特定值的节点上&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;性能保障&lt;/strong&gt;：确保对延迟敏感的应用只运行在磁盘 IOPS 或网络带宽高于最低阈值的节点上&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Without numeric comparison operators, cluster operators have had to resort to workarounds like creating multiple discrete taint values or using external admission controllers, neither of which scale well or provide the flexibility needed for dynamic threshold-based scheduling.
--&gt;
&lt;p&gt;在缺少数值比较运算符的情况下，集群运维人员不得不采用一些变通方案，例如创建多个离散的污点值，
或使用外部准入控制器。但这些方案既难以规模化，也无法提供“动态阈值调度”所需的灵活性。&lt;/p&gt;
&lt;!--
## Why extend tolerations instead of using NodeAffinity?
--&gt;
&lt;h2 id=&#34;为什么要扩展容忍度-而不是用节点亲和性-nodeaffinity&#34;&gt;为什么要扩展容忍度，而不是用节点亲和性（NodeAffinity）？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%ba%e4%bb%80%e4%b9%88%e8%a6%81%e6%89%a9%e5%b1%95%e5%ae%b9%e5%bf%8d%e5%ba%a6-%e8%80%8c%e4%b8%8d%e6%98%af%e7%94%a8%e8%8a%82%e7%82%b9%e4%ba%b2%e5%92%8c%e6%80%a7-nodeaffinity&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
You might wonder: NodeAffinity already supports numeric comparison operators, so why extend tolerations? While NodeAffinity is powerful for expressing pod preferences, taints and tolerations provide critical operational benefits:
--&gt;
&lt;p&gt;你可能会问：NodeAffinity 已经支持数值比较运算符，为什么还要扩展容忍度？
NodeAffinity 虽然很适合表达 Pod 的偏好，但污点与容忍度提供了一些关键的运维收益：&lt;/p&gt;
&lt;!--
- **Policy orientation**: NodeAffinity is per-pod, requiring every workload to explicitly opt-out of risky nodes. Taints invert control—nodes declare their risk level, and only pods with matching tolerations may land there. This provides a safer default; most pods stay away from spot/preemptible nodes unless they explicitly opt-in.
- **Eviction semantics**: NodeAffinity has no eviction capability. Taints support the `NoExecute` effect with `tolerationSeconds`, enabling operators to drain and evict pods when a node&#39;s SLA degrades or spot instances receive termination notices.
- **Operational ergonomics**: Centralized, node-side policy is consistent with other safety taints like disk-pressure and memory-pressure, making cluster management more intuitive.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;策略导向&lt;/strong&gt;：NodeAffinity 是按 Pod 配置的，需要每个工作负载显式选择“避开”风险节点。
污点则把控制反转：由节点声明风险等级，只有带有匹配容忍度的 Pod 才能落到这些节点上。
这提供了更安全的默认值：大多数 Pod 会默认避开 spot/可抢占节点，除非它们显式选择接受。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;驱逐语义&lt;/strong&gt;：NodeAffinity 不具备驱逐能力。污点支持 &lt;code&gt;NoExecute&lt;/code&gt; 效果以及 &lt;code&gt;tolerationSeconds&lt;/code&gt;，
使运维人员可以在节点 SLA 降级或 spot 实例收到终止通知时，排空（drain）并驱逐 Pod。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;运维易用性&lt;/strong&gt;：集中式、节点侧的策略与磁盘压力、内存压力等其他安全污点一致，让集群管理更直观。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
This enhancement preserves the well-understood safety model of taints and tolerations while enabling threshold-based placement for SLA-aware scheduling.
--&gt;
&lt;p&gt;该增强在保留污点与容忍度这一成熟安全模型的基础上，为 SLA 感知调度提供了基于阈值的放置能力。&lt;/p&gt;
&lt;!--
## Introducing Gt and Lt operators
--&gt;
&lt;h2 id=&#34;引入-gt-与-lt-运算符&#34;&gt;引入 Gt 与 Lt 运算符&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bc%95%e5%85%a5-gt-%e4%b8%8e-lt-%e8%bf%90%e7%ae%97%e7%ac%a6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes v1.35 introduces two new operators for tolerations:
--&gt;
&lt;p&gt;Kubernetes v1.35 为容忍度引入两个新运算符：&lt;/p&gt;
&lt;!--
- **`Gt` (Greater Than)**: The toleration matches if the taint&#39;s numeric value is less than the toleration&#39;s value
- **`Lt` (Less Than)**: The toleration matches if the taint&#39;s numeric value is greater than the toleration&#39;s value
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Gt&lt;/code&gt;（Greater Than）&lt;/strong&gt;：当污点的数值 &lt;strong&gt;小于&lt;/strong&gt; 容忍度的数值时，容忍度匹配&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Lt&lt;/code&gt;（Less Than）&lt;/strong&gt;：当污点的数值 &lt;strong&gt;大于&lt;/strong&gt; 容忍度的数值时，容忍度匹配&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
When a pod tolerates a taint with `Lt`, it&#39;s saying &#34;I can tolerate nodes where this metric is *less than* my threshold&#34;. Since tolerations allow scheduling, the pod can run on nodes where the taint value is greater than the toleration value. Think of it as: &#34;I tolerate nodes that are above my minimum requirements&#34;.
--&gt;
&lt;p&gt;当一个 Pod 使用 &lt;code&gt;Lt&lt;/code&gt; 来容忍某个污点时，它表达的是：“我可以容忍该指标&lt;strong&gt;小于&lt;/strong&gt;我的阈值的节点”。
由于“容忍度”本质上允许调度，因此该 Pod 也可以运行在污点值 &lt;strong&gt;大于&lt;/strong&gt; 容忍度值的节点上。
你可以把它理解为：“我容忍满足我最低要求之上的节点”。&lt;/p&gt;
&lt;!--
These operators work with numeric taint values and enable the scheduler to make sophisticated placement decisions based on continuous metrics rather than discrete categories.
--&gt;
&lt;p&gt;这些运算符适用于数值型污点值，使调度器能基于连续指标（continuous metrics）而不是离散类别做出更精细的放置决策。&lt;/p&gt;

&lt;div class=&#34;alert alert-info&#34; role=&#34;note&#34;&gt;&lt;h4 class=&#34;alert-heading&#34;&gt;说明：&lt;/h4&gt;&lt;!--
Numeric values for `Gt` and `Lt` operators must be positive 64-bit integers without leading zeros. For example, `&#34;100&#34;` is valid, but `&#34;0100&#34;` (with leading zero) and `&#34;0&#34;` (zero value) are not permitted.

The `Gt` and `Lt` operators work with all taint effects: `NoSchedule`, `NoExecute`, and `PreferNoSchedule`.
--&gt;
&lt;p&gt;&lt;code&gt;Gt&lt;/code&gt; 与 &lt;code&gt;Lt&lt;/code&gt; 运算符的数值必须是&lt;strong&gt;正的 64 位整数&lt;/strong&gt;，且&lt;strong&gt;不能有前导零&lt;/strong&gt;。
例如，&lt;code&gt;&amp;quot;100&amp;quot;&lt;/code&gt; 是合法的，但 &lt;code&gt;&amp;quot;0100&amp;quot;&lt;/code&gt;（带前导零）与 &lt;code&gt;&amp;quot;0&amp;quot;&lt;/code&gt;（零值）不被允许。&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Gt&lt;/code&gt; 与 &lt;code&gt;Lt&lt;/code&gt; 运算符适用于所有污点效果（effect）：&lt;code&gt;NoSchedule&lt;/code&gt;、&lt;code&gt;NoExecute&lt;/code&gt;、&lt;code&gt;PreferNoSchedule&lt;/code&gt;。&lt;/p&gt;
&lt;/div&gt;

&lt;!--
## Use cases and examples
--&gt;
&lt;h2 id=&#34;使用场景与示例&#34;&gt;使用场景与示例&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bd%bf%e7%94%a8%e5%9c%ba%e6%99%af%e4%b8%8e%e7%a4%ba%e4%be%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Let&#39;s explore how Extended Toleration Operators solve real-world scheduling challenges.
--&gt;
&lt;p&gt;下面我们通过几个例子看看扩展容忍度运算符如何解决真实调度挑战。&lt;/p&gt;
&lt;!--
### Example 1: Spot instance protection with SLA thresholds
--&gt;
&lt;h3 id=&#34;示例-1-用-sla-阈值限制-spot-实例的使用&#34;&gt;示例 1：用 SLA 阈值限制 spot 实例的使用&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%a4%ba%e4%be%8b-1-%e7%94%a8-sla-%e9%98%88%e5%80%bc%e9%99%90%e5%88%b6-spot-%e5%ae%9e%e4%be%8b%e7%9a%84%e4%bd%bf%e7%94%a8&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Many clusters mix on-demand and spot/preemptible nodes to optimize costs. Spot nodes offer significant savings but have higher failure rates. You want most workloads to avoid spot nodes by default, while allowing specific workloads to opt-in with clear SLA boundaries.
--&gt;
&lt;p&gt;许多集群会混合按需与 spot/可抢占节点以优化成本。Spot 节点能显著节省费用，但失败率更高。
你希望大多数工作负载默认避开 spot 节点，同时允许某些工作负载在清晰的 SLA 边界内显式选择接受。&lt;/p&gt;
&lt;!--
First, taint spot nodes with their failure probability (for example, 15% annual failure rate):
--&gt;
&lt;p&gt;首先，用“失败概率”给 spot 节点打上污点（例如：年化失败率 15%）：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Node&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;spot-node-1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;taints&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;failure-probability&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;15&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoExecute&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
On-demand nodes have much lower failure rates:
--&gt;
&lt;p&gt;按需节点的失败率要低得多：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Node&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ondemand-node-1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;taints&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;failure-probability&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;2&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoExecute&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Critical workloads can specify strict SLA requirements:
--&gt;
&lt;p&gt;关键工作负载可以指定严格的 SLA 要求：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;payment-processor&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tolerations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;failure-probability&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Lt&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;5&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoExecute&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tolerationSeconds&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;30&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;app&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;payment-app:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This pod will **only** schedule on nodes with `failure-probability` less than 5 (meaning `ondemand-node-1` with 2% but not `spot-node-1` with 15%). The `NoExecute` effect with `tolerationSeconds: 30` means if a node&#39;s SLA degrades (for example, cloud provider changes the taint value), the pod gets 30 seconds to gracefully terminate before forced eviction.
--&gt;
&lt;p&gt;这个 Pod 将&lt;strong&gt;只会&lt;/strong&gt;被调度到 &lt;code&gt;failure-probability&lt;/code&gt; 小于 5 的节点上（也就是 2% 的 &lt;code&gt;ondemand-node-1&lt;/code&gt;，
而不是 15% 的 &lt;code&gt;spot-node-1&lt;/code&gt;）。带有 &lt;code&gt;tolerationSeconds: 30&lt;/code&gt; 的 &lt;code&gt;NoExecute&lt;/code&gt; 效果意味着：
如果节点 SLA 降级（例如云厂商改变了污点值），该 Pod 会获得 30 秒的时间用于优雅终止，然后才会被强制驱逐。&lt;/p&gt;
&lt;!--
Meanwhile, a fault-tolerant batch job can explicitly opt-in to spot instances:
--&gt;
&lt;p&gt;与此同时，一个具备容错能力的批处理作业可以显式选择接受 spot 实例：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;batch-job&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tolerations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;failure-probability&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Lt&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;20&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoExecute&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;worker&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;batch-worker:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This batch job tolerates nodes with failure probability up to 20%, so it can run on both on-demand and spot nodes, maximizing cost savings while accepting higher risk.
--&gt;
&lt;p&gt;该批处理作业可容忍失败概率最高 20% 的节点，因此既能运行在按需节点上，也能运行在 spot 节点上，
在接受更高风险的同时最大化节省成本。&lt;/p&gt;
&lt;!--
### Example 2: AI workload placement with GPU tiers
--&gt;
&lt;h3 id=&#34;示例-2-基于-gpu-分层的-ai-工作负载放置&#34;&gt;示例 2：基于 GPU 分层的 AI 工作负载放置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%a4%ba%e4%be%8b-2-%e5%9f%ba%e4%ba%8e-gpu-%e5%88%86%e5%b1%82%e7%9a%84-ai-%e5%b7%a5%e4%bd%9c%e8%b4%9f%e8%bd%bd%e6%94%be%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
AI and machine learning workloads often have specific hardware requirements. With Extended Toleration Operators, you can create GPU node tiers and ensure workloads land on appropriately powered hardware.
--&gt;
&lt;p&gt;AI 与机器学习工作负载通常对硬件有明确要求。通过扩展容忍度运算符，你可以建立 GPU 节点分层，
并确保工作负载落到性能匹配的硬件上。&lt;/p&gt;
&lt;!--
Taint GPU nodes with their compute capability score:
--&gt;
&lt;p&gt;用“算力评分”给 GPU 节点打上污点：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Node&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gpu-node-a100&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;taints&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;gpu-compute-score&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;1000&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#00f;font-weight:bold&#34;&gt;---&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Node&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gpu-node-t4&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;taints&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;gpu-compute-score&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;500&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
A heavy training workload can require high-performance GPUs:
--&gt;
&lt;p&gt;重训练（heavy training）工作负载可以要求更高性能的 GPU：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;model-training&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tolerations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;gpu-compute-score&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Gt&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;800&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;trainer&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ml-trainer:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;limits&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nvidia.com/gpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This ensures the training pod only schedules on nodes with compute scores greater than 800 (like the A100 node), preventing placement on lower-tier GPUs that would slow down training.
--&gt;
&lt;p&gt;这将确保训练 Pod 只会被调度到算力评分大于 800 的节点上（如 A100 节点），避免落到低档 GPU 上而拖慢训练。&lt;/p&gt;
&lt;!--
Meanwhile, inference workloads with less demanding requirements can use any available GPU:
--&gt;
&lt;p&gt;而对性能要求没那么高的推理工作负载则可以使用任何可用 GPU：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;model-inference&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tolerations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;gpu-compute-score&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Gt&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;400&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;inference&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;ml-inference:v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;limits&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nvidia.com/gpu&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
### Example 3: Cost-optimized workload placement
--&gt;
&lt;h3 id=&#34;示例-3-面向成本优化的工作负载放置&#34;&gt;示例 3：面向成本优化的工作负载放置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%a4%ba%e4%be%8b-3-%e9%9d%a2%e5%90%91%e6%88%90%e6%9c%ac%e4%bc%98%e5%8c%96%e7%9a%84%e5%b7%a5%e4%bd%9c%e8%b4%9f%e8%bd%bd%e6%94%be%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
For batch processing or non-critical workloads, you might want to minimize costs by running on cheaper nodes, even if they have lower performance characteristics.
--&gt;
&lt;p&gt;对于批处理或非关键工作负载，你可能希望即使牺牲一些性能特征，也通过运行在更便宜的节点上来尽量降低成本。&lt;/p&gt;
&lt;!--
Nodes can be tainted with their cost rating:
--&gt;
&lt;p&gt;节点可以用成本评级来打污点：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;taints&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;cost-per-hour&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;50&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
A cost-sensitive batch job can express its tolerance for expensive nodes:
--&gt;
&lt;p&gt;对成本敏感的批处理作业可以表达它对昂贵节点的容忍度：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tolerations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;cost-per-hour&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Lt&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;100&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This batch job will schedule on nodes costing less than $100/hour but avoid more expensive nodes. Combined with Kubernetes scheduling priorities, this enables sophisticated cost-tiering strategies where critical workloads get premium nodes while batch workloads efficiently use budget-friendly resources.
--&gt;
&lt;p&gt;该批处理作业会被调度到成本低于 100 美元/小时的节点上，并避开更昂贵的节点。
结合 Kubernetes 的调度优先级能力，你可以实现更精细的成本分层策略：关键工作负载使用高配节点，
而批处理作业高效利用更经济的资源。&lt;/p&gt;
&lt;!--
### Example 4: Performance-based placement
--&gt;
&lt;h3 id=&#34;示例-4-基于性能的放置&#34;&gt;示例 4：基于性能的放置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%a4%ba%e4%be%8b-4-%e5%9f%ba%e4%ba%8e%e6%80%a7%e8%83%bd%e7%9a%84%e6%94%be%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Storage-intensive applications often require minimum disk performance guarantees. With Extended Toleration Operators, you can enforce these requirements at the scheduling level.
--&gt;
&lt;p&gt;存储密集型应用通常需要最低磁盘性能保障。通过扩展容忍度运算符，你可以在调度层面强制执行这些要求。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tolerations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;disk-iops&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Gt&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;3000&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This toleration ensures the pod only schedules on nodes where `disk-iops` exceeds 3000. The `Gt` operator means &#34;I need nodes that are greater than this minimum&#34;.
--&gt;
&lt;p&gt;该容忍度确保 Pod 只会被调度到 &lt;code&gt;disk-iops&lt;/code&gt; 超过 3000 的节点上。
&lt;code&gt;Gt&lt;/code&gt; 运算符表达的是：“我需要指标高于这个最低值的节点”。&lt;/p&gt;
&lt;!--
## How to use this feature
--&gt;
&lt;h2 id=&#34;如何使用该特性&#34;&gt;如何使用该特性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8%e8%af%a5%e7%89%b9%e6%80%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Extended Toleration Operators is an **alpha feature** in Kubernetes v1.35. To try it out:
--&gt;
&lt;p&gt;扩展容忍度运算符是 Kubernetes v1.35 中的 &lt;strong&gt;Alpha 特性&lt;/strong&gt;。要试用它：&lt;/p&gt;
&lt;!--
1. **Enable the feature gate** on both your API server and scheduler:
--&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;在 API server 与 scheduler 上启用特性门控&lt;/strong&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;--feature-gates&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#b8860b&#34;&gt;TaintTolerationComparisonOperators&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a2f&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. **Taint your nodes** with numeric values representing the metrics relevant to your scheduling needs:
--&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;用数值型污点给节点打标&lt;/strong&gt;，其值代表你调度所关心的指标：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl taint nodes node-1 failure-probability&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;5:NoSchedule
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl taint nodes node-2 disk-iops&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;5000:NoSchedule
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
1. **Use the new operators** in your pod specifications:
--&gt;
&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;在 Pod 规约中使用新运算符&lt;/strong&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tolerations&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;failure-probability&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;operator&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Lt&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;value&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;effect&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;NoSchedule&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&#34;alert alert-info&#34; role=&#34;note&#34;&gt;&lt;h4 class=&#34;alert-heading&#34;&gt;说明：&lt;/h4&gt;&lt;!--
As an alpha feature, Extended Toleration Operators may change in future releases and should be used with caution in production environments. Always test thoroughly in non-production clusters first.
--&gt;
&lt;p&gt;作为 Alpha 特性，扩展容忍度运算符可能会在未来版本中发生变化，应谨慎用于生产环境。
请务必先在非生产集群中充分测试。&lt;/p&gt;&lt;/div&gt;

&lt;!--
## What&#39;s next?
--&gt;
&lt;h2 id=&#34;下一步计划是什么&#34;&gt;下一步计划是什么？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%b8%8b%e4%b8%80%e6%ad%a5%e8%ae%a1%e5%88%92%e6%98%af%e4%bb%80%e4%b9%88&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This alpha release is just the beginning. As we gather feedback from the community, we plan to:
--&gt;
&lt;p&gt;这次 Alpha 发布只是开始。随着我们收集社区反馈，我们计划：&lt;/p&gt;
&lt;!--
- Add support for [CEL (Common Expression Language) expressions](https://github.com/kubernetes/enhancements/issues/5500) in tolerations and node affinity for even more flexible scheduling logic, including semantic versioning comparisons
- Improve integration with cluster autoscaling for threshold-aware capacity planning
- Graduate the feature to beta and eventually GA with production-ready stability
--&gt;
&lt;ul&gt;
&lt;li&gt;在容忍度与节点亲和性（node affinity）中增加对 &lt;a href=&#34;https://github.com/kubernetes/enhancements/issues/5500&#34;&gt;CEL（Common Expression Language）表达式&lt;/a&gt;
的支持，以提供更灵活的调度逻辑（包括语义化版本比较）&lt;/li&gt;
&lt;li&gt;改进与集群自动扩缩容（cluster autoscaling）的集成，以支持“阈值感知”的容量规划&lt;/li&gt;
&lt;li&gt;将该特性升级为 Beta，并最终达到具备生产级稳定性的 GA&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
We&#39;re particularly interested in hearing about your use cases! Do you have scenarios where threshold-based scheduling would solve problems? Are there additional operators or capabilities you&#39;d like to see?
--&gt;
&lt;p&gt;我们尤其希望听到你的使用场景！你是否有一些问题可以通过“基于阈值的调度”来解决？
你还希望看到哪些额外运算符或能力？&lt;/p&gt;
&lt;!--
## Getting involved
--&gt;
&lt;h2 id=&#34;参与其中&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e5%85%b6%e4%b8%ad&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This feature is driven by the [SIG Scheduling](https://github.com/kubernetes/community/tree/master/sig-scheduling) community. Please join us to connect with the community and share your ideas and feedback around this feature and beyond.
--&gt;
&lt;p&gt;该特性由 &lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-scheduling&#34;&gt;SIG Scheduling&lt;/a&gt; 社区推动。
欢迎加入我们，与社区交流并分享你对该特性及其他相关议题的想法与反馈。&lt;/p&gt;
&lt;!--
You can reach the maintainers of this feature at:
--&gt;
&lt;p&gt;你可以通过以下方式联系该特性的维护者：&lt;/p&gt;
&lt;!--
- Slack: [#sig-scheduling](https://kubernetes.slack.com/messages/sig-scheduling) on Kubernetes Slack
- Mailing list: [kubernetes-sig-scheduling@googlegroups.com](https://groups.google.com/g/kubernetes-sig-scheduling)
--&gt;
&lt;ul&gt;
&lt;li&gt;Slack：Kubernetes Slack 上的 &lt;a href=&#34;https://kubernetes.slack.com/messages/sig-scheduling&#34;&gt;#sig-scheduling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;邮件列表：&lt;a href=&#34;https://groups.google.com/g/kubernetes-sig-scheduling&#34;&gt;kubernetes-sig-scheduling@googlegroups.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
For questions or specific inquiries related to Extended Toleration Operators, please reach out to the SIG Scheduling community. We look forward to hearing from you!
--&gt;
&lt;p&gt;如果你对扩展容忍度运算符有疑问或具体咨询，请联系 SIG Scheduling 社区。我们期待你的反馈！&lt;/p&gt;
&lt;!--
## How can I learn more?
--&gt;
&lt;h2 id=&#34;如何了解更多&#34;&gt;如何了解更多？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e4%ba%86%e8%a7%a3%e6%9b%b4%e5%a4%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
- [Taints and Tolerations](/docs/concepts/scheduling-eviction/taint-and-toleration/) for understanding the fundamentals
- [Numeric comparison operators](/docs/concepts/scheduling-eviction/taint-and-toleration/#numeric-comparison-operators) for details on using `Gt` and `Lt` operators
- [KEP-5471: Extended Toleration Operators for Threshold-Based Placement](https://kep.k8s.io/5471)
--&gt;
&lt;ul&gt;
&lt;li&gt;阅读基础概念：&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/&#34;&gt;污点与容忍度（Taints and Tolerations）&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;了解 &lt;code&gt;Gt&lt;/code&gt; / &lt;code&gt;Lt&lt;/code&gt; 用法细节：&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/#numeric-comparison-operators&#34;&gt;数值比较运算符（Numeric comparison operators）&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;阅读提案：&lt;a href=&#34;https://kep.k8s.io/5471&#34;&gt;KEP-5471：用于基于阈值放置的扩展容忍度运算符&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes 1.35：版本化 z-pages API 带来更强大的调试能力</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/31/kubernetes-v1-35-structured-zpages/</link>
      <pubDate>Wed, 31 Dec 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/31/kubernetes-v1-35-structured-zpages/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes 1.35: Enhanced Debugging with Versioned z-pages APIs&#34;
date: 2025-12-31T10:30:00-08:00
slug: kubernetes-v1-35-structured-zpages
author: &gt;
  [Richa Banker](https://github.com/richabanker),
  [Han Kang](https://github.com/cncf/memorials/blob/main/han-kang.md)
--&gt;
&lt;!--
Debugging Kubernetes control plane components can be challenging, especially when you need to quickly understand the runtime state of a component or verify its configuration. With Kubernetes 1.35, we&#39;re enhancing the z-pages debugging endpoints with structured, machine-parseable responses that make it easier to build tooling and automate troubleshooting workflows.
--&gt;
&lt;p&gt;调试 Kubernetes 控制平面组件可能很具挑战性，
尤其是在需要快速理解组件运行时状态或验证配置时。
在 Kubernetes 1.35 中，我们为 z-pages 调试端点带来结构化、可被机器解析的响应，
让构建工具和自动化排障流程变得更加轻松。&lt;/p&gt;
&lt;!--
## What are z-pages?
--&gt;
&lt;h2 id=&#34;what-are-z-pages&#34;&gt;什么是 z-pages？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#what-are-z-pages&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
z-pages are special debugging endpoints exposed by Kubernetes control plane components. Introduced as an alpha feature in Kubernetes 1.32, these endpoints provide runtime diagnostics for components like `kube-apiserver`, `kube-controller-manager`, `kube-scheduler`, `kubelet` and `kube-proxy`. The name &#34;z-pages&#34; comes from the convention of using `/*z` paths for debugging endpoints.
--&gt;
&lt;p&gt;z-pages 是 Kubernetes 控制平面组件所公开的特殊调试端点。
它们在 Kubernetes 1.32 中以 Alpha 特性引入，为 &lt;code&gt;kube-apiserver&lt;/code&gt;、&lt;code&gt;kube-controller-manager&lt;/code&gt;、
&lt;code&gt;kube-scheduler&lt;/code&gt;、&lt;code&gt;kubelet&lt;/code&gt; 与 &lt;code&gt;kube-proxy&lt;/code&gt; 等组件提供运行时诊断。
&amp;quot;z-pages&amp;quot; 这一名称源自使用 &lt;code&gt;/*z&lt;/code&gt; 路径来公开调试端点的惯例。&lt;/p&gt;
&lt;!--
Currently, Kubernetes supports two primary z-page endpoints:

`/statusz`
: Displays high-level component information including version information, start time, uptime, and available debug paths

`/flagz`
: Shows all command-line arguments and their values used to start the component (with confidential values redacted for security)
--&gt;
&lt;p&gt;目前，Kubernetes 支持两个主要的 z-page 端点：&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;/statusz&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;显示组件的高级信息，包括版本、启动时间、运行时长以及可用调试路径&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;/flagz&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;展示用于启动组件的全部命令行参数及其取值（敏感值会出于安全考虑被屏蔽）&lt;/dd&gt;
&lt;/dl&gt;
&lt;!--
These endpoints are valuable for human operators who need to quickly inspect component state, but until now, they only returned plain text output that was difficult to parse programmatically.
--&gt;
&lt;p&gt;这些端点对于需要快速检查组件状态的人工运维人员非常有价值，
但在此之前它们只返回难以通过程序解析的纯文本输出。&lt;/p&gt;
&lt;!--
## What&#39;s new in Kubernetes 1.35?
--&gt;
&lt;h2 id=&#34;whats-new-in-kubernetes-1-35&#34;&gt;Kubernetes 1.35 有哪些新内容？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#whats-new-in-kubernetes-1-35&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes 1.35 introduces structured, versioned responses for both `/statusz` and `/flagz` endpoints. This enhancement maintains backward compatibility with the existing plain text format while adding support for machine-readable JSON responses.
--&gt;
&lt;p&gt;Kubernetes 1.35 为 &lt;code&gt;/statusz&lt;/code&gt; 与 &lt;code&gt;/flagz&lt;/code&gt; 两个端点都引入了结构化、具备版本控制的响应。
这一增强在保留现有纯文本格式向后兼容性的同时，新增了对机器可读 JSON 响应的支持。&lt;/p&gt;
&lt;!--
### Backward compatible design
--&gt;
&lt;h3 id=&#34;backward-compatible-design&#34;&gt;向后兼容的设计&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#backward-compatible-design&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The new structured responses are opt-in. Without specifying an `Accept` header, the endpoints continue to return the familiar plain text format:
--&gt;
&lt;p&gt;新的结构化响应是按需启用的。
如果未指定 &lt;code&gt;Accept&lt;/code&gt; 头，端点仍会返回熟悉的纯文本格式：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ curl --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt \
  --key /etc/kubernetes/pki/apiserver-kubelet-client.key \
  --cacert /etc/kubernetes/pki/ca.crt \
  https://localhost:6443/statusz

kube-apiserver statusz
Warning: This endpoint is not meant to be machine parseable, has no formatting compatibility guarantees and is for debugging purposes only.

Started: Wed Oct 16 21:03:43 UTC 2024
Up: 0 hr 00 min 16 sec
Go version: go1.23.2
Binary version: 1.35.0-alpha.0.1595
Emulation version: 1.35
Paths: /healthz /livez /metrics /readyz /statusz /version
&lt;/code&gt;&lt;/pre&gt;&lt;!--
### Structured JSON responses
--&gt;
&lt;h3 id=&#34;structured-json-responses&#34;&gt;结构化 JSON 响应&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#structured-json-responses&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
To receive a structured response, include the appropriate `Accept` header:
--&gt;
&lt;p&gt;若要获得结构化响应，需要提供合适的 &lt;code&gt;Accept&lt;/code&gt; 头：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Accept: application/json;v=v1alpha1;g=config.k8s.io;as=Statusz
&lt;/code&gt;&lt;/pre&gt;&lt;!--
This returns a versioned JSON response:
--&gt;
&lt;p&gt;这样即可返回具备版本号的 JSON 响应：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Statusz&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;apiVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;config.k8s.io/v1alpha1&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;metadata&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;kube-apiserver&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;startTime&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;2025-10-29T00:30:01Z&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;uptimeSeconds&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#666&#34;&gt;856&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;goVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;go1.23.2&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;binaryVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;1.35.0&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;emulationVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;1.35&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;paths&amp;#34;&lt;/span&gt;: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/healthz&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/livez&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/metrics&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/readyz&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/statusz&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;/version&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Similarly, `/flagz` supports structured responses with the header:
--&gt;
&lt;p&gt;类似地，&lt;code&gt;/flagz&lt;/code&gt; 也支持结构化响应，只需设置以下头部：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Accept: application/json;v=v1alpha1;g=config.k8s.io;as=Flagz
&lt;/code&gt;&lt;/pre&gt;&lt;!--
Example response:
--&gt;
&lt;p&gt;响应示例如下：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;kind&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Flagz&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;apiVersion&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;config.k8s.io/v1alpha1&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;metadata&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;kube-apiserver&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;flags&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;advertise-address&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;192.168.8.4&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;allow-privileged&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;true&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;authorization-mode&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;[Node,RBAC]&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;enable-priority-and-fairness&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;true&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;&amp;#34;profiling&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;true&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## Why structured responses matter
--&gt;
&lt;h2 id=&#34;why-structured-responses-matter&#34;&gt;结构化响应为什么很重要&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#why-structured-responses-matter&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The addition of structured responses opens up several new possibilities:
--&gt;
&lt;p&gt;引入结构化响应使得一系列新的用例成为可能：&lt;/p&gt;
&lt;!--
### 1. **Automated health checks and monitoring**

Instead of parsing plain text, monitoring tools can now easily extract specific fields. For example, you can programmatically check if a component has been running with an unexpected emulated version or verify that critical flags are set correctly.
--&gt;
&lt;h3 id=&#34;1-automated-health-checks-and-monitoring&#34;&gt;1. &lt;strong&gt;自动化健康检查与监控&lt;/strong&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#1-automated-health-checks-and-monitoring&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;相比解析纯文本，监控工具现在可以轻松提取特定字段。
例如，你可以通过程序检查组件是否以异常的模拟版本运行，或确认关键参数是否配置正确。&lt;/p&gt;
&lt;!--
### 2. **Better debugging tools**

Developers can build sophisticated debugging tools that compare configurations across multiple components or track configuration drift over time. The structured format makes it trivial to `diff` configurations or validate that components are running with expected settings.
--&gt;
&lt;h3 id=&#34;2-better-debugging-tools&#34;&gt;2. &lt;strong&gt;更好的调试工具&lt;/strong&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#2-better-debugging-tools&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;开发者能够构建更加智能的调试工具，用于跨组件比较配置或随时间追踪配置漂移。
结构化格式让对配置执行 &lt;code&gt;diff&lt;/code&gt; 或验证组件是否按预期设置运行变得轻而易举。&lt;/p&gt;
&lt;!--
### 3. **API versioning and stability**

By introducing versioned APIs (starting with `v1alpha1`), we provide a clear path to stability. As the feature matures, we&#39;ll introduce `v1beta1` and eventually `v1`, giving you confidence that your tooling won&#39;t break with future Kubernetes releases.
--&gt;
&lt;h3 id=&#34;3-api-versioning-and-stability&#34;&gt;3. &lt;strong&gt;API 版本化与稳定性&lt;/strong&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#3-api-versioning-and-stability&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;通过引入带版本的 API（从 &lt;code&gt;v1alpha1&lt;/code&gt; 开始），我们为稳定性提供了明确路径。
随着特性不断成熟，我们会发布 &lt;code&gt;v1beta1&lt;/code&gt; 甚至 &lt;code&gt;v1&lt;/code&gt;，
让你更有信心确保这些工具在未来的 Kubernetes 版本中依然能够正常工作。&lt;/p&gt;
&lt;!--
## How to use structured z-pages
--&gt;
&lt;h2 id=&#34;how-to-use-structured-z-pages&#34;&gt;如何使用结构化 z-pages&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-to-use-structured-z-pages&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Prerequisites

Both endpoints require feature gates to be enabled:

- `/statusz`: Enable the `ComponentStatusz` feature gate
- `/flagz`: Enable the `ComponentFlagz` feature gate
--&gt;
&lt;h3 id=&#34;prerequisites&#34;&gt;前提条件&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#prerequisites&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;两个端点都需要启用相应的特性门控：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/statusz&lt;/code&gt;：启用 &lt;code&gt;ComponentStatusz&lt;/code&gt; 特性门控&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/flagz&lt;/code&gt;：启用 &lt;code&gt;ComponentFlagz&lt;/code&gt; 特性门控&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Example: Getting structured responses

Here&#39;s an example using `curl` to retrieve structured JSON responses from the kube-apiserver:
--&gt;
&lt;h3 id=&#34;example-getting-structured-responses&#34;&gt;示例：获取结构化响应&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#example-getting-structured-responses&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;下面示例展示如何使用 &lt;code&gt;curl&lt;/code&gt; 从 kube-apiserver 中获取结构化 JSON 响应：&lt;/p&gt;
&lt;!--
```bash
# Get structured statusz response
curl \
  --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt \
  --key /etc/kubernetes/pki/apiserver-kubelet-client.key \
  --cacert /etc/kubernetes/pki/ca.crt \
  -H &#34;Accept: application/json;v=v1alpha1;g=config.k8s.io;as=Statusz&#34; \
  https://localhost:6443/statusz | jq .

# Get structured flagz response
curl \
  --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt \
  --key /etc/kubernetes/pki/apiserver-kubelet-client.key \
  --cacert /etc/kubernetes/pki/ca.crt \
  -H &#34;Accept: application/json;v=v1alpha1;g=config.k8s.io;as=Flagz&#34; \
  https://localhost:6443/flagz | jq .
```
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 获取结构化状态响应&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --key /etc/kubernetes/pki/apiserver-kubelet-client.key &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --cacert /etc/kubernetes/pki/ca.crt &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  -H &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Accept: application/json;v=v1alpha1;g=config.k8s.io;as=Statusz&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  https://localhost:6443/statusz | jq .
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 获取结构化标记响应&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --key /etc/kubernetes/pki/apiserver-kubelet-client.key &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  --cacert /etc/kubernetes/pki/ca.crt &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  -H &lt;span style=&#34;color:#b44&#34;&gt;&amp;#34;Accept: application/json;v=v1alpha1;g=config.k8s.io;as=Flagz&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b62;font-weight:bold&#34;&gt;&lt;/span&gt;  https://localhost:6443/flagz | jq .
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&#34;alert alert-info&#34; role=&#34;note&#34;&gt;&lt;h4 class=&#34;alert-heading&#34;&gt;说明：&lt;/h4&gt;&lt;!--
The examples above use client certificate authentication and verify the server&#39;s certificate using `--cacert`. 
If you need to bypass certificate verification in a test environment, you can use `--insecure` (or `-k`), 
but this should never be done in production as it makes you vulnerable to man-in-the-middle attacks.
--&gt;
&lt;p&gt;上述示例使用客户端证书认证，并通过 &lt;code&gt;--cacert&lt;/code&gt; 验证服务器证书。
如果在测试环境中需要跳过证书验证，可以使用 &lt;code&gt;--insecure&lt;/code&gt;（或 &lt;code&gt;-k&lt;/code&gt;），
但在生产环境切勿这样做，否则会暴露在中间人攻击风险之下。&lt;/p&gt;&lt;/div&gt;

&lt;!--
## Important considerations
--&gt;
&lt;h2 id=&#34;important-considerations&#34;&gt;重要注意事项&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#important-considerations&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Alpha feature status

The structured z-page responses are an **alpha** feature in Kubernetes 1.35. This means:

- The API format may change in future releases
- These endpoints are intended for debugging, not production automation
- You should avoid relying on them for critical monitoring workflows until they reach beta or stable status
--&gt;
&lt;h3 id=&#34;alpha-feature-status&#34;&gt;Alpha 特性状态&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#alpha-feature-status&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;结构化 z-page 响应在 Kubernetes 1.35 中仍是 &lt;strong&gt;Alpha&lt;/strong&gt; 特性，这意味着：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;API 格式可能会在未来版本中发生变化&lt;/li&gt;
&lt;li&gt;这些端点用于调试，而非生产自动化&lt;/li&gt;
&lt;li&gt;在其达到 Beta 或稳定版之前，不应把它们作为关键监控工作流的依赖&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Security and access control
--&gt;
&lt;h3 id=&#34;security-and-access-control&#34;&gt;安全与访问控制&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#security-and-access-control&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
z-pages expose internal component information and require proper access controls. Here are the key security considerations:
--&gt;
&lt;p&gt;z-pages 会公开组件内部信息，因此必须设置恰当的访问控制，重点注意以下安全事项：&lt;/p&gt;
&lt;!--
**Authorization**: Access to z-page endpoints is restricted to members of the `system:monitoring` group, which follows the same authorization model as other debugging endpoints like `/healthz`, `/livez`, and `/readyz`. This ensures that only authorized users and service accounts can access debugging information. If your cluster uses RBAC, you can manage access by granting appropriate permissions to this group.
--&gt;
&lt;p&gt;&lt;strong&gt;鉴权&lt;/strong&gt;：访问 z-page 端点仅限 &lt;code&gt;system:monitoring&lt;/code&gt; 组成员，
遵循与 &lt;code&gt;/healthz&lt;/code&gt;、&lt;code&gt;/livez&lt;/code&gt;、&lt;code&gt;/readyz&lt;/code&gt; 等调试端点相同的鉴权模型。
这样可确保只有获授权的用户和服务账号才能获取调试信息。
如果集群使用 RBAC，可以通过赋予该组适当权限来管理访问。&lt;/p&gt;
&lt;!--
**Authentication**: The authentication requirements for these endpoints depend on your cluster&#39;s configuration. Unless anonymous authentication is enabled for your cluster, you typically need to use authentication mechanisms (such as client certificates) to access these endpoints.
--&gt;
&lt;p&gt;&lt;strong&gt;身份认证&lt;/strong&gt;：这些端点的身份认证要求取决于集群配置。
除非集群启用了匿名身份认证，否则通常需要使用身份认证机制（如客户端证书）来访问这些端点。&lt;/p&gt;
&lt;!--
**Information disclosure**: These endpoints reveal configuration details about your cluster components, including:
- Component versions and build information
- All command-line arguments and their values (with confidential values redacted)
- Available debug endpoints
--&gt;
&lt;p&gt;&lt;strong&gt;信息披露&lt;/strong&gt;：这些端点会泄露集群组件的配置细节，包括：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;组件版本与构建信息&lt;/li&gt;
&lt;li&gt;所有命令行参数及其取值（敏感值会被屏蔽）&lt;/li&gt;
&lt;li&gt;可用的调试端点&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Only grant access to trusted operators and debugging tools. Avoid exposing these endpoints to unauthorized users or automated systems that don&#39;t require this level of access.
--&gt;
&lt;p&gt;务必仅向受信任的运维人员和调试工具授予访问权限，
避免对无关用户或不需要该访问级别的自动化系统开放这些端点。&lt;/p&gt;
&lt;!--
### Future evolution

As the feature matures, we (Kubernetes SIG Instrumentation) expect to:

- Introduce `v1beta1` and eventually `v1` versions of the API
- Gather community feedback on the response schema
- Potentially add additional z-page endpoints based on user needs
--&gt;
&lt;h3 id=&#34;future-evolution&#34;&gt;未来演进&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#future-evolution&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;随着特性愈发成熟，Kubernetes SIG Instrumentation 计划：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;引入 &lt;code&gt;v1beta1&lt;/code&gt; 并最终提供 &lt;code&gt;v1&lt;/code&gt; 版本的 API&lt;/li&gt;
&lt;li&gt;收集社区对响应模式的反馈&lt;/li&gt;
&lt;li&gt;根据用户需求，潜在新增更多 z-page 端点&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Try it out

We encourage you to experiment with structured z-pages in a test environment:
--&gt;
&lt;h2 id=&#34;try-it-out&#34;&gt;动手试试&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#try-it-out&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;我们鼓励你在测试环境体验结构化 z-pages：&lt;/p&gt;
&lt;!--
1. Enable the `ComponentStatusz` and `ComponentFlagz` feature gates on your control plane components
2. Try querying the endpoints with both plain text and structured formats
3. Build a simple tool or script that uses the structured data
4. Share your feedback with the community
--&gt;
&lt;ol&gt;
&lt;li&gt;在控制平面组件上启用 &lt;code&gt;ComponentStatusz&lt;/code&gt; 与 &lt;code&gt;ComponentFlagz&lt;/code&gt; 特性门控&lt;/li&gt;
&lt;li&gt;使用纯文本与结构化两种格式查询端点&lt;/li&gt;
&lt;li&gt;构建一个使用结构化数据的简单工具或脚本&lt;/li&gt;
&lt;li&gt;向社区分享你的反馈&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
## Learn more

- [z-pages documentation](/docs/reference/instrumentation/zpages/)
- [KEP-4827: Component Statusz](https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/4827-component-statusz/README.md)
- [KEP-4828: Component Flagz](https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/4828-component-flagz/README.md)
- Join the discussion in the [#sig-instrumentation](https://kubernetes.slack.com/archives/C20HH14P7) channel on Kubernetes Slack
--&gt;
&lt;h2 id=&#34;learn-more&#34;&gt;了解更多&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#learn-more&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/instrumentation/zpages/&#34;&gt;z-pages 文档&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/4827-component-statusz/README.md&#34;&gt;KEP-4827：Component Statusz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/4828-component-flagz/README.md&#34;&gt;KEP-4828：Component Flagz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;加入 Kubernetes Slack 中的 &lt;a href=&#34;https://kubernetes.slack.com/archives/C20HH14P7&#34;&gt;#sig-instrumentation&lt;/a&gt; 频道参与讨论&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Get involved
--&gt;
&lt;h2 id=&#34;get-involved&#34;&gt;参与其中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#get-involved&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
We&#39;d love to hear your feedback! The structured z-pages feature is designed to make Kubernetes easier to debug and monitor. Whether you&#39;re building internal tooling, contributing to open source projects, or just exploring the feature, your input helps shape the future of Kubernetes observability.
--&gt;
&lt;p&gt;我们非常期待你的反馈！结构化 z-pages 旨在让 Kubernetes 调试和监控更轻松。
无论你是在构建内部工具、为开源项目做贡献，还是只是探索该特性，
你的意见都将帮助塑造 Kubernetes 可观测性的未来。&lt;/p&gt;
&lt;!--
If you have questions, suggestions, or run into issues, please reach out to SIG Instrumentation. You can find us on Slack or at our regular [community meetings](https://github.com/kubernetes/community/tree/master/sig-instrumentation).
--&gt;
&lt;p&gt;如果你有问题、建议或遇到问题，请联系 SIG Instrumentation。
你可以在 Slack 中找到我们，或参加常规的&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-instrumentation&#34;&gt;社区会议&lt;/a&gt;。&lt;/p&gt;
&lt;!--
Happy debugging!
--&gt;
&lt;p&gt;祝你调试愉快！&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35：云控制器管理器中的基于监视的路由协调</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/30/kubernetes-v1-35-watch-based-route-reconciliation-in-ccm/</link>
      <pubDate>Tue, 30 Dec 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/30/kubernetes-v1-35-watch-based-route-reconciliation-in-ccm/</guid>
      <description>
        
        
        &lt;!--
---
layout: blog
title: &#34;Kubernetes v1.35: Watch Based Route Reconciliation in the Cloud Controller Manager&#34;
date: 2025-12-30T10:30:00-08:00
slug: kubernetes-v1-35-watch-based-route-reconciliation-in-ccm
author: &gt;
  [Lukas Metzner](https://github.com/lukasmetzner) (Hetzner)
---
--&gt;
&lt;!--
Up to and including Kubernetes v1.34,
the route controller in Cloud Controller Manager (CCM)
implementations built using the
[k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider)
library reconciles routes at a fixed interval.
This causes unnecessary API requests to the cloud provider when
there are no changes to routes. Other controllers implemented
through the same library already use watch-based mechanisms,
leveraging informers to avoid unnecessary API calls.
A new feature gate is being introduced in v1.35 to allow
changing the behavior of the route controller to use watch-based informers.
--&gt;
&lt;p&gt;在 Kubernetes v1.34 及更早版本中，使用
&lt;a href=&#34;https://github.com/kubernetes/cloud-provider&#34;&gt;k8s.io/cloud-provider&lt;/a&gt;
库构建的云控制器管理器（CCM）实现中的路由控制器会以固定的时间间隔进行路由协调。
这会导致在路由没有变化的情况下，向云提供商发出不必要的 API 请求。
其他使用同一库实现的控制器已经使用基于监听的机制，
利用 informer 来避免不必要的 API 调用。
v1.35 版本引入了一个新的特性门控，允许更改路由控制器的行为，
使其使用基于监听的 informer。&lt;/p&gt;
&lt;!--
## What&#39;s new?

The feature gate `CloudControllerManagerWatchBasedRoutesReconciliation`
has been introduced to
[k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider)
in alpha stage by
[SIG Cloud Provider](https://github.com/kubernetes/community/blob/master/sig-cloud-provider/README.md).
To enable this feature you can use
`--feature-gate=CloudControllerManagerWatchBasedRoutesReconciliation=true`
in the CCM implementation you are using.
--&gt;
&lt;h2 id=&#34;新特性&#34;&gt;新特性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%96%b0%e7%89%b9%e6%80%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-cloud-provider/README.md&#34;&gt;SIG Cloud Provider&lt;/a&gt;
已在 &lt;a href=&#34;https://github.com/kubernetes/cloud-provider&#34;&gt;k8s.io/cloud-provider&lt;/a&gt;
引入了 Alpha 阶段的 &lt;code&gt;CloudControllerManagerWatchBasedRoutesReconciliation&lt;/code&gt;
特性门控。要启用此特性，你可以在使用的 CCM 实现中使用
&lt;code&gt;--feature-gate=CloudControllerManagerWatchBasedRoutesReconciliation=true&lt;/code&gt;
参数。&lt;/p&gt;
&lt;!--
## About the feature gate
--&gt;
&lt;h2 id=&#34;关于此特性门控&#34;&gt;关于此特性门控&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%85%b3%e4%ba%8e%e6%ad%a4%e7%89%b9%e6%80%a7%e9%97%a8%e6%8e%a7&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This feature gate will trigger the route reconciliation loop whenever a node is
added, deleted, or the fields `.spec.podCIDRs` or `.status.addresses` are updated.

An additional reconcile is performed in a random interval between 12h and 24h,
which is chosen at the controller&#39;s start time.
--&gt;
&lt;p&gt;此特性门控会在节点添加、删除 &lt;code&gt;.spec.podCIDRs&lt;/code&gt; 或
&lt;code&gt;.status.addresses&lt;/code&gt; 字段更新时触发路由协调循环。&lt;/p&gt;
&lt;p&gt;此外，还会以 12 小时到 24 小时之间的随机间隔执行一次额外的协调，
该间隔在控制器启动时确定。&lt;/p&gt;
&lt;!--
This feature gate does not modify the logic within the reconciliation loop.
Therefore, users of a CCM implementation should not experience significant
changes to their existing route configurations.
--&gt;
&lt;p&gt;此特性门控不会修改协调循环内的逻辑。
因此，CCM 实现的用户不应遇到现有路由配置的重大变化。&lt;/p&gt;
&lt;!--
## How can I learn more?

For more details, refer to the [KEP-5237](https://kep.k8s.io/5237).
--&gt;
&lt;h2 id=&#34;如何了解更多&#34;&gt;如何了解更多？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e4%ba%86%e8%a7%a3%e6%9b%b4%e5%a4%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;更多详情请参阅
&lt;a href=&#34;https://kep.k8s.io/5237&#34;&gt;KEP-5237&lt;/a&gt;。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35：引入工作负载感知调度</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/29/kubernetes-v1-35-introducing-workload-aware-scheduling/</link>
      <pubDate>Mon, 29 Dec 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/29/kubernetes-v1-35-introducing-workload-aware-scheduling/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.35: Introducing Workload Aware Scheduling&#34;
date: 2025-12-29T10:30:00-08:00
slug: kubernetes-v1-35-introducing-workload-aware-scheduling
author: &gt;
  Maciej Skoczeń (Google),
  Dominik Marciński (Google)
--&gt;
&lt;!--
Scheduling large workloads is a much more complex and fragile operation than scheduling a single Pod,
as it often requires considering all Pods together instead of scheduling each one independently.
For example, when scheduling a machine learning batch job, you often need to place each worker strategically,
such as on the same rack, to make the entire process as efficient as possible.
At the same time, the Pods that are part of such a workload are very often identical
from the scheduling perspective, which fundamentally changes how this process should look.
--&gt;
&lt;p&gt;调度大型工作负载比调度单个 Pod 更复杂、也更脆弱，
因为它通常需要把所有 Pod 作为整体来考虑，而不是逐个独立调度。
例如，在调度一个机器学习批处理任务时，
你往往需要有策略地放置每个 worker（例如放在同一个机架上），
才能让整体执行效率更高。
同时，这类工作负载中的 Pod 在调度视角下往往非常相似，
这从根本上改变了调度过程应有的形态。&lt;/p&gt;
&lt;!--
There are many custom schedulers adapted to perform workload scheduling efficiently,
but considering how common and important workload scheduling is to Kubernetes users,
especially in the AI era with the growing number of use cases,
it is high time to make workloads a first-class citizen for `kube-scheduler` and support them natively.
--&gt;
&lt;p&gt;虽然已经有很多定制调度器可以高效处理工作负载调度，
但考虑到工作负载调度对 Kubernetes 用户的普遍性和重要性，
尤其是在 AI 时代用例快速增长的背景下，
现在正是让工作负载成为 &lt;code&gt;kube-scheduler&lt;/code&gt; 一等公民、并提供原生支持的时候。&lt;/p&gt;
&lt;!--
## Workload aware scheduling
--&gt;
&lt;h2 id=&#34;工作负载感知调度&#34;&gt;工作负载感知调度&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%b7%a5%e4%bd%9c%e8%b4%9f%e8%bd%bd%e6%84%9f%e7%9f%a5%e8%b0%83%e5%ba%a6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The recent 1.35 release of Kubernetes delivered the first tranche of *workload aware scheduling* improvements.
These are part of a wider effort that is aiming to improve scheduling and management of workloads.
The effort will span over many SIGs and releases, and is supposed to gradually expand
capabilities of the system toward reaching the north star goal,
which is seamless workload scheduling and management in Kubernetes including,
but not limited to, preemption and autoscaling.
--&gt;
&lt;p&gt;Kubernetes 1.35 最近发布了首批&lt;strong&gt;工作负载感知调度&lt;/strong&gt;能力改进。
这些改进属于一个更广泛的长期计划，目标是提升工作负载的调度与管理能力。
该计划将跨越多个 SIG 和多个发布周期，
逐步扩展系统能力，向其“北极星目标”推进：
在 Kubernetes 中实现无缝的工作负载调度与管理，
包括但不限于抢占和自动伸缩。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 introduces the Workload API that you can use to describe the desired shape
as well as scheduling-oriented requirements of the workload. It comes with an initial implementation
of *gang scheduling* that instructs the `kube-scheduler` to schedule gang Pods in the *all-or-nothing* fashion.
Finally, we improved scheduling of identical Pods (that typically make a gang) to speed up the process
thanks to the *opportunistic batching* feature.
--&gt;
&lt;p&gt;Kubernetes v1.35 引入了 Workload API，
你可以用它描述工作负载的目标形态以及面向调度的要求。
它还带来了 &lt;strong&gt;编组调度（Gang Scheduling）&lt;/strong&gt; 的初始实现，
可指示 &lt;code&gt;kube-scheduler&lt;/code&gt; 以 &lt;strong&gt;全有或全无（all-or-nothing）&lt;/strong&gt; 方式调度编组 Pod。
最后，我们通过 &lt;strong&gt;机会式批处理（Opportunistic batching）&lt;/strong&gt; 特性提升了相同 Pod（通常构成一个编组）的调度效率，
从而加速整个调度过程。&lt;/p&gt;
&lt;!--
## Workload API
--&gt;
&lt;h2 id=&#34;workload-api&#34;&gt;Workload API&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#workload-api&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The new Workload API resource is part of the `scheduling.k8s.io/v1alpha1`
&lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes API 中的一组相关路径。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning&#39; target=&#39;_blank&#39; aria-label=&#39;API group&#39;&gt;API group&lt;/a&gt;.
This resource acts as a structured, machine-readable definition of the scheduling requirements
of a multi-Pod application. While user-facing workloads like Jobs define what to run, the Workload resource
determines how a group of Pods should be scheduled and how its placement should be managed
throughout its lifecycle.
--&gt;
&lt;p&gt;新的 Workload API 资源属于 &lt;code&gt;scheduling.k8s.io/v1alpha1&lt;/code&gt;
&lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes API 中的一组相关路径。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning&#39; target=&#39;_blank&#39; aria-label=&#39;API 组&#39;&gt;API 组&lt;/a&gt;。
该资源以结构化、机器可读的形式定义多 Pod 应用的调度需求。
像 Job 这类面向用户的工作负载定义“运行什么”，
而 Workload 资源定义“一组 Pod 应如何被调度”，
以及它们在整个生命周期内的放置如何被管理。&lt;/p&gt;
&lt;!--
A Workload allows you to define a group of Pods and apply a scheduling policy to them.
Here is what a gang scheduling configuration looks like. You can define a `podGroup` named `workers`
and apply the `gang` policy with a `minCount` of 4.
--&gt;
&lt;p&gt;Workload 允许你定义一组 Pod，并对其应用调度策略。
下面是一个编组调度配置示例：
你可以定义一个名为 &lt;code&gt;workers&lt;/code&gt; 的 &lt;code&gt;podGroup&lt;/code&gt;，并应用 &lt;code&gt;gang&lt;/code&gt; 策略，&lt;code&gt;minCount&lt;/code&gt; 设置为 4。&lt;/p&gt;
&lt;!--
```yaml
apiVersion: scheduling.k8s.io/v1alpha1
kind: Workload
metadata:
  name: training-job-workload
  namespace: some-ns
spec:
  podGroups:
  - name: workers
    policy:
      gang:
        # The gang is schedulable only if 4 pods can run at once
        minCount: 4
```
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;scheduling.k8s.io/v1alpha1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Workload&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workload&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;some-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;podGroups&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;workers&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;policy&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;gang&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 仅当 4 个 Pod 能同时运行时，该编组才可调度&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;minCount&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;4&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
When you create your Pods, you link them to this Workload using the new `workloadRef` field:
--&gt;
&lt;p&gt;创建 Pod 时，你可以通过新的 &lt;code&gt;workloadRef&lt;/code&gt; 字段把它们关联到这个 Workload：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;worker-0&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;namespace&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;some-ns&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;workloadRef&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;training-job-workload&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;podGroup&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;workers&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;...&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
## How gang scheduling works
--&gt;
&lt;h2 id=&#34;编组调度如何工作&#34;&gt;编组调度如何工作&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%bc%96%e7%bb%84%e8%b0%83%e5%ba%a6%e5%a6%82%e4%bd%95%e5%b7%a5%e4%bd%9c&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The `gang` policy enforces *all-or-nothing* placement. Without gang scheduling,
a Job might be partially scheduled, consuming resources without being able to run,
leading to resource wastage and potential deadlocks.
--&gt;
&lt;p&gt;&lt;code&gt;gang&lt;/code&gt; 策略会强制执行&lt;strong&gt;全有或全无&lt;/strong&gt;放置。
没有编组调度时，一个 Job 可能只被部分调度，
占用资源却无法真正运行，从而导致资源浪费甚至潜在死锁。&lt;/p&gt;
&lt;!--
When you create Pods that are part of a gang-scheduled pod group, the scheduler&#39;s `GangScheduling`
plugin manages the lifecycle independently for each pod group (or replica key):
--&gt;
&lt;p&gt;当你创建属于某个编组调度 Pod 组的 Pod 时，
调度器的 &lt;code&gt;GangScheduling&lt;/code&gt; 插件会按每个 Pod 组（或副本键）独立管理其生命周期：&lt;/p&gt;
&lt;!--
1. When you create your Pods (or a controller makes them for you),
   the scheduler blocks them from scheduling, until:
   * The referenced Workload object is created.
   * The referenced pod group exists in a Workload.
   * The number of pending Pods in that group meets your `minCount`.

2. Once enough Pods arrive, the scheduler tries to place them. However,
   instead of binding them to nodes immediately, the Pods wait at a `Permit` gate.

3. The scheduler checks if it has found valid assignments for the entire group (at least the `minCount`).
   * If there is room for the group, the gate opens, and all Pods are bound to nodes.
   * If only a subset of the group pods was successfully scheduled within a timeout (set to 5 minutes),
     the scheduler rejects **all** of the Pods in the group.
     They go back to the queue, freeing up the reserved resources for other workloads.
--&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;当你创建 Pod（或由控制器代你创建）时，
调度器会先阻止它们被调度，直到：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;被引用的 Workload 对象已创建；&lt;/li&gt;
&lt;li&gt;被引用的 Pod 组在某个 Workload 中存在；&lt;/li&gt;
&lt;li&gt;该组中待调度 Pod 数量满足你的 &lt;code&gt;minCount&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;当到达足够数量的 Pod 后，调度器会尝试放置它们。
但这些 Pod 不会立即绑定到节点，而是先在 &lt;code&gt;Permit&lt;/code&gt; 门控处等待。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;调度器会检查是否已为整个组（至少达到 &lt;code&gt;minCount&lt;/code&gt;）找到有效分配。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;如果组有足够空间，门控打开，所有 Pod 绑定到节点。&lt;/li&gt;
&lt;li&gt;如果在超时（默认 5 分钟）内仅有子集 Pod 调度成功，
调度器会拒绝该组中的&lt;strong&gt;所有&lt;/strong&gt; Pod。
它们会返回队列，释放已保留资源给其他工作负载。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
We&#39;d like to point out that that while this is a first implementation, the Kubernetes project firmly
intends to improve and expand the gang scheduling algorithm in future releases.
Benefits we hope to deliver include a single-cycle scheduling phase for a whole gang,
workload-level preemption, and more, moving towards the north star goal.
--&gt;
&lt;p&gt;需要说明的是，虽然这只是第一版实现，
Kubernetes 项目已经明确计划在后续版本持续改进并扩展编组调度算法。
我们希望带来的收益包括：
针对整个编组的单周期调度阶段、工作负载级抢占等，
并持续向北极星目标推进。&lt;/p&gt;
&lt;!--
## 机会式批处理
--&gt;
&lt;h2 id=&#34;opportunistic-batching&#34;&gt;Opportunistic batching&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#opportunistic-batching&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
In addition to explicit gang scheduling, v1.35 introduces *opportunistic batching*.
This is a Beta feature that improves scheduling latency for identical Pods.
--&gt;
&lt;p&gt;除了显式的编组调度，v1.35 还引入了&lt;strong&gt;机会式批处理&lt;/strong&gt;。
这是一个 Beta 特性，可降低相同 Pod 的调度延迟。&lt;/p&gt;
&lt;!--
Unlike gang scheduling, this feature does not require the Workload API
or any explicit opt-in on the user&#39;s part. It works opportunistically within the scheduler
by identifying Pods that have identical scheduling requirements (container images, resource requests,
affinities, etc.). When the scheduler processes a Pod, it can reuse the feasibility calculations
for subsequent identical Pods in the queue, significantly speeding up the process.
--&gt;
&lt;p&gt;与编组调度不同，这个特性不要求启用 Workload API，
也不需要用户显式选择加入。
它在调度器内部以“机会式”方式工作：识别调度要求相同的 Pod
（例如容器镜像、资源请求、亲和性等）。
当调度器处理一个 Pod 时，
可以复用该 Pod 的可行性计算结果给队列中后续相同 Pod，
从而显著加速调度。&lt;/p&gt;
&lt;!--
Most users will benefit from this optimization automatically, without taking any special steps,
provided their Pods meet the following criteria.
--&gt;
&lt;p&gt;只要 Pod 满足相应条件，多数用户无需额外操作就能自动受益于这项优化。&lt;/p&gt;
&lt;!--
### Restrictions
--&gt;
&lt;h3 id=&#34;限制条件&#34;&gt;限制条件&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%99%90%e5%88%b6%e6%9d%a1%e4%bb%b6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Opportunistic batching works under specific conditions. All fields used by the `kube-scheduler`
to find a placement must be identical between Pods. Additionally, using some features
disables the batching mechanism for those Pods to ensure correctness.
--&gt;
&lt;p&gt;机会式批处理仅在特定条件下生效。
&lt;code&gt;kube-scheduler&lt;/code&gt; 用于寻找放置位置的相关字段，必须在 Pod 之间保持一致。
此外，某些特性的使用会为这些 Pod 禁用批处理机制，以确保正确性。&lt;/p&gt;
&lt;!--
Note that you may need to review your `kube-scheduler` configuration
to ensure it is not implicitly disabling batching for your workloads.
--&gt;
&lt;p&gt;请注意，你可能需要检查 &lt;code&gt;kube-scheduler&lt;/code&gt; 配置，
确保它没有在你不知情的情况下为工作负载隐式禁用批处理。&lt;/p&gt;
&lt;!--
See the [docs](/docs/concepts/scheduling-eviction/scheduler-perf-tuning/#enabling-opportunistic-batching) for more details about restrictions.
--&gt;
&lt;p&gt;关于限制条件的更多细节，请参考&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/scheduler-perf-tuning/#enabling-opportunistic-batching&#34;&gt;文档&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## The north star vision
--&gt;
&lt;h2 id=&#34;北极星愿景&#34;&gt;北极星愿景&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8c%97%e6%9e%81%e6%98%9f%e6%84%bf%e6%99%af&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The project has a broad ambition to deliver workload aware scheduling.
These new APIs and scheduling enhancements are just the first steps.
In the near future, the effort aims to tackle:

* Introducing a workload scheduling phase
* Improved support for multi-node [DRA](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/)
  and topology aware scheduling
* Workload-level preemption
* Improved integration between scheduling and autoscaling
* Improved interaction with external workload schedulers
* Managing placement of workloads throughout their entire lifecycle
* Multi-workload scheduling simulations

And more. The priority and implementation order of these focus areas
are subject to change. Stay tuned for further updates.
--&gt;
&lt;p&gt;该项目有着广泛目标：实现工作负载感知调度。
这些新 API 与调度增强只是第一步。
在近期，工作将重点攻关：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;引入工作负载调度阶段&lt;/li&gt;
&lt;li&gt;增强多节点 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/&#34;&gt;DRA&lt;/a&gt;
与拓扑感知调度支持&lt;/li&gt;
&lt;li&gt;工作负载级抢占&lt;/li&gt;
&lt;li&gt;增强调度与自动伸缩的集成&lt;/li&gt;
&lt;li&gt;增强与外部工作负载调度器的交互&lt;/li&gt;
&lt;li&gt;覆盖工作负载全生命周期的放置管理&lt;/li&gt;
&lt;li&gt;多工作负载调度模拟&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;以及更多方向。上述重点的优先级和实现顺序可能会调整，敬请关注后续更新。&lt;/p&gt;
&lt;!--
## Getting started
--&gt;
&lt;h2 id=&#34;快速开始&#34;&gt;快速开始&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bf%ab%e9%80%9f%e5%bc%80%e5%a7%8b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To try the workload aware scheduling improvements:

* Workload API: Enable the
  [`GenericWorkload`](/docs/reference/command-line-tools-reference/feature-gates/#GenericWorkload)
  feature gate on both `kube-apiserver` and `kube-scheduler`, and ensure the `scheduling.k8s.io/v1alpha1`
  &lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes API 中的一组相关路径。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning&#39; target=&#39;_blank&#39; aria-label=&#39;API group&#39;&gt;API group&lt;/a&gt; is enabled.
* Gang scheduling: Enable the
  [`GangScheduling`](/docs/reference/command-line-tools-reference/feature-gates/#GangScheduling)
  feature gate on `kube-scheduler` (requires the Workload API to be enabled).
* Opportunistic batching: As a Beta feature, it is enabled by default in v1.35.
  You can disable it using the
  [`OpportunisticBatching`](/docs/reference/command-line-tools-reference/feature-gates/#OpportunisticBatching)
  feature gate on `kube-scheduler` if needed.
--&gt;
&lt;p&gt;要体验工作负载感知调度改进：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Workload API：在 &lt;code&gt;kube-apiserver&lt;/code&gt; 和 &lt;code&gt;kube-scheduler&lt;/code&gt; 上启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#GenericWorkload&#34;&gt;&lt;code&gt;GenericWorkload&lt;/code&gt;&lt;/a&gt;
特性门控，并确保启用 &lt;code&gt;scheduling.k8s.io/v1alpha1&lt;/code&gt;
&lt;a class=&#39;glossary-tooltip&#39; title=&#39;Kubernetes API 中的一组相关路径。&#39; data-bs-toggle=&#39;tooltip&#39; data-bs-placement=&#39;top&#39; href=&#39;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning&#39; target=&#39;_blank&#39; aria-label=&#39;API 组&#39;&gt;API 组&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;编组调度：在 &lt;code&gt;kube-scheduler&lt;/code&gt; 上启用
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#GangScheduling&#34;&gt;&lt;code&gt;GangScheduling&lt;/code&gt;&lt;/a&gt;
特性门控（要求 Workload API 已启用）。&lt;/li&gt;
&lt;li&gt;机会式批处理：该 Beta 特性在 v1.35 默认启用。
如有需要，可在 &lt;code&gt;kube-scheduler&lt;/code&gt; 上通过
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/#OpportunisticBatching&#34;&gt;&lt;code&gt;OpportunisticBatching&lt;/code&gt;&lt;/a&gt;
特性门控将其关闭。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
We encourage you to try out workload aware scheduling in your test clusters
and share your experiences to help shape the future of Kubernetes scheduling.
You can send your feedback by:

* Reaching out via [Slack (#sig-scheduling)](https://kubernetes.slack.com/archives/C09TP78DV).
* Commenting on the [workload aware scheduling tracking issue](https://github.com/kubernetes/kubernetes/issues/132192)
* Filing a new [issue](https://github.com/kubernetes/enhancements/issues) in the Kubernetes repository.
--&gt;
&lt;p&gt;我们鼓励你在测试集群中试用工作负载感知调度，并分享使用体验，
帮助塑造 Kubernetes 调度的未来。
你可以通过以下方式反馈：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;在 &lt;a href=&#34;https://kubernetes.slack.com/archives/C09TP78DV&#34;&gt;Slack (#sig-scheduling)&lt;/a&gt; 联系我们。&lt;/li&gt;
&lt;li&gt;在&lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/132192&#34;&gt;工作负载感知调度跟踪 issue&lt;/a&gt; 下评论。&lt;/li&gt;
&lt;li&gt;在 Kubernetes 仓库提交新的 &lt;a href=&#34;https://github.com/kubernetes/enhancements/issues&#34;&gt;Issue&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Learn more

* Read the KEPs for
  [Workload API and gang scheduling](https://github.com/kubernetes/enhancements/tree/master/keps/sig-scheduling/4671-gang-scheduling) and
  [Opportunistic batching](https://github.com/kubernetes/enhancements/tree/master/keps/sig-scheduling/5598-opportunistic-batching).
* Track the [Workload aware scheduling issue](https://github.com/kubernetes/kubernetes/issues/132192)
  for recent updates.
--&gt;
&lt;h2 id=&#34;了解更多&#34;&gt;了解更多&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%ba%86%e8%a7%a3%e6%9b%b4%e5%a4%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;阅读以下 KEP：
&lt;a href=&#34;https://github.com/kubernetes/enhancements/tree/master/keps/sig-scheduling/4671-gang-scheduling&#34;&gt;Workload API 与编组调度&lt;/a&gt;
和&lt;a href=&#34;https://github.com/kubernetes/enhancements/tree/master/keps/sig-scheduling/5598-opportunistic-batching&#34;&gt;机会式批处理&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;关注&lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/132192&#34;&gt;工作负载感知调度 issue&lt;/a&gt;
获取最新进展。&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>避免升级到 etcd v3.6 时出现僵尸集群成员</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/21/preventing-etcd-zombies/</link>
      <pubDate>Sun, 21 Dec 2025 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/21/preventing-etcd-zombies/</guid>
      <description>
        
        
        &lt;!--
layout: blog
summary: &gt;
  The key takeaway? Always upgrade to etcd v3.5.26 or later before moving to v3.6.
  This ensures your cluster is automatically repaired, and avoids zombie members.
title: &#34;Avoiding Zombie Cluster Members When Upgrading to etcd v3.6&#34;
date: 2025-12-21
canonicalUrl: https://etcd.io/blog/2025/zombie_members_upgrade/
slug: preventing-etcd-zombies
author: &gt;
  [Benjamin Wang](https://github.com/ahrtr) VMware by Broadcom,
  [Josh Berkus](https://github.com/jberkus) Red Hat
--&gt;
&lt;!--
*This article is a mirror of an [original](https://etcd.io/blog/2025/zombie_members_upgrade/) that was recently published to the official etcd blog*.
--&gt;
&lt;p&gt;&lt;em&gt;本文是对近期发布在官方 etcd 博客&lt;a href=&#34;https://etcd.io/blog/2025/zombie_members_upgrade/&#34;&gt;原文&lt;/a&gt;的镜像转载。&lt;/em&gt;&lt;/p&gt;
&lt;!--
The [key takeaway](https://etcd.io/blog/2025/zombie_members_upgrade/#key-takeaway)?
Always upgrade to etcd v3.5.26 or later before moving to v3.6. This ensures your cluster is automatically repaired, and avoids zombie members.
--&gt;
&lt;p&gt;&lt;a href=&#34;https://etcd.io/blog/2025/zombie_members_upgrade/#key-takeaway&#34;&gt;关键信息&lt;/a&gt;：
升级到 v3.6 之前，务必先升级到 etcd v3.5.26 或更高版本。这样能自动修复集群，避免僵尸成员问题。&lt;/p&gt;
&lt;!--
## Issue summary
--&gt;
&lt;h2 id=&#34;问题概述&#34;&gt;问题概述&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%97%ae%e9%a2%98%e6%a6%82%e8%bf%b0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Recently, the etcd community addressed an issue that may appear when users [upgrade from v3.5 to v3.6].  This bug can cause the cluster to report &#34;zombie members&#34;, which are etcd nodes that were removed from the database cluster some time ago, and are re-appearing and joining database consensus.  The etcd cluster is then inoperable until these zombie members are removed.
--&gt;
&lt;p&gt;最近，etcd 社区解决了一个升级时可能出现的问题：当用户&lt;a href=&#34;https://etcd.io/docs/v3.6/upgrades/upgrade_3_6/&#34;&gt;从 v3.5 升级到 v3.6&lt;/a&gt; 时，集群可能会出现“僵尸成员”。这些僵尸成员是之前从数据库集群中移除的 etcd 节点，却又重新出现并加入数据库共识。集群会因此无法正常工作，直到这些僵尸成员被再次移除。&lt;/p&gt;
&lt;!--
In etcd v3.5 and earlier, the v2store was the source of truth for membership data, even though the v3store was also present. As a part of our [v2store deprecation plan], in v3.6 the v3store is the source of truth for cluster membership. Through a [bug report] we found out that, in some older clusters, v2store and v3store could become inconsistent.  This inconsistency manifests after upgrading as seeing old, removed &#34;zombie&#34; cluster members re-appearing in the cluster.
--&gt;
&lt;p&gt;在 etcd v3.5 及以前版本，尽管 v3store 已存在，但集群成员数据的权威来源仍是 v2store。作为 &lt;a href=&#34;https://github.com/etcd-io/etcd/issues/12913&#34;&gt;v2store 废弃计划&lt;/a&gt;的一部分，从 v3.6 开始，集群成员数据的权威来源变为 v3store。通过一次 &lt;a href=&#34;https://github.com/etcd-io/etcd/issues/20967&#34;&gt;bug 报告&lt;/a&gt;，我们发现部分老集群中 v2store 和 v3store 可能不一致。这种不一致在升级后会表现为旧的、已移除的“僵尸”成员重新出现在集群中。&lt;/p&gt;
&lt;!--
## The fix and upgrade path
--&gt;
&lt;h2 id=&#34;解决方案和升级路径&#34;&gt;解决方案和升级路径&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88%e5%92%8c%e5%8d%87%e7%ba%a7%e8%b7%af%e5%be%84&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
We’ve added a [mechanism in etcd v3.5.26] to automatically sync v3store from v2store, ensuring that affected clusters are repaired before upgrading to 3.6.x.
--&gt;
&lt;p&gt;etcd v3.5.26 已引入&lt;a href=&#34;https://github.com/etcd-io/etcd/pull/20995&#34;&gt;自动同步机制&lt;/a&gt;，会将 v2store 中的成员信息同步到 v3store，确保受影响的集群在升级到 3.6.x 之前得到修复。&lt;/p&gt;
&lt;!--
To support the many users currently upgrading to 3.6, we have provided the following safe upgrade path:
--&gt;
&lt;p&gt;为了支持大量正在升级到 3.6 的用户，我们建议采用以下安全升级路径：&lt;/p&gt;
&lt;!--
1. Upgrade your cluster to [v3.5.26] or later.
2. Wait and confirm that all members are healthy post-update.
3. Upgrade to v3.6.
--&gt;
&lt;ol&gt;
&lt;li&gt;先将集群升级到 &lt;a href=&#34;https://github.com/etcd-io/etcd/releases/tag/v3.5.26&#34;&gt;v3.5.26&lt;/a&gt; 或更高版本。&lt;/li&gt;
&lt;li&gt;等待并确认升级后所有成员状态健康。&lt;/li&gt;
&lt;li&gt;再升级到 v3.6。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
We are unable to provide a safe workaround path for users who have some obstacle preventing updating to v3.5.26.  As such, if v3.5.26 is not available from your packaging source or vendor, you should delay upgrading to v3.6 until it is.
--&gt;
&lt;p&gt;如果你由于某些限制无法升级到 v3.5.26，我们目前无法提供同等安全的替代路径。因此，如果你的包源或供应商尚未提供 v3.5.26，建议暂缓升级到 v3.6。&lt;/p&gt;
&lt;!--
## Additional technical detail
--&gt;
&lt;h2 id=&#34;额外技术细节&#34;&gt;额外技术细节&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%a2%9d%e5%a4%96%e6%8a%80%e6%9c%af%e7%bb%86%e8%8a%82&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**Information below is offered for reference only.  Users can follow the safe upgrade path without knowledge of the following details.**
--&gt;
&lt;p&gt;&lt;strong&gt;以下信息仅供参考。即使不了解这些技术细节，也可以按前述安全路径完成升级。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
This issue is encountered with clusters that have been running in production on etcd v3.5.25 or earlier.  It is a side effect of adding and removing members from the cluster, or recovering the cluster from failure.  This means that the issue is more likely the older the etcd cluster is, but it cannot be ruled out for any user regardless of the age of the cluster.
--&gt;
&lt;p&gt;该问题主要出现在长期运行 etcd v3.5.25 或更早版本的生产集群中。它是集群增删成员或故障恢复过程中的副作用。这意味着集群越老，出现问题的概率通常越高；但无论集群新旧，都不能完全排除风险。&lt;/p&gt;
&lt;!--
etcd maintainers, working with issue reporters, have found three possible triggers for the issue based on symptoms and an analysis of etcd code and logs:
--&gt;
&lt;p&gt;etcd 维护者与问题报告者在分析症状、代码和日志后，总结了三个可能触发条件：&lt;/p&gt;
&lt;!--
1. **Bug in `etcdctl snapshot restore` (v3.4 and old versions)**: When restoring a snapshot using `etcdctl snapshot restore`, etcdctl was supposed to remove existing members before adding the new ones. In v3.4, due to a bug, old members were not removed, resulting in zombie members. Refer to the [comment on etcdctl].
--&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;etcdctl snapshot restore&lt;/code&gt; 的 bug（v3.4 及更早版本）&lt;/strong&gt;：使用 &lt;code&gt;etcdctl snapshot restore&lt;/code&gt; 恢复快照时，etcdctl 本应先移除旧成员再添加新成员。v3.4 中由于 bug，旧成员未被移除，从而产生僵尸成员。详见 &lt;a href=&#34;https://github.com/etcd-io/etcd/issues/20967#issuecomment-3618010356&#34;&gt;etcdctl 相关评论&lt;/a&gt;。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
2. **`--force-new-cluster` in v3.5 and earlier versions**: In rare cases, forcibly creating a new single-member cluster did not fully remove old members, leaving zombies. The issue was [resolved](https://github.com/etcd-io/etcd/pull/20339) in v3.5.22. Please refer to [this PR](https://github.com/etcd-io/raft/pull/300) in the Raft project for detailed technical information.
--&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;&lt;strong&gt;v3.5 及更早版本中使用 &lt;code&gt;--force-new-cluster&lt;/code&gt;&lt;/strong&gt;：在极少数情况下，强制创建新的单成员集群时未能彻底移除旧成员，导致僵尸成员残留。该问题已在 v3.5.22 &lt;a href=&#34;https://github.com/etcd-io/etcd/pull/20339&#34;&gt;修复&lt;/a&gt;。更多技术细节可参考 Raft 项目的 &lt;a href=&#34;https://github.com/etcd-io/raft/pull/300&#34;&gt;PR&lt;/a&gt;。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
3. **--unsafe-no-sync enabled**: If `--unsafe-no-sync` is enabled, in rare cases etcd might persist a membership change to v3store but crash before writing it to the WAL, causing inconsistency between v2store and v3store. This is a problem for single-member clusters. For multi-member clusters, forcibly creating a new single-member cluster from the crashed node’s data may lead to zombie members.
--&gt;
&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;&lt;strong&gt;启用 &lt;code&gt;--unsafe-no-sync&lt;/code&gt;&lt;/strong&gt;：启用该参数时，在极少数情况下 etcd 可能已将成员变更写入 v3store，但在写入 WAL 之前崩溃，从而导致 v2store 与 v3store 不一致。这对单成员集群影响更大；多成员集群若从崩溃节点数据强制创建单成员集群，也可能引入僵尸成员。&lt;/li&gt;
&lt;/ol&gt;


&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Note&lt;/h4&gt;

    &lt;!--
`--unsafe-no-sync` is generally not recommended, as it may break the guarantees given by the consensus protocol.
--&gt;
&lt;p&gt;&lt;code&gt;--unsafe-no-sync&lt;/code&gt; 一般不推荐使用，因为它可能破坏共识协议所提供的保证。&lt;/p&gt;

&lt;/div&gt;

&lt;!--
Importantly, there may be other triggers for v2store and v3store membership data becoming inconsistent that we have not yet found.  This means that you cannot assume that you are safe just because you have not performed any of the three actions above.
Once users are upgraded to etcd v3.6, v3store becomes the source of membership data, and further inconsistency is not possible.
--&gt;
&lt;p&gt;需要强调的是，除了以上三种情况外，可能还存在我们尚未发现的其他触发因素，导致 v2store 与 v3store 成员数据不一致。因此，不能因为“没有执行上述三种操作”就认为一定安全。升级到 etcd v3.6 后，v3store 成为成员数据唯一权威来源，这类不一致问题将不再发生。&lt;/p&gt;
&lt;!--
Advanced users who want to verify the consistency between v2store and v3store can follow the steps described in this [comment].   This check is not required to fix the issue, nor does SIG etcd recommend bypassing the v3.5.26 update regardless of the results of the check.
--&gt;
&lt;p&gt;想要验证 v2store 和 v3store 一致性的高级用户，可以参考这条&lt;a href=&#34;https://github.com/etcd-io/etcd/issues/20967#issuecomment-3590609775&#34;&gt;评论&lt;/a&gt;中的步骤。该检测不是修复问题的必要条件，且无论检测结果如何，SIG etcd 都不建议跳过 v3.5.26 这一步升级。&lt;/p&gt;
&lt;!--
## Key takeaway
--&gt;
&lt;h2 id=&#34;关键要点&#34;&gt;关键要点&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%85%b3%e9%94%ae%e8%a6%81%e7%82%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Always upgrade to [v3.5.26] or later before moving to v3.6. This ensures your cluster is automatically repaired and avoids zombie members.
--&gt;
&lt;p&gt;升级到 v3.6 之前，务必先升级到 &lt;a href=&#34;https://github.com/etcd-io/etcd/releases/tag/v3.5.26&#34;&gt;v3.5.26&lt;/a&gt; 或更高版本。这样可以自动修复集群并避免僵尸成员问题。&lt;/p&gt;
&lt;!--
## Acknowledgements
--&gt;
&lt;h2 id=&#34;致谢&#34;&gt;致谢&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e8%87%b4%e8%b0%a2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
We would like to thank [Christian Baumann] for reporting this long-standing upgrade issue. His report and follow-up work helped bring the issue to our attention so that we could investigate and resolve it upstream.
--&gt;
&lt;p&gt;感谢 &lt;a href=&#34;https://github.com/thechristschn&#34;&gt;Christian Baumann&lt;/a&gt; 报告了这一长期存在的升级问题。他的反馈和后续工作帮助我们及时定位并在上游完成修复。&lt;/p&gt;
&lt;!--
[upgrade from v3.5 to v3.6]: https://etcd.io/docs/v3.6/upgrades/upgrade_3_6/
[v2store deprecation plan]: https://github.com/etcd-io/etcd/issues/12913
[bug report]: https://github.com/etcd-io/etcd/issues/20967
[mechanism in etcd v3.5.26]: https://github.com/etcd-io/etcd/pull/20995
[v3.5.26]: https://github.com/etcd-io/etcd/releases/tag/v3.5.26
[comment on etcdctl]: https://github.com/etcd-io/etcd/issues/20967#issuecomment-3618010356
[Christian Baumann]: https://github.com/thechristschn
[comment]: https://github.com/etcd-io/etcd/issues/20967#issuecomment-3590609775
--&gt;
&lt;h2 id=&#34;参考资料&#34;&gt;参考资料&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e8%80%83%e8%b5%84%e6%96%99&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ol&gt;
&lt;li&gt;升级指南（v3.5 -&amp;gt; v3.6）：&lt;a href=&#34;https://etcd.io/docs/v3.6/upgrades/upgrade_3_6/&#34;&gt;https://etcd.io/docs/v3.6/upgrades/upgrade_3_6/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;v2store 废弃计划：&lt;a href=&#34;https://github.com/etcd-io/etcd/issues/12913&#34;&gt;https://github.com/etcd-io/etcd/issues/12913&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Bug 报告：&lt;a href=&#34;https://github.com/etcd-io/etcd/issues/20967&#34;&gt;https://github.com/etcd-io/etcd/issues/20967&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;v3.5.26 自动同步机制：&lt;a href=&#34;https://github.com/etcd-io/etcd/pull/20995&#34;&gt;https://github.com/etcd-io/etcd/pull/20995&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;v3.5.26 版本发布：&lt;a href=&#34;https://github.com/etcd-io/etcd/releases/tag/v3.5.26&#34;&gt;https://github.com/etcd-io/etcd/releases/tag/v3.5.26&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;etcdctl 相关评论：[1] &lt;a href=&#34;https://github.com/etcd-io/etcd/issues/20967#issuecomment-3618010356&#34;&gt;https://github.com/etcd-io/etcd/issues/20967#issuecomment-3618010356&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Raft 项目 PR：[2] &lt;a href=&#34;https://github.com/etcd-io/raft/pull/300&#34;&gt;https://github.com/etcd-io/raft/pull/300&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;一致性检查评论：[3] &lt;a href=&#34;https://github.com/etcd-io/etcd/issues/20967#issuecomment-3590609775&#34;&gt;https://github.com/etcd-io/etcd/issues/20967#issuecomment-3590609775&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Christian Baumann：&lt;a href=&#34;https://github.com/thechristschn&#34;&gt;https://github.com/thechristschn&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35：Job Managed By 特性正式发布（GA）</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/18/kubernetes-v1-35-job-managedby-for-jobs-goes-ga/</link>
      <pubDate>Thu, 18 Dec 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/18/kubernetes-v1-35-job-managedby-for-jobs-goes-ga/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.35: Job Managed By Goes GA&#34;
date: 2025-12-18T10:30:00-08:00
slug: kubernetes-v1-35-job-managedby-for-jobs-goes-ga
author: &gt;
  [Dejan Zele Pejchev](https://github.com/dejanzele) (G-Research),
  [Michał Woźniak](https://github.com/mimowo) (Google)
--&gt;
&lt;!--
In Kubernetes v1.35, the ability to specify an external Job controller (through `.spec.managedBy`) graduates to General Availability.
--&gt;
&lt;p&gt;在 Kubernetes v1.35 中，通过 &lt;code&gt;.spec.managedBy&lt;/code&gt; 指定外部 Job 控制器的能力升级为正式可用（GA）。&lt;/p&gt;
&lt;!--
This feature allows external controllers to take full responsibility for Job reconciliation, unlocking powerful scheduling patterns like multi-cluster dispatching with [MultiKueue](https://kueue.sigs.k8s.io/docs/concepts/multikueue/).
--&gt;
&lt;p&gt;该特性允许外部控制器对 Job 的调谐（reconciliation）承担完全责任，从而解锁更强大的调度模式，
例如借助 &lt;a href=&#34;https://kueue.sigs.k8s.io/docs/concepts/multikueue/&#34;&gt;MultiKueue&lt;/a&gt; 进行跨多集群派发。&lt;/p&gt;
&lt;!--
## Why delegate Job reconciliation?
--&gt;
&lt;h2 id=&#34;why-delegate-job-reconciliation&#34;&gt;为何要委派 Job 调谐？  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#why-delegate-job-reconciliation&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The primary motivation for this feature is to support multi-cluster batch scheduling architectures, such as MultiKueue.
--&gt;
&lt;p&gt;该特性的主要动机是支持多集群批处理调度架构，例如 MultiKueue。&lt;/p&gt;
&lt;!--
The MultiKueue architecture distinguishes between a Management Cluster and a pool of Worker Clusters:
--&gt;
&lt;p&gt;MultiKueue 架构区分“管理集群（Management Cluster）”与一组“工作集群（Worker Clusters）”：&lt;/p&gt;
&lt;!--
- The Management Cluster is responsible for dispatching Jobs but not executing them. It needs to accept Job objects to track status, but it skips the creation and execution of Pods.
--&gt;
&lt;ul&gt;
&lt;li&gt;管理集群负责派发 Job，但不负责执行。
它需要接收 Job 对象以跟踪状态，但会跳过 Pod 的创建与执行。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- The Worker Clusters receive the dispatched Jobs and execute the actual Pods.
--&gt;
&lt;ul&gt;
&lt;li&gt;工作集群接收被派发的 Job，并执行实际的 Pod。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Users usually interact with the Management Cluster. Because the status is automatically propagated back, they can observe the Job&#39;s progress &#34;live&#34; without accessing the Worker Clusters.
--&gt;
&lt;ul&gt;
&lt;li&gt;用户通常与管理集群交互。由于状态会自动回传，
用户无需访问工作集群也能“实时”观察 Job 的进度。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- In the Worker Clusters, the dispatched Jobs run as regular Jobs managed by the built-in Job controller, with no `.spec.managedBy` set.
--&gt;
&lt;ul&gt;
&lt;li&gt;在工作集群中，被派发的 Job 会作为常规 Job 运行，
由内置 Job 控制器管理，且不会设置 &lt;code&gt;.spec.managedBy&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
By using `.spec.managedBy`, the MultiKueue controller on the Management Cluster can take over the reconciliation of a Job. It copies the status from the &#34;mirror&#34; Job running on the Worker Cluster back to the Management Cluster.
--&gt;
&lt;p&gt;通过使用 &lt;code&gt;.spec.managedBy&lt;/code&gt;，管理集群上的 MultiKueue 控制器可以接管某个 Job 的调谐。
它会将工作集群中运行的“镜像（mirror）Job”的状态复制回管理集群。&lt;/p&gt;
&lt;!--
Why not just disable the Job controller? While one could theoretically achieve this by disabling the built-in Job controller entirely, this is often impossible or impractical for two reasons:
--&gt;
&lt;p&gt;为什么不直接禁用 Job 控制器？理论上可以通过完全禁用内置 Job 控制器来实现，
但这通常不可行或不现实，原因主要有两点：&lt;/p&gt;
&lt;!--
1. Managed Control Planes: In many cloud environments, the Kubernetes control plane is locked, and users cannot modify controller manager flags.
--&gt;
&lt;ol&gt;
&lt;li&gt;托管控制平面：在许多云环境中，Kubernetes 控制平面是锁定的，
用户无法修改控制器管理器的参数。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
2. Hybrid Cluster Role: Users often need a &#34;hybrid&#34; mode where the Management Cluster dispatches some heavy workloads to remote clusters but still executes smaller or control-plane-related Jobs in the Management Cluster. `.spec.managedBy` allows this granularity on a per-Job basis.
--&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;混合集群角色：用户常常需要一种“混合”模式：
管理集群将部分重型工作负载派发到远端集群，
但仍在管理集群中执行较小的、或与控制平面相关的 Job。
&lt;code&gt;.spec.managedBy&lt;/code&gt; 让这种粒度可以按 Job 逐个控制。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
## How `.spec.managedBy` works
--&gt;
&lt;h2 id=&#34;how-specmanagedby-works&#34;&gt;&lt;code&gt;.spec.managedBy&lt;/code&gt; 的工作机制  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-specmanagedby-works&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The `.spec.managedBy` field indicates which controller is responsible for the Job, specifically there are two modes of operation:
--&gt;
&lt;p&gt;&lt;code&gt;.spec.managedBy&lt;/code&gt; 字段用于指示由哪个控制器负责该 Job。
具体而言，它有两种工作模式：&lt;/p&gt;
&lt;!--
- **Standard**: if unset or set to the reserved value `kubernetes.io/job-controller`, the built-in Job controller reconciles the Job as usual (standard behavior).
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;标准（Standard）&lt;/strong&gt;：如果未设置，或设置为保留值 &lt;code&gt;kubernetes.io/job-controller&lt;/code&gt;，
内置 Job 控制器会像往常一样调谐该 Job（标准行为）。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- **Delegation**: If set to any other value, the built-in Job controller skips reconciliation entirely for that Job.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;委派（Delegation）&lt;/strong&gt;：如果设置为任何其他值，内置 Job 控制器将完全跳过对该 Job 的调谐。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
To prevent orphaned Pods or resource leaks, this field is immutable. You cannot transfer a running Job from one controller to another.
--&gt;
&lt;p&gt;为防止出现孤儿 Pod 或资源泄漏，该字段是不可变的（immutable）。
你不能将一个正在运行的 Job 从一个控制器转移到另一个控制器。&lt;/p&gt;
&lt;!--
If you are looking into implementing an external controller, be aware that your controller needs to be conformant with the definitions for the [Job API](/docs/reference/kubernetes-api/workload-resources/job-v1/).
--&gt;
&lt;p&gt;如果你计划实现一个外部控制器，请注意你的控制器需要符合
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/kubernetes-api/workload-resources/job-v1/&#34;&gt;Job API&lt;/a&gt;
的定义。&lt;/p&gt;
&lt;!--
In order to enforce the conformance, a significant part of the effort was to introduce the extensive Job status validation rules.
--&gt;
&lt;p&gt;为确保这种一致性，这项工作的一个重要部分是引入了一套&lt;strong&gt;完善且严格的 Job 状态校验规则&lt;/strong&gt;。&lt;/p&gt;
&lt;!--
Navigate to the [How can you learn more?](#how-can-you-learn-more) section for more details.
--&gt;
&lt;p&gt;更多细节请参阅&lt;a href=&#34;#how-can-you-learn-more&#34;&gt;如何进一步了解？&lt;/a&gt;一节。&lt;/p&gt;
&lt;!--
## Ecosystem Adoption
--&gt;
&lt;h2 id=&#34;ecosystem-adoption&#34;&gt;生态采纳情况  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ecosystem-adoption&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The `.spec.managedBy` field is rapidly becoming the standard interface for delegating control in the Kubernetes batch ecosystem.
--&gt;
&lt;p&gt;&lt;code&gt;.spec.managedBy&lt;/code&gt; 字段正在快速成为 Kubernetes 批处理生态中委派控制的标准接口。&lt;/p&gt;
&lt;!--
Various custom workload controllers are adding this field (or an equivalent) to allow MultiKueue to take over their reconciliation and orchestrate them across clusters:
--&gt;
&lt;p&gt;多种自定义工作负载控制器正在加入该字段（或等效字段），
以便让 MultiKueue 接管它们的调谐并在多集群之间进行编排：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes-sigs/jobset&#34;&gt;JobSet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.kubeflow.org/docs/components/training/&#34;&gt;Kubeflow Trainer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.ray.io/en/latest/cluster/kubernetes/&#34;&gt;KubeRay&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://project-codeflare.github.io/appwrapper/&#34;&gt;AppWrapper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://tekton.dev/docs/&#34;&gt;Tekton Pipelines&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
While it is possible to use `.spec.managedBy` to implement a custom Job controller from scratch, we haven&#39;t observed that yet. The feature is specifically designed to support delegation patterns, like MultiKueue, without reinventing the wheel.
--&gt;
&lt;p&gt;虽然理论上可以用 &lt;code&gt;.spec.managedBy&lt;/code&gt; 从零实现一个自定义 Job 控制器，
但我们尚未观察到这种用法。该特性更明确地面向委派模式（例如 MultiKueue）而设计，
以避免重复造轮子。&lt;/p&gt;
&lt;!--
## How can you learn more?
--&gt;
&lt;h2 id=&#34;how-can-you-learn-more&#34;&gt;如何进一步了解？  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-can-you-learn-more&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
If you want to dig deeper:
--&gt;
&lt;p&gt;如果你想进一步深入了解：&lt;/p&gt;
&lt;!--
Read the user-facing documentation for:
--&gt;
&lt;p&gt;阅读面向用户的文档：&lt;/p&gt;
&lt;!--
- [Jobs](/docs/concepts/workloads/controllers/job/),
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/controllers/job/&#34;&gt;Job&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [Delegation of managing a Job object to an external controller](/docs/concepts/workloads/controllers/job/#delegation-of-managing-a-job-object-to-external-controller), and
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/controllers/job/#delegation-of-managing-a-job-object-to-external-controller&#34;&gt;将 Job 对象的管理委派给外部控制器&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [MultiKueue](https://kueue.sigs.k8s.io/docs/concepts/multikueue/).
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kueue.sigs.k8s.io/docs/concepts/multikueue/&#34;&gt;MultiKueue&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Deep dive into the design history:
--&gt;
&lt;p&gt;深入了解设计历程：&lt;/p&gt;
&lt;!--
- The Kubernetes Enhancement Proposal (KEP) [Job&#39;s managed-by mechanism](https://github.com/kubernetes/enhancements/issues/4368) including introduction of the extensive [Job status validation rules](https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/4368-support-managed-by-for-batch-jobs#job-status-validation).
--&gt;
&lt;ul&gt;
&lt;li&gt;Kubernetes 增强提案（KEP）&lt;a href=&#34;https://github.com/kubernetes/enhancements/issues/4368&#34;&gt;Job&#39;s managed-by mechanism&lt;/a&gt;，
其中包括引入了更全面的 &lt;a href=&#34;https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/4368-support-managed-by-for-batch-jobs#job-status-validation&#34;&gt;Job status validation rules&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- The Kueue KEP for [MultiKueue](https://github.com/kubernetes-sigs/kueue/tree/main/keps/693-multikueue).
--&gt;
&lt;ul&gt;
&lt;li&gt;Kueue 的 KEP：&lt;a href=&#34;https://github.com/kubernetes-sigs/kueue/tree/main/keps/693-multikueue&#34;&gt;MultiKueue&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Explore how MultiKueue uses `.spec.managedBy` in practice in the task guide for [running Jobs across clusters](https://kueue.sigs.k8s.io/docs/tasks/run/multikueue/job/).
--&gt;
&lt;p&gt;也可以通过任务指南了解 MultiKueue 在实践中如何使用 &lt;code&gt;.spec.managedBy&lt;/code&gt;：
&lt;a href=&#34;https://kueue.sigs.k8s.io/docs/tasks/run/multikueue/job/&#34;&gt;跨集群运行 Job&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Acknowledgments
--&gt;
&lt;h2 id=&#34;acknowledgments&#34;&gt;致谢  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#acknowledgments&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
As with any Kubernetes feature, a lot of people helped shape this one through design discussions, reviews, test runs,
and bug reports.
--&gt;
&lt;p&gt;与任何 Kubernetes 特性一样，这项特性也由许多人一起塑造：
他们参与设计讨论、评审、试运行与缺陷报告等工作。&lt;/p&gt;
&lt;!--
We would like to thank, in particular:
--&gt;
&lt;p&gt;我们特别感谢：&lt;/p&gt;
&lt;!--
* [Maciej Szulik](https://github.com/soltysh) - for guidance, mentorship, and reviews.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/soltysh&#34;&gt;Maciej Szulik&lt;/a&gt;——提供指导、辅导与评审。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Filip Křepinský](https://github.com/atiratree) - for guidance, mentorship, and reviews.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/atiratree&#34;&gt;Filip Křepinský&lt;/a&gt;——提供指导、辅导与评审。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Get involved
--&gt;
&lt;h2 id=&#34;get-involved&#34;&gt;参与其中  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#get-involved&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
This work was sponsored by the Kubernetes
[Batch Working Group](https://github.com/kubernetes/community/tree/master/wg-batch)
in close collaboration with the
[SIG Apps](https://github.com/kubernetes/community/tree/master/sig-apps),
and with strong input from the
[SIG Scheduling](https://github.com/kubernetes/community/tree/master/sig-scheduling) community.
--&gt;
&lt;p&gt;这项工作由 Kubernetes 的 &lt;a href=&#34;https://github.com/kubernetes/community/tree/master/wg-batch&#34;&gt;Batch Working Group&lt;/a&gt; 发起，
并与 &lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-apps&#34;&gt;SIG Apps&lt;/a&gt; 紧密协作，
同时也得到了 &lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-scheduling&#34;&gt;SIG Scheduling&lt;/a&gt;
社区的强力支持与投入。&lt;/p&gt;
&lt;!--
If you are interested in batch scheduling, multi-cluster solutions, or further improving the Job API:
--&gt;
&lt;p&gt;如果你对批处理调度、多集群解决方案或进一步改进 Job API 感兴趣：&lt;/p&gt;
&lt;!--
- Join us in the Batch WG and SIG Apps meetings.
--&gt;
&lt;ul&gt;
&lt;li&gt;欢迎加入 Batch WG 与 SIG Apps 会议。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- Subscribe to the [WG Batch Slack channel](https://kubernetes.slack.com/messages/wg-batch).
--&gt;
&lt;ul&gt;
&lt;li&gt;订阅 &lt;a href=&#34;https://kubernetes.slack.com/messages/wg-batch&#34;&gt;WG Batch Slack 频道&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35：Timbernetes（世界树版本）</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/17/kubernetes-v1-35-release/</link>
      <pubDate>Wed, 17 Dec 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/17/kubernetes-v1-35-release/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.35: Timbernetes (The World Tree Release)&#34;
date: 2025-12-17T10:30:00-08:00
evergreen: true
slug: kubernetes-v1-35-release
author: &gt;
  [Kubernetes v1.35 Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.35/release-team.md)
--&gt;
&lt;!--
**Editors**: Aakanksha Bhende, Arujjwal Negi, Chad M. Crowell, Graziano Casto, Swathi Rao
--&gt;
&lt;p&gt;&lt;strong&gt;编辑&lt;/strong&gt;：Aakanksha Bhende、Arujjwal Negi、Chad M. Crowell、Graziano Casto、Swathi Rao&lt;/p&gt;
&lt;!--
Similar to previous releases, the release of Kubernetes v1.35 introduces new stable, beta, and alpha features. The consistent delivery of high-quality releases underscores the strength of our development cycle and the vibrant support from our community.
--&gt;
&lt;p&gt;与之前版本类似，Kubernetes v1.35 的发布引入了新的稳定（GA）、Beta 和 Alpha 特性。
持续交付高质量版本，体现了我们开发周期的韧性，也离不开社区的热情支持。&lt;/p&gt;
&lt;!--
This release consists of 60 enhancements, including 17 stable, 19 beta, and 22 alpha features.
--&gt;
&lt;p&gt;此版本包含 60 个增强项，其中包括 17 个稳定（GA）特性、19 个 Beta 特性和 22 个 Alpha 特性。&lt;/p&gt;
&lt;!--
There are also some [deprecations and removals](#deprecations-removals-and-community-updates) in this release;
make sure to read about those.
--&gt;
&lt;p&gt;本次发布还包含一些&lt;a href=&#34;#deprecations-removals-and-community-updates&#34;&gt;弃用与移除&lt;/a&gt;内容，请务必阅读相关说明。&lt;/p&gt;
&lt;!--
## Release theme and logo
--&gt;
&lt;h2 id=&#34;release-theme-and-logo&#34;&gt;发布主题与徽标  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#release-theme-and-logo&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;figure class=&#34;release-logo &#34;&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/12/17/kubernetes-v1-35-release/k8s-v1.35.png&#34;
         alt=&#34;Kubernetes v1.35 Timbernetes 徽标：世界树与三只松鼠。&#34;/&gt; 
&lt;/figure&gt;
&lt;!--
2025 began in the shimmer of Octarine: The Color of Magic (v1.33) and rode the gusts Of Wind &amp; Will (v1.34). We close the year with our hands on the World Tree, inspired by Yggdrasil, the tree of life that binds many realms. Like any great tree, Kubernetes grows ring by ring and release by release, shaped by the care of a global community.
--&gt;
&lt;p&gt;2025 年在 Octarine：The Color of Magic（v1.33）的微光中启程，
又乘着 Of Wind &amp;amp; Will（v1.34）的疾风前行。
我们在年末将双手搭在世界树上，灵感来自 Yggdrasil——那棵连接诸多世界的生命之树。
如同所有伟大的树木，Kubernetes 也在全球社区的悉心呵护下，
以年轮为记、以版本为序，不断成长。&lt;/p&gt;
&lt;!--
At its center sits the Kubernetes wheel wrapped around the Earth, grounded by the resilient maintainers, contributors and users who keep showing up. Between day jobs, life changes, and steady open-source stewardship, they prune old APIs, graft new features and keep one of the world’s largest open source projects healthy.
--&gt;
&lt;p&gt;在这棵树的中心，是环抱地球的 Kubernetes 方向盘标。
它之所以稳固，源于那些始终如一的维护者、贡献者与用户。
在本职工作与生活变迁之间，在持续的开源维护之中，
他们修剪旧 API、嫁接新特性，让这个全球最大开源项目之一保持健康。&lt;/p&gt;
&lt;!--
Three squirrels guard the tree: a wizard holding the LGTM scroll for reviewers, a warrior with an axe and Kubernetes shield for the release crews who cut new branches, and a rogue with a lantern for the triagers who bring light to dark issue queues.
--&gt;
&lt;p&gt;三只松鼠守护着这棵树：
为评阅者举起 LGTM 卷轴的法师；
为发布团队挥斧开枝、并举起 Kubernetes 盾牌的战士；
以及为分诊者照亮幽深 Issue 队列的提灯游侠。&lt;/p&gt;
&lt;!--
Together, they stand in for a much larger adventuring party. Kubernetes v1.35 adds another growth ring to the World Tree, a fresh cut shaped by many hands, many paths and a community whose branches reach higher as its roots grow deeper.
--&gt;
&lt;p&gt;它们共同象征着一支规模更大的冒险队伍。
Kubernetes v1.35 为世界树再添一圈年轮——这一道新切面由无数双手、
无数条路径与一个根系更深、枝叶更高的社区共同塑造。&lt;/p&gt;
&lt;!--
## Spotlight on key updates
--&gt;
&lt;h2 id=&#34;spotlight-on-key-updates&#34;&gt;重点更新速览  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#spotlight-on-key-updates&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes v1.35 is packed with new features and improvements. Here are a few select updates the Release Team would like to highlight!
--&gt;
&lt;p&gt;Kubernetes v1.35 带来了大量新特性与改进。下面是发布团队希望重点介绍的几个更新！&lt;/p&gt;
&lt;!--
### Stable: In-place update of Pod resources
--&gt;
&lt;h3 id=&#34;stable-in-place-update-of-pod-resources&#34;&gt;稳定（GA）阶段：Pod 资源原地更新  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#stable-in-place-update-of-pod-resources&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes has graduated in-place updates for Pod resources to General Availability (GA).
--&gt;
&lt;p&gt;Kubernetes 已将 Pod 资源的原地更新特性升级为正式发布（GA）。&lt;/p&gt;
&lt;!--
This feature allows users to adjust CPU and memory resources without restarting Pods or Containers. Previously, such modifications required recreating Pods, which could disrupt workloads, particularly for stateful or batch applications. Earlier Kubernetes releases allowed you to change only infrastructure resource settings (requests and limits) for existing Pods. The new in-place functionality allows for smoother, nondisruptive vertical scaling, improves efficiency, and can also simplify development.
--&gt;
&lt;p&gt;该特性允许用户在不重启 Pod 或容器的情况下，调整 CPU 与内存资源。
此前，这类修改需要重建 Pod，可能会干扰工作负载，尤其是有状态或批处理应用。
更早的 Kubernetes 版本仅允许你为现有 Pod 修改基础设施资源设置（requests 与 limits）。
新的原地更新能力支持更平滑、不中断的纵向扩缩容，提高效率，也能简化开发流程。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #1287](https://kep.k8s.io/1287) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/1287&#34;&gt;KEP #1287&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Beta: Pod certificates for workload identity and security
--&gt;
&lt;h3 id=&#34;beta-pod-certificates-for-workload-identity-and-security&#34;&gt;Beta：用于工作负载身份与安全的 Pod 证书  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#beta-pod-certificates-for-workload-identity-and-security&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Previously, delivering certificates to pods required external controllers (cert-manager, SPIFFE/SPIRE), CRD orchestration, and Secret management, with rotation handled by sidecars or init containers. Kubernetes v1.35 enables native workload identity with automated certificate rotation, drastically simplifying service mesh and zero-trust architectures. 
--&gt;
&lt;p&gt;此前，要向 Pod 下发证书，往往需要外部控制器（cert-manager、SPIFFE/SPIRE）、
CRD 编排以及 Secret 管理，并由边车或 Init 容器负责证书轮换。
Kubernetes v1.35 通过自动化证书轮换，实现原生工作负载身份，
大幅简化服务网格与零信任架构。&lt;/p&gt;
&lt;!--
Now, the `kubelet` generates keys, requests certificates via PodCertificateRequest, and writes credential bundles directly to the Pod&#39;s filesystem. The `kube-apiserver` enforces node restriction at admission time, eliminating the most common pitfall for third-party signers: accidentally violating node isolation boundaries. This enables pure mTLS flows with no bearer tokens in the issuance path.
--&gt;
&lt;p&gt;现在，&lt;code&gt;kubelet&lt;/code&gt; 会生成密钥，通过 PodCertificateRequest 请求证书，
并将凭据包直接写入 Pod 的文件系统。
&lt;code&gt;kube-apiserver&lt;/code&gt; 会在准入阶段强制执行节点限制，
消除第三方签名者最常见的陷阱：无意间突破节点隔离边界。
这使得签发路径中无需持有者令牌即可实现纯双向 TLS 流程。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4317](https://kep.k8s.io/4317) led by SIG Auth.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4317&#34;&gt;KEP #4317&lt;/a&gt; 的一部分，由 SIG Auth 牵头完成。&lt;/p&gt;
&lt;!--
### Alpha: Node declared features before scheduling
--&gt;
&lt;h3 id=&#34;alpha-node-declared-features-before-scheduling&#34;&gt;Alpha：调度前节点声明式特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#alpha-node-declared-features-before-scheduling&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
When control planes enable new features but nodes lag behind (permitted by Kubernetes skew policy), the scheduler can place pods requiring those features onto incompatible older nodes.
--&gt;
&lt;p&gt;当控制平面启用新特性、但节点侧进度滞后时（Kubernetes 版本偏差策略允许这种情况），
调度器可能会将需要这些特性的 Pod 调度到不兼容的旧节点上。&lt;/p&gt;
&lt;!--
The node-declaration features framework allows nodes to declare their supported Kubernetes features. With the new alpha feature enabled, a Node reports the features it supports, publishing this information to the control plane via a new `.status.declaredFeatures` field. Then, the `kube-scheduler`, admission controllers, and third-party components can use these declarations. For example, you can enforce scheduling and API validation constraints to ensure that Pods run only on compatible nodes.
--&gt;
&lt;p&gt;节点声明式特性框架允许节点声明其所支持的 Kubernetes 特性。
启用这一 Alpha 特性后，Node 会通过新的 &lt;code&gt;.status.declaredFeatures&lt;/code&gt; 字段上报其支持的特性，
并将信息发布到控制平面。
随后，&lt;code&gt;kube-scheduler&lt;/code&gt;、准入控制器以及第三方组件都可以使用这些声明。
例如，你可以强制执行调度与 API 校验约束，确保 Pod 只运行在兼容的节点上。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5328](https://kep.k8s.io/5328) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5328&#34;&gt;KEP #5328&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
## Features graduating to Stable
--&gt;
&lt;h2 id=&#34;features-graduating-to-stable&#34;&gt;进入稳定（GA）阶段的特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#features-graduating-to-stable&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
*This is a selection of some of the improvements that are now stable following the v1.35 release.*
--&gt;
&lt;p&gt;&lt;strong&gt;以下列出 v1.35 发布后进入稳定（GA）阶段的一些改进。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
### PreferSameNode traffic distribution
--&gt;
&lt;h3 id=&#34;prefersamenode-traffic-distribution&#34;&gt;PreferSameNode 流量分配  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#prefersamenode-traffic-distribution&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The `trafficDistribution` field for Services has been updated to provide more explicit control over traffic routing. A new option, `PreferSameNode`, has been introduced to let services strictly prioritize endpoints on the local node if available, falling back to remote endpoints otherwise.
--&gt;
&lt;p&gt;Service 的 &lt;code&gt;trafficDistribution&lt;/code&gt; 字段已更新，以便更明确地控制流量路由。
新增选项 &lt;code&gt;PreferSameNode&lt;/code&gt;：在可用时严格优先选择本节点上的端点，
否则再回退到远端端点。&lt;/p&gt;
&lt;!--
Simultaneously, the existing `PreferClose` option has been renamed to `PreferSameZone`. This change makes the API self-explanatory by explicitly indicating that traffic is preferred within the current availability zone. While `PreferClose` is preserved for backward compatibility, `PreferSameZone` is now the standard for zonal routing, ensuring that both node-level and zone-level preferences are clearly distinguished.
--&gt;
&lt;p&gt;同时，现有的 &lt;code&gt;PreferClose&lt;/code&gt; 选项已重命名为 &lt;code&gt;PreferSameZone&lt;/code&gt;。
这一变更让 API 更加直观、自解释：它明确表示优先在当前可用区内选择流量路径。
虽然为了向后兼容仍保留 &lt;code&gt;PreferClose&lt;/code&gt;，但 &lt;code&gt;PreferSameZone&lt;/code&gt; 现在是可用区级别路由的标准选项，
确保“节点级”与“可用区级”的偏好能够清晰区分。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #3015](https://kep.k8s.io/3015) led by SIG Network.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/3015&#34;&gt;KEP #3015&lt;/a&gt; 的一部分，由 SIG Network 牵头完成。&lt;/p&gt;
&lt;!--
### Job API managed-by mechanism
--&gt;
&lt;h3 id=&#34;job-api-managed-by-mechanism&#34;&gt;Job API 的 managed-by 机制  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#job-api-managed-by-mechanism&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The Job API now includes a `managedBy` field that allows an external controller to handle Job status synchronization. This feature, which graduates to stable in Kubernetes v1.35, is primarily driven by [MultiKueue](https://github.com/kubernetes-sigs/kueue/tree/main/keps/693-multikueue), a multi-cluster dispatching system where a Job created in a management cluster is mirrored and executed in a worker cluster, with status updates propagated back. To enable this workflow, the built-in Job controller must not act on a particular Job resource so that the Kueue controller can manage status updates instead.
--&gt;
&lt;p&gt;Job API 新增 &lt;code&gt;managedBy&lt;/code&gt; 字段，允许外部控制器接管 Job 状态同步。
该特性在 Kubernetes v1.35 中进入稳定（GA）阶段，
主要由 &lt;a href=&#34;https://github.com/kubernetes-sigs/kueue/tree/main/keps/693-multikueue&#34;&gt;MultiKueue&lt;/a&gt; 推动。
MultiKueue 是一种多集群分发系统，在管理集群创建的 Job 会被镜像到工作集群执行，并将状态更新回传。
为实现这一工作流，需要让内置 Job 控制器不要处理某个特定 Job 资源，
从而由 Kueue 控制器接管状态更新。&lt;/p&gt;
&lt;!--
The goal is to allow clean delegation of Job synchronization to another controller. It does not aim to pass custom parameters to that controller or modify CronJob concurrency policies.
--&gt;
&lt;p&gt;其目标是让 Job 同步能够清晰地委派给另一个控制器。
它并不意图向该控制器传递自定义参数，也不打算修改 CronJob 的并发策略。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4368](https://kep.k8s.io/4368) led by SIG Apps.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4368&#34;&gt;KEP #4368&lt;/a&gt; 的一部分，由 SIG Apps 牵头完成。&lt;/p&gt;
&lt;!--
### Reliable Pod update tracking with `.metadata.generation`
--&gt;
&lt;h3 id=&#34;reliable-pod-update-tracking-with-metadata-generation&#34;&gt;使用 &lt;code&gt;.metadata.generation&lt;/code&gt; 可靠跟踪 Pod 更新  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#reliable-pod-update-tracking-with-metadata-generation&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Historically, the Pod API lacked the `metadata.generation` field found in other Kubernetes objects such as Deployments.
Because of this omission, controllers and users had no reliable way to verify whether the `kubelet` had actually processed the latest changes to a Pod&#39;s specification. This ambiguity was particularly problematic for features like [In-Place Pod Vertical Scaling](#stable-in-place-update-of-pod-resources), where it was difficult to know exactly when a resource resize request had been enacted.
--&gt;
&lt;p&gt;在历史上，Pod API 缺少 &lt;code&gt;metadata.generation&lt;/code&gt; 字段（其他对象例如 Deployment 具备该字段）。
因此，控制器与用户无法可靠地确认 &lt;code&gt;kubelet&lt;/code&gt; 是否已经处理了 Pod 规约的最新变更。
这种不确定性在诸如&lt;a href=&#34;#stable-in-place-update-of-pod-resources&#34;&gt;Pod 资源原地纵向扩缩容&lt;/a&gt;
等特性中尤为突出，因为很难精确判断资源调整请求何时真正生效。&lt;/p&gt;
&lt;!--
Kubernetes v1.33 added `.metadata.generation` fields for Pods, as an alpha feature. That field is now stable in the v1.35 Pod API, which means that every time a Pod&#39;s `spec` is updated, the `.metadata.generation` value is incremented. As part of this improvement, the Pod API also gained a `.status.observedGeneration` field, which reports the generation that the `kubelet` has successfully seen and processed. Pod conditions also each contain their own individual `observedGeneration` field that clients can report and / or observe.
--&gt;
&lt;p&gt;Kubernetes v1.33 以 Alpha 形式为 Pod 增加了 &lt;code&gt;.metadata.generation&lt;/code&gt; 字段。
在 v1.35 的 Pod API 中，该字段已进入稳定（GA）阶段。
每当更新 Pod 的 &lt;code&gt;spec&lt;/code&gt; 时，&lt;code&gt;.metadata.generation&lt;/code&gt; 的值都会递增。
作为这一改进的一部分，Pod API 还新增了 &lt;code&gt;.status.observedGeneration&lt;/code&gt; 字段，
用于报告 &lt;code&gt;kubelet&lt;/code&gt; 已经成功看到并处理的 generation。
Pod 的各类状况（conditions）也各自包含独立的 &lt;code&gt;observedGeneration&lt;/code&gt; 字段，
客户端可以上报和/或观测这些字段。&lt;/p&gt;
&lt;!--
Because this feature has graduated to stable in v1.35, it is available for all workloads.
--&gt;
&lt;p&gt;由于该特性在 v1.35 进入稳定（GA）阶段，它对所有工作负载可用。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5067](https://kep.k8s.io/5067) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5067&#34;&gt;KEP #5067&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Configurable NUMA node limit for topology manager
--&gt;
&lt;h3 id=&#34;configurable-numa-node-limit-for-topology-manager&#34;&gt;为拓扑管理器提供可配置 NUMA 节点上限  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#configurable-numa-node-limit-for-topology-manager&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The [topology manager](/docs/concepts/policy/node-resource-managers/) historically used a hard-coded limit of 8 for the maximum number of NUMA nodes it can support, preventing state explosion during affinity calculation. (There&#39;s an important detail here; a _NUMA node_ is not the same as a Node in the Kubernetes API.) This limit on the number of NUMA nodes prevented Kubernetes from fully utilizing modern high-end servers, which increasingly feature CPU architectures with more than 8 NUMA nodes.
--&gt;
&lt;p&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/policy/node-resource-managers/&#34;&gt;拓扑管理器&lt;/a&gt;过去使用硬编码上限 8，
作为其可支持的 NUMA 节点最大数量，以避免在亲和性计算期间出现状态爆炸。
这里有个重要细节：NUMA 节点（NUMA node）与 Kubernetes API 中的 Node 并不是同一概念。
这一 NUMA 节点数量上限，限制了 Kubernetes 对现代高端服务器的充分利用，
因为这类服务器越来越常见地采用拥有超过 8 个 NUMA 节点的 CPU 架构。&lt;/p&gt;
&lt;!--
Kubernetes v1.31 introduced a new, **beta** `max-allowable-numa-nodes` option to the topology manager policy configuration. In Kubernetes v1.35, that option is stable. Cluster administrators who enable it can use servers with more than 8 NUMA nodes.
--&gt;
&lt;p&gt;Kubernetes v1.31 为拓扑管理器策略配置引入了新的 &lt;strong&gt;Beta&lt;/strong&gt; 选项&lt;code&gt;max-allowable-numa-nodes&lt;/code&gt;。
在 Kubernetes v1.35 中，该选项已进入稳定（GA）阶段。
启用该选项的集群管理员可以使用拥有超过 8 个 NUMA 节点的服务器。&lt;/p&gt;
&lt;!--
Although the configuration option is stable, the Kubernetes community is aware of the poor performance for large NUMA hosts, and there is a [proposed enhancement](https://kep.k8s.io/5726) (KEP-5726) that aims to improve on it. You can learn more about this by reading [Control Topology Management Policies on a node](/docs/tasks/administer-cluster/topology-manager/).
--&gt;
&lt;p&gt;尽管这一配置选项已进入稳定（GA）阶段，Kubernetes 社区仍注意到在大型 NUMA 主机上性能欠佳，
并提出了旨在改进该问题的&lt;a href=&#34;https://kep.k8s.io/5726&#34;&gt;增强提案&lt;/a&gt;（KEP-5726）。
要了解更多信息，请阅读&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/administer-cluster/topology-manager/&#34;&gt;在节点上控制拓扑管理策略&lt;/a&gt;。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4622](https://kep.k8s.io/4622) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4622&#34;&gt;KEP #4622&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
## New features in Beta
--&gt;
&lt;h2 id=&#34;new-features-in-beta&#34;&gt;Beta 中的新特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#new-features-in-beta&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
*This is a selection of some of the improvements that are now beta following the v1.35 release.*
--&gt;
&lt;p&gt;&lt;strong&gt;以下列出 v1.35 发布后进入 Beta 阶段的一些改进。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
### Expose node topology labels via Downward API
--&gt;
&lt;h3 id=&#34;expose-node-topology-labels-via-downward-api&#34;&gt;通过 Downward API 暴露节点拓扑标签  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#expose-node-topology-labels-via-downward-api&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Accessing node topology information, such as region and zone, from within a Pod has typically required querying the Kubernetes API server. While functional, this approach creates complexity and security risks by necessitating broad RBAC permissions or sidecar containers just to retrieve infrastructure metadata. Kubernetes v1.35 promotes the capability to expose node topology labels directly via the Downward API to beta. 
--&gt;
&lt;p&gt;过去，要在 Pod 内访问节点拓扑信息（例如区域与可用区），通常需要查询 Kubernetes API 服务器。
这种做法虽然可行，但为了获取基础设施元数据，往往需要授予较宽泛的 RBAC 权限，
或引入边车容器，从而带来复杂度与安全风险。
Kubernetes v1.35 将“通过 Downward API 直接暴露节点拓扑标签”的能力提升为 Beta。&lt;/p&gt;
&lt;!--
The `kubelet` can now inject standard topology labels, such as `topology.kubernetes.io/zone` and `topology.kubernetes.io/region`, into Pods as environment variables or projected volume files. The primary benefit is a safer and more efficient way for workloads to be topology-aware. This allows applications to natively adapt to their availability zone or region without dependencies on the API server, strengthening security by upholding the principle of least privilege and simplifying cluster configuration. 
--&gt;
&lt;p&gt;现在，&lt;code&gt;kubelet&lt;/code&gt; 可以将标准拓扑标签（例如 &lt;code&gt;topology.kubernetes.io/zone&lt;/code&gt;
与 &lt;code&gt;topology.kubernetes.io/region&lt;/code&gt;）注入到 Pod 中，
以环境变量或投射卷文件（projected volume files）的形式呈现。
其主要收益是让工作负载以更安全、更高效的方式具备拓扑感知能力。
应用可以在不依赖 API 服务器的情况下原生适配其所在可用区或区域，
通过坚持最小特权原则来增强安全性，并简化集群配置。&lt;/p&gt;
&lt;!--
**Note:** Kubernetes now injects available topology labels to every Pod so that they can be used as inputs to the [downward API](/docs/concepts/workloads/pods/downward-api/). With the v1.35 upgrade, most cluster administrators will see several new labels added to each Pod; this is expected as part of the design.
--&gt;
&lt;p&gt;&lt;strong&gt;说明：&lt;/strong&gt; Kubernetes 现在会为每个 Pod 注入可用的拓扑标签，
使其可以作为 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/pods/downward-api/&#34;&gt;Downward API&lt;/a&gt; 的输入。
升级到 v1.35 后，大多数集群管理员会看到每个 Pod 新增了若干标签；
这是设计的一部分，属于预期行为。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4742](https://kep.k8s.io/4742) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4742&#34;&gt;KEP #4742&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Native support for storage version migration
--&gt;
&lt;h3 id=&#34;native-support-for-storage-version-migration&#34;&gt;存储版本迁移的原生支持  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#native-support-for-storage-version-migration&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
In Kubernetes v1.35, the native support for storage version migration graduates to beta and is enabled by default. This move integrates the migration logic directly into the core Kubernetes control plane (&#34;in-tree&#34;), eliminating the dependency on external tools.
--&gt;
&lt;p&gt;在 Kubernetes v1.35 中，存储版本迁移的原生支持升级为 Beta 并默认启用。
这一改动将迁移逻辑直接集成到 Kubernetes 核心控制平面（in-tree）中，
从而消除对外部工具的依赖。&lt;/p&gt;
&lt;!--
Historically, administrators relied on manual &#34;read/write loops&#34;—often piping `kubectl get` into `kubectl replace`—to update schemas or re-encrypt data at rest. This method was inefficient and prone to conflicts, especially for large resources like Secrets. With this release, the built-in controller automatically handles update conflicts and consistency tokens, providing a safe, streamlined, and reliable way to ensure stored data remains current with minimal operational overhead.
--&gt;
&lt;p&gt;在过去，管理员依赖手工的“读/写循环”（read/write loops），
常见做法是把 &lt;code&gt;kubectl get&lt;/code&gt; 的输出通过管道传给 &lt;code&gt;kubectl replace&lt;/code&gt;，
用来更新资源的模式（Schema）或重新加密静态数据。
这种方式效率低且容易产生冲突，尤其是对 Secret 这类较大的资源更是如此。
在本次发布中，内置控制器会自动处理更新冲突与一致性令牌，
以更安全、简化且可靠的方式确保存储数据保持最新，并将运维开销降到最低。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4192](https://kep.k8s.io/4192) led by SIG API Machinery.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4192&#34;&gt;KEP #4192&lt;/a&gt; 的一部分，由 SIG API Machinery 牵头完成。&lt;/p&gt;
&lt;!--
### Mutable Volume attach limits
--&gt;
&lt;h3 id=&#34;mutable-volume-attach-limits&#34;&gt;可变更的卷挂接上限  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#mutable-volume-attach-limits&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
A CSI (Container Storage Interface) driver is a Kubernetes plugin that provides a consistent way for storage systems to be exposed to containerized workloads. The `CSINode` object records details about all CSI drivers installed on a node. However, a mismatch can arise between the reported and actual attachment capacity on nodes. When volume slots are consumed after a CSI driver starts up, the `kube-scheduler` may assign stateful pods to nodes without sufficient capacity, ultimately getting stuck in a `ContainerCreating` state.
--&gt;
&lt;p&gt;CSI（Container Storage Interface）驱动是 Kubernetes 插件，
为存储系统向容器化工作负载暴露能力提供一致的方式。
&lt;code&gt;CSINode&lt;/code&gt; 对象会记录节点上安装的所有 CSI 驱动的详细信息。
不过，节点上报告的挂接容量与实际挂接容量可能出现不一致：
当 CSI 驱动启动后卷槽位被消耗时，&lt;code&gt;kube-scheduler&lt;/code&gt; 可能把有状态 Pod
调度到挂接容量不足的节点上，最终卡在 &lt;code&gt;ContainerCreating&lt;/code&gt; 状态。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 makes `CSINode.spec.drivers[*].allocatable.count` mutable so that a node’s available volume attachment capacity can be updated dynamically. It also allows CSI drivers to control how frequently the `allocatable.count` value is updated on all nodes by introducing a configurable refresh interval, defined through the `CSIDriver` object. Additionally, it automatically updates `CSINode.spec.drivers[*].allocatable.count` on detecting a failure in volume attachment due to insufficient capacity. Although this feature graduated to beta in v1.34 with the feature flag `MutableCSINodeAllocatableCount` disabled by default, it remains in beta for v1.35 to allow time for feedback, but the feature flag is enabled by default.
--&gt;
&lt;p&gt;Kubernetes v1.35 使 &lt;code&gt;CSINode.spec.drivers[*].allocatable.count&lt;/code&gt; 可变更，
以便动态更新节点可用的卷挂接容量。它还通过 &lt;code&gt;CSIDriver&lt;/code&gt; 对象引入可配置的刷新间隔，
允许 CSI 驱动控制在所有节点上更新 &lt;code&gt;allocatable.count&lt;/code&gt; 值的频率。
此外，当检测到因容量不足导致的卷挂接失败时，
它会自动更新 &lt;code&gt;CSINode.spec.drivers[*].allocatable.count&lt;/code&gt;。
尽管该特性在 v1.34 中已升级为 Beta，
但当时特性门控 &lt;code&gt;MutableCSINodeAllocatableCount&lt;/code&gt; 默认关闭；
在 v1.35 中它仍处于 Beta，以便留出反馈时间，同时该特性门控默认启用。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4876](https://kep.k8s.io/4876) led by SIG Storage.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4876&#34;&gt;KEP #4876&lt;/a&gt; 的一部分，由 SIG Storage 牵头完成。&lt;/p&gt;
&lt;!--
### Opportunistic batching
--&gt;
&lt;h3 id=&#34;opportunistic-batching&#34;&gt;机会式批处理  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#opportunistic-batching&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Historically, the Kubernetes scheduler processes pods sequentially with time complexity of `O(num pods × num nodes)`, which can result in redundant computation for compatible pods. This KEP introduces an opportunistic batching mechanism that aims to improve performance by identifying such compatible Pods via `Pod scheduling signature` and batching them together, allowing shared filtering and scoring results across them.
--&gt;
&lt;p&gt;在过去，Kubernetes 调度器按顺序处理 Pod，其时间复杂度为 &lt;code&gt;O(Pod 个数 × 节点个数)&lt;/code&gt;，
这会导致对“可兼容 Pod”执行重复计算。此 KEP 引入一种机会式批处理机制，
旨在通过 &lt;code&gt;Pod scheduling signature&lt;/code&gt; 识别这类可兼容 Pod 并将它们批量处理，
从而在这些 Pod 之间共享过滤与打分结果以提升性能。&lt;/p&gt;
&lt;!--
The pod scheduling signature ensures that two pods with the same signature are “the same” from a scheduling perspective. It takes into account not only the pod and node attributes, but also the other pods in the system and global data about the pod placement. This means that any pod with the given signature will get the same scores/feasibility results from any arbitrary set of nodes.
--&gt;
&lt;p&gt;**Pod 调度签名（Pod Scheduling Signature）**机制确保从调度视角看，具有相同签名的两个 Pod 是“相同的”。
它不仅会考虑 Pod 与节点属性，还会纳入系统中的其他 Pod 以及有关放置的全局数据。
这意味着：具有给定签名的任意 Pod，在任意一组节点上都会得到相同的打分/可行性判断结果。&lt;/p&gt;
&lt;!--
The batching mechanism consists of two operations that can be invoked whenever needed - *create* and *nominate*. Create leads to the creation of a new set of batch information from the scheduling results of Pods that have a valid signature. Nominate uses the batching information from create to set the nominated node name from a new Pod whose signature matches the canonical Pod’s signature.
--&gt;
&lt;p&gt;该批处理机制包含两个可按需调用的操作：&lt;em&gt;create&lt;/em&gt; 与 &lt;em&gt;nominate&lt;/em&gt;。
create 会基于具有有效签名的 Pod 的调度结果，创建一组新的批处理信息。
nominate 会使用 create 生成的批处理信息，
为一个新 Pod（其签名与规范 Pod 的签名一致）设置提名的节点名称。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5598](https://kep.k8s.io/5598) led by SIG Scheduling.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5598&#34;&gt;KEP #5598&lt;/a&gt; 的一部分，由 SIG Scheduling 牵头完成。&lt;/p&gt;
&lt;!--
### `maxUnavailable` for StatefulSets
--&gt;
&lt;h3 id=&#34;maxunavailable-for-statefulsets&#34;&gt;StatefulSet 的 &lt;code&gt;maxUnavailable&lt;/code&gt;  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#maxunavailable-for-statefulsets&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
A StatefulSet runs a group of Pods and maintains a sticky identity for each of those Pods. This is critical for stateful workloads requiring stable network identifiers or persistent storage. When a StatefulSet&#39;s `.spec.updateStrategy.&lt;type&gt;` is set to `RollingUpdate`, the StatefulSet controller will delete and recreate each Pod in the StatefulSet. It will proceed in the same order as Pod termination (from the largest ordinal to the smallest), updating each Pod one at a time.
--&gt;
&lt;p&gt;StatefulSet 运行一组 Pod，并为其中每个 Pod 维护粘性身份（Sticky Identity）。
这对需要稳定网络标识符或持久存储的有状态工作负载至关重要。
当 StatefulSet 的 &lt;code&gt;.spec.updateStrategy.&amp;lt;type&amp;gt;&lt;/code&gt; 设置为 &lt;code&gt;RollingUpdate&lt;/code&gt; 时，
StatefulSet 控制器会删除并重建 StatefulSet 中的每个 Pod。
它会按 Pod 终止的顺序（从最大序号到最小序号）推进，一次只更新一个 Pod。&lt;/p&gt;
&lt;!--
Kubernetes v1.24 added a new **alpha** field to a StatefulSet&#39;s `rollingUpdate` configuration settings, called `maxUnavailable`. That field wasn&#39;t part of the Kubernetes API unless your cluster administrator explicitly opted in.
In Kubernetes v1.35 that field is beta and is available by default. You can use it to define the maximum number of pods that can be unavailable during an update. This setting is most effective in combination with `.spec.podManagementPolicy` set to Parallel.  You can set `maxUnavailable` as either a positive number (example: 2) or a percentage of the desired number of Pods (example: 10%). If this field is not specified, it will default to 1, to maintain the previous behavior of only updating one Pod at a time. This improvement allows stateful applications (that can tolerate more than one Pod being down) to finish updating faster.
--&gt;
&lt;p&gt;Kubernetes v1.24 在 StatefulSet 的 &lt;code&gt;rollingUpdate&lt;/code&gt; 配置中新增了一个 &lt;strong&gt;Alpha&lt;/strong&gt; 字段
&lt;code&gt;maxUnavailable&lt;/code&gt;，除非你的集群管理员显式选择启用，
否则该字段不会出现在 Kubernetes API 中。
在 Kubernetes v1.35 中，该字段升级为 Beta 且默认可用。
你可以用它定义更新期间最多允许不可用的 Pod 数量。
该设置与将 &lt;code&gt;.spec.podManagementPolicy&lt;/code&gt; 设为 Parallel 组合使用时最有效。
你可以把 &lt;code&gt;maxUnavailable&lt;/code&gt; 设置为一个正整数（例如：2），
或设置为期望 Pod 数量的百分比（例如：10%）。
如果未指定该字段，它默认为 1，以保持此前“一次只更新一个 Pod”的行为。
这一改进使有状态应用（可容忍多个 Pod 同时不可用）能够更快完成更新。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #961](https://kep.k8s.io/961) led by SIG Apps.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/961&#34;&gt;KEP #961&lt;/a&gt; 的一部分，由 SIG Apps 牵头完成。&lt;/p&gt;
&lt;!--
### Configurable credential plugin policy in `kuberc`
--&gt;
&lt;h3 id=&#34;configurable-credential-plugin-policy-in-kuberc&#34;&gt;&lt;code&gt;kuberc&lt;/code&gt; 中可配置的凭据插件策略  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#configurable-credential-plugin-policy-in-kuberc&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The optional [`kuberc` file](/docs/reference/kubectl/kuberc/) is a way to separate server configurations and cluster credentials from user preferences without disrupting already running CI pipelines with unexpected outputs.
--&gt;
&lt;p&gt;可选的 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/kubectl/kuberc/&#34;&gt;&lt;code&gt;kuberc&lt;/code&gt; 文件&lt;/a&gt;
用于将服务器配置与集群凭据和用户偏好相分离，而不会因意外输出而打断已经在运行的 CI 流水线。&lt;/p&gt;
&lt;!--
As part of the v1.35 release, `kuberc` gains additional functionality which allows users to configure credential plugin policy. This change introduces two fields `credentialPluginPolicy`, which allows or denies all plugins, and allows specifying a list of allowed plugins using `credentialPluginAllowlist`.
--&gt;
&lt;p&gt;作为 v1.35 发布的一部分，&lt;code&gt;kuberc&lt;/code&gt; 增加了允许用户配置凭据插件策略的能力。
此变更引入两个字段：&lt;code&gt;credentialPluginPolicy&lt;/code&gt;（允许或拒绝所有插件），
以及 &lt;code&gt;credentialPluginAllowlist&lt;/code&gt;（允许指定允许插件的列表）。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #3104](https://kep.k8s.io/3104) as a cooperation between SIG Auth and SIG CLI.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/3104&#34;&gt;KEP #3104&lt;/a&gt; 的一部分，
由 SIG Auth 与 SIG CLI 协作完成。&lt;/p&gt;
&lt;!--
### KYAML
--&gt;
&lt;h3 id=&#34;kyaml&#34;&gt;KYAML  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kyaml&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
YAML is a human-readable format of data serialization. In Kubernetes, YAML files are used to define and configure resources, such as Pods, Services, and Deployments. However, complex YAML is difficult to read. YAML&#39;s significant whitespace requires careful attention to indentation and nesting, while its optional string-quoting can lead to unexpected type coercion (see: The Norway Bug). While JSON is an alternative, it lacks support for comments and has strict requirements for trailing commas and quoted keys.
--&gt;
&lt;p&gt;YAML 是一种便于人类阅读的数据序列化格式。
在 Kubernetes 中，YAML 文件用于定义与配置资源，例如 Pod、Service 与 Deployment。
不过，复杂 YAML 很难阅读：YAML 对缩进与嵌套要求严格；
同时，其可选的字符串引用也可能导致意外的类型强制转换（参见：The Norway Bug）。
虽然 JSON 可以作为一种替代方案，但它不支持注释，并对尾随逗号与键的引号有严格要求。&lt;/p&gt;
&lt;!--
KYAML is a safer and less ambiguous subset of YAML designed specifically for Kubernetes. Introduced as an opt-in alpha feature in v1.34, this feature graduated to beta in Kubernetes v1.35 and has been enabled by default. It can be disabled by setting the environment variable `KUBECTL_KYAML=false`. 
--&gt;
&lt;p&gt;KYAML 是专为 Kubernetes 设计的、更安全且更少歧义的 YAML 子集。
它在 v1.34 作为可选的 Alpha 特性引入，
并在 Kubernetes v1.35 升级为 Beta 且默认启用。
你可以通过设置环境变量 &lt;code&gt;KUBECTL_KYAML=false&lt;/code&gt; 来禁用它。&lt;/p&gt;
&lt;!--
KYAML addresses challenges pertaining to both YAML and JSON. All KYAML files are also valid YAML files. This means you can write KYAML and pass it as an input to any version of kubectl. This also means that you don’t need to write in strict KYAML for the input to be parsed.
--&gt;
&lt;p&gt;KYAML 旨在解决 YAML 与 JSON 的一些共性挑战。
所有 KYAML 文件也都是合法的 YAML 文件，
这意味着你可以编写 KYAML 并将其作为输入提供给任意版本的 kubectl。
这也意味着，即使输入并非严格 KYAML，也仍然可以被解析。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5295](https://kep.k8s.io/5295) led by SIG CLI.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5295&#34;&gt;KEP #5295&lt;/a&gt; 的一部分，由 SIG CLI 牵头完成。&lt;/p&gt;
&lt;!--
### Configurable tolerance for HorizontalPodAutoscalers
--&gt;
&lt;h3 id=&#34;configurable-tolerance-for-horizontalpodautoscalers&#34;&gt;可配置的 HorizontalPodAutoscalers 容忍度  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#configurable-tolerance-for-horizontalpodautoscalers&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The Horizontal Pod Autoscaler (HPA) has historically relied on a fixed, global 10% tolerance for scaling actions. A drawback of this hardcoded value was that workloads requiring high sensitivity, such as those needing to scale on a 5% load increase, were often blocked from scaling, while others might oscillate unnecessarily.
--&gt;
&lt;p&gt;水平 Pod 自动扩缩容器（Horizontal Pod Autoscaler，HPA）长期依赖固定的全局 10% 容忍度来执行扩缩容。
这一硬编码值的缺点是：对需要高灵敏度的工作负载（例如希望在负载增加 5% 时就扩容）不够友好，
这些工作负载常常无法触发扩缩容；而另一些工作负载则可能产生不必要的振荡。&lt;/p&gt;
&lt;!--
With Kubernetes v1.35, the configurable tolerance feature graduates to beta and is enabled by default. This enhancement allows users to define a custom tolerance window on a per-resource basis within the HPA `behavior` field. By setting a specific tolerance (e.g., lowering it to 0.05 for 5%), operators gain precise control over autoscaling sensitivity, ensuring that critical workloads react quickly to small metric changes, without requiring cluster-wide configuration adjustments.
--&gt;
&lt;p&gt;在 Kubernetes v1.35 中，“可配置容忍度”特性升级为 Beta 并默认启用。
该增强允许用户在 HPA 的 &lt;code&gt;behavior&lt;/code&gt; 字段中，按资源粒度定义自定义容忍窗口。
通过设置特定容忍度（例如将其降低到 0.05 来表示 5%），运维人员可以更精确地控制自动扩缩容灵敏度，
确保关键工作负载能对小幅指标变化快速响应，而无需进行集群范围的配置调整。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4951](https://kep.k8s.io/4951) led by SIG Autoscaling.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4951&#34;&gt;KEP #4951&lt;/a&gt; 的一部分，由 SIG Autoscaling 牵头完成。&lt;/p&gt;
&lt;!--
### Support for user namespaces in Pods
--&gt;
&lt;h3 id=&#34;support-for-user-namespaces-in-pods&#34;&gt;Pod 中的用户命名空间支持  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#support-for-user-namespaces-in-pods&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes is adding support for user namespaces, allowing pods to run with isolated user and group ID mappings instead of sharing host IDs. This means containers can operate as root internally while actually being mapped to an unprivileged user on the host, reducing the risk of privilege escalation in the event of a compromise. The feature improves pod-level security and makes it safer to run workloads that need root inside the container. Over time, support has expanded to both stateless and stateful Pods through id-mapped mounts.
--&gt;
&lt;p&gt;Kubernetes 增加了对用户命名空间（user namespaces）的支持，
使 Pod 可以使用相互隔离的用户/组 ID 映射运行，而不是共享主机上的 ID。
这意味着容器在内部可以以 root 身份运行，
但在主机上实际映射为一个非特权用户，从而在发生入侵时降低提权风险。
该特性提升了 Pod 级别的安全性，使需要在容器内使用 root 的工作负载更安全。
随着时间推移，该能力也通过 ID 映射挂载（id-mapped mounts）扩展到无状态与有状态 Pod。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #127](https://kep.k8s.io/127) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/127&#34;&gt;KEP #127&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### VolumeSource: OCI artifact and/or image
--&gt;
&lt;h3 id=&#34;volumesource-oci-artifact-andor-image&#34;&gt;VolumeSource：OCI 工件和/或镜像  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#volumesource-oci-artifact-andor-image&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
When creating a Pod, you often need to provide data, binaries, or configuration files for your containers. This meant including the content into the main container image or using a custom init container to download and unpack files into an `emptyDir`. Both these approaches are still valid. Kubernetes v1.31 added support for the `image` volume type allowing Pods to declaratively pull and unpack OCI container image artifacts into a volume. This lets you package and deliver data-only artifacts such as configs, binaries, or machine learning models using standard OCI registry tools.
--&gt;
&lt;p&gt;在创建 Pod 时，你常常需要为容器提供数据、二进制文件或配置文件。
这通常意味着要么把内容打进主容器镜像，要么使用自定义 Init 容器下载并解包到 &lt;code&gt;emptyDir&lt;/code&gt; 中。
这两种方式仍然有效。Kubernetes v1.31 增加了对 &lt;code&gt;image&lt;/code&gt; 卷类型的支持，
允许 Pod 以声明的方式拉取并将 OCI 容器镜像工件解包到卷中。
这使你可以使用标准 OCI 镜像库工具来打包与分发纯数据工件，例如配置、二进制文件或机器学习模型。&lt;/p&gt;
&lt;!--
With this feature, you can fully separate your data from your container image and remove the need for extra init containers or startup scripts. The image volume type has been in beta since v1.33 and is enabled by default in v1.35. Please note that using this feature requires a compatible container runtime, such as containerd v2.1 or later.
--&gt;
&lt;p&gt;借助该特性，你可以将数据与容器镜像彻底分离，并去除额外 Init 容器或启动脚本的需求。
image 卷类型自 v1.33 起处于 Beta，并在 v1.35 中默认启用。
请注意，使用该特性需要兼容的容器运行时，例如 containerd v2.1 或更高版本。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4639](https://kep.k8s.io/4639) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4639&#34;&gt;KEP #4639&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Enforced `kubelet` credential verification for cached images
--&gt;
&lt;h3 id=&#34;enforced-kubelet-credential-verification-for-cached-images&#34;&gt;对缓存镜像强制执行 &lt;code&gt;kubelet&lt;/code&gt; 凭据校验  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#enforced-kubelet-credential-verification-for-cached-images&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The `imagePullPolicy: IfNotPresent` setting currently allows a Pod to use a container image that is already cached on a node, even if the Pod itself does not possess the credentials to pull that image. A drawback of this behavior is that it creates a security vulnerability in multi-tenant clusters: if a Pod with valid credentials pulls a sensitive private image to a node, a subsequent unauthorized Pod on the same node can access that image simply by relying on the local cache.
--&gt;
&lt;p&gt;当前，&lt;code&gt;imagePullPolicy: IfNotPresent&lt;/code&gt; 允许 Pod 使用节点上已经缓存的容器镜像，
即使 Pod 本身并不具备拉取该镜像所需的凭据。这种行为在多租户集群中会带来安全漏洞：
如果某个具备有效凭据的 Pod 把敏感的私有镜像拉取到某节点上，
同一节点上后续的未授权 Pod 只需依赖本地缓存就能访问该镜像。&lt;/p&gt;
&lt;!--
This KEP introduces a mechanism where the `kubelet` enforces credential verification for cached images. Before allowing a Pod to use a locally cached image, the `kubelet` checks if the Pod has the valid credentials to pull it. This ensures that only authorized workloads can use private images, regardless of whether they are already present on the node, significantly hardening the security posture for shared clusters.
--&gt;
&lt;p&gt;此 KEP 引入一种机制：由 &lt;code&gt;kubelet&lt;/code&gt; 对缓存镜像强制执行凭据校验。
在允许 Pod 使用本地缓存镜像之前，&lt;code&gt;kubelet&lt;/code&gt; 会检查 Pod 是否具备拉取该镜像的有效凭据。
这确保只有经授权的工作负载才能使用私有镜像，
无论该镜像是否已经存在于节点上，从而显著增强共享集群的安全性。&lt;/p&gt;
&lt;!--
In Kubernetes v1.35, this feature has graduated to beta and is enabled by default. Users can still disable it by setting the `KubeletEnsureSecretPulledImages` feature gate to false. Additionally, the `imagePullCredentialsVerificationPolicy` flag allows operators to configure the desired security level, ranging from a mode that prioritizes backward compatibility to a strict enforcement mode that offers maximum security.
--&gt;
&lt;p&gt;在 Kubernetes v1.35 中，该特性升级为 Beta 并默认启用。
用户仍可将 &lt;code&gt;KubeletEnsureSecretPulledImages&lt;/code&gt; 特性门控设为 false 来禁用它。
此外，&lt;code&gt;imagePullCredentialsVerificationPolicy&lt;/code&gt; 参数允许运维人员配置期望的安全级别，
从优先保证向后兼容的模式到提供最高安全性的严格强制模式不等。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #2535](https://kep.k8s.io/2535) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/2535&#34;&gt;KEP #2535&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### Fine-grained Container restart rules
--&gt;
&lt;h3 id=&#34;fine-grained-container-restart-rules&#34;&gt;细粒度的容器重启规则  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#fine-grained-container-restart-rules&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Historically, the `restartPolicy` field was defined strictly at the Pod level, forcing the same behavior on all containers within a Pod. A drawback of this global setting was the lack of granularity for complex workloads, such as AI/ML training jobs. These often required `restartPolicy: Never` for the Pod to manage job completion, yet individual containers would benefit from in-place restarts for specific, retriable errors (like network glitches or GPU init failures).
--&gt;
&lt;p&gt;在过去，&lt;code&gt;restartPolicy&lt;/code&gt; 字段只能在 Pod 级别定义，从而强制 Pod 内所有容器采用相同行为。
这一全局设置对复杂工作负载（例如 AI/ML 训练作业）缺乏足够的粒度。
这类作业往往需要 Pod 使用 &lt;code&gt;restartPolicy: Never&lt;/code&gt; 以管理作业完成，
但某些容器仍希望能针对可重试的特定错误（如网络抖动或 GPU 初始化失败）执行原地重启。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 addresses this by enabling `restartPolicy` and `restartPolicyRules` within the container API itself. This allows users to define restart strategies for individual regular and init containers that operate independently of the Pod&#39;s overall policy. For example, a container can now be configured to restart automatically only if it exits with a specific error code, avoiding the expensive overhead of rescheduling the entire Pod for a transient failure.
--&gt;
&lt;p&gt;Kubernetes v1.35 通过在容器 API 本身中启用 &lt;code&gt;restartPolicy&lt;/code&gt; 与 &lt;code&gt;restartPolicyRules&lt;/code&gt;
来解决这一问题。这允许用户为单个普通容器与 Init 容器定义重启策略，
并使其与 Pod 的整体策略相互独立。例如，你可以将容器配置为仅在以特定错误码退出时才自动重启，
从而避免因短暂故障而重调度整个 Pod 的昂贵开销。&lt;/p&gt;
&lt;!--
In this release, the feature has graduated to beta and is enabled by default. Users can immediately leverage `restartPolicyRules` in their container specifications to optimize recovery times and resource utilization for long-running workloads, without altering the broader lifecycle logic of their Pods.
--&gt;
&lt;p&gt;在本次发布中，该特性升级为 Beta 并默认启用。用户可以立即在容器规约中使用 &lt;code&gt;restartPolicyRules&lt;/code&gt;，
为长时间运行的工作负载优化恢复时间与资源利用率，而无需改变 Pod 更宏观的生命周期逻辑。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5307](https://kep.k8s.io/5307) led by SIG Node.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5307&#34;&gt;KEP #5307&lt;/a&gt; 的一部分，由 SIG Node 牵头完成。&lt;/p&gt;
&lt;!--
### CSI driver opt-in for service account tokens via secrets field
--&gt;
&lt;h3 id=&#34;csi-driver-opt-in-for-service-account-tokens-via-secrets-field&#34;&gt;CSI 驱动可选择通过 secrets 字段获取 ServiceAccount 令牌  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#csi-driver-opt-in-for-service-account-tokens-via-secrets-field&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Providing ServiceAccount tokens to Container Storage Interface (CSI) drivers has traditionally relied on injecting them into the `volume_context` field. This approach presents a significant security risk because `volume_context` is intended for non-sensitive configuration data and is frequently logged in plain text by drivers and debugging tools, potentially leaking credentials.
--&gt;
&lt;p&gt;在向 CSI（Container Storage Interface）驱动提供 ServiceAccount 令牌时，
传统上依赖把令牌注入到 &lt;code&gt;volume_context&lt;/code&gt; 字段中。
这种方式存在显著安全风险：&lt;code&gt;volume_context&lt;/code&gt; 主要用于非敏感配置数据，
并且常被驱动与调试工具以明文形式记录到日志中，从而可能泄露凭据。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 introduces an opt-in mechanism for CSI drivers to receive ServiceAccount tokens via the dedicated secrets field in the NodePublishVolume request. Drivers can now enable this behavior by setting the `serviceAccountTokenInSecrets` field to true in their CSIDriver object, instructing the `kubelet` to populate the token securely.
--&gt;
&lt;p&gt;Kubernetes v1.35 引入一套可选择启用的机制，
让 CSI 驱动通过 NodePublishVolume 请求中的专用 secrets 字段获取 ServiceAccount 令牌。
驱动现在可以在其 CSIDriver 对象中将 &lt;code&gt;serviceAccountTokenInSecrets&lt;/code&gt; 设为 true 来启用此行为，
从而指示 &lt;code&gt;kubelet&lt;/code&gt; 以更安全的方式填充该令牌。&lt;/p&gt;
&lt;!--
The primary benefit is the prevention of accidental credential exposure in logs and error messages. This change ensures that sensitive workload identities are handled via the appropriate secure channels, aligning with best practices for secret management while maintaining backward compatibility for existing drivers.
--&gt;
&lt;p&gt;其主要收益是防止凭据在日志与错误信息中被意外暴露。
这一变更确保敏感的工作负载身份通过合适的安全通道处理，
在保持对既有驱动向后兼容的同时，也更符合密文管理最佳实践。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5538](https://kep.k8s.io/5538) led by SIG Auth in cooperation with SIG Storage.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5538&#34;&gt;KEP #5538&lt;/a&gt; 的一部分，
由 SIG Auth 牵头并与 SIG Storage 协作完成。&lt;/p&gt;
&lt;!--
### Deployment status: count of terminating replicas
--&gt;
&lt;h3 id=&#34;deployment-status-count-of-terminating-replicas&#34;&gt;Deployment 状态：正在终止的副本计数  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deployment-status-count-of-terminating-replicas&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Historically, the Deployment status provided details on available and updated replicas but lacked explicit visibility into Pods that were in the process of shutting down. A drawback of this omission was that users and controllers could not easily distinguish between a stable Deployment and one that still had Pods executing cleanup tasks or adhering to long grace periods.
--&gt;
&lt;p&gt;在过去，Deployment 状态会提供可用副本与已更新副本的详细信息，
但缺少对“正在关闭过程中的 Pod”的明确可见性。
这一缺失使用户与控制器难以区分“稳定的 Deployment”与“仍有 Pod 正在执行清理任务或处于较长优雅终止期”的 Deployment。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 promotes the `terminatingReplicas` field within the Deployment status to beta. This field provides a count of Pods that have a deletion timestamp set but have not yet been removed from the system. This feature is a foundational step in a larger initiative to improve how Deployments handle Pod replacement, laying the groundwork for future policies regarding when to create new Pods during a rollout.
--&gt;
&lt;p&gt;Kubernetes v1.35 将 Deployment 状态中的 &lt;code&gt;terminatingReplicas&lt;/code&gt; 字段提升为 Beta。
该字段提供已设置删除时间戳但尚未从系统移除的 Pod 数量。该特性是一个更大计划中的基础一步，
旨在改进 Deployment 如何处理 Pod 替换，并为未来制定“在滚动发布期间何时创建新 Pod”的策略奠定基础。&lt;/p&gt;
&lt;!--
The primary benefit is improved observability for lifecycle management tools and operators. By exposing the number of terminating Pods, external systems can now make more informed decisions such as waiting for a complete shutdown before proceeding with subsequent tasks without needing to manually query and filter individual Pod lists.
--&gt;
&lt;p&gt;其主要收益是提升生命周期管理工具与运维人员的可观测性。
通过公开正在终止的 Pod 数量，可以让外部系统做出更明智的决策，
例如在继续后续任务之前等待完全关闭，而无需手工查询并筛选各个 Pod 的列表。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #3973](https://kep.k8s.io/3973) led by SIG Apps.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/3973&#34;&gt;KEP #3973&lt;/a&gt; 的一部分，由 SIG Apps 牵头完成。&lt;/p&gt;
&lt;!--
## New features in Alpha
--&gt;
&lt;h2 id=&#34;new-features-in-alpha&#34;&gt;Alpha 阶段的新特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#new-features-in-alpha&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
*This is a selection of some of the improvements that are now alpha following the v1.35 release.*
--&gt;
&lt;p&gt;&lt;strong&gt;以下列出 v1.35 发布后进入 Alpha 阶段的一些改进。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
### Gang scheduling support in Kubernetes
--&gt;
&lt;h3 id=&#34;gang-scheduling-support-in-kubernetes&#34;&gt;Kubernetes 中的 Gang 调度支持  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#gang-scheduling-support-in-kubernetes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Scheduling interdependent workloads, such as AI/ML training jobs or HPC simulations, has traditionally been challenging because the default Kubernetes scheduler places Pods individually. This often leads to partial scheduling where some Pods start while others wait indefinitely for resources, resulting in deadlocks and wasted cluster capacity.
--&gt;
&lt;p&gt;对相互依赖的工作负载（例如 AI/ML 训练作业或 HPC 仿真）进行调度，
传统上一直很有挑战性，因为默认的 Kubernetes 调度器会逐个调度 Pod。
这常导致“部分调度”：部分 Pod 已启动，而其他 Pod 由于资源不足无限期等待，
从而引发死锁并浪费集群容量。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 introduces native support for so-called &#34;gang scheduling&#34; via the new Workload API and PodGroup concept. This feature implements an &#34;all-or-nothing&#34; scheduling strategy, ensuring that a defined group of Pods is scheduled only if the cluster has sufficient resources to accommodate the entire group simultaneously.
--&gt;
&lt;p&gt;Kubernetes v1.35 通过新的 Workload API 与 PodGroup 概念，
引入对所谓成组调度（Gang Scheduling）的原生支持。
该特性实现“全有或全无”的调度策略：只有当集群有足够资源同时容纳整个 Pod 组时，才会对该组进行调度。&lt;/p&gt;
&lt;!--
The primary benefit is improved reliability and efficiency for batch and parallel workloads. By preventing partial deployments, it eliminates resource deadlocks and ensures that expensive cluster capacity is utilized only when a complete job can run, significantly optimizing the orchestration of large-scale data processing tasks.
--&gt;
&lt;p&gt;其主要收益是提升批处理与并行工作负载的可靠性与效率。通过避免部分部署，它消除了资源死锁，
并确保昂贵的集群容量只在能够运行完整作业时才会被使用，从而显著优化大规模数据处理任务的编排。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4671](https://kep.k8s.io/4671) led by SIG Scheduling.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4671&#34;&gt;KEP #4671&lt;/a&gt; 的一部分，由 SIG Scheduling 牵头完成。&lt;/p&gt;
&lt;!--
### Constrained impersonation
--&gt;
&lt;h3 id=&#34;constrained-impersonation&#34;&gt;受限的身份扮演（Impersonation）  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#constrained-impersonation&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Historically, the `impersonate` verb in Kubernetes RBAC functioned on an all-or-nothing basis: once a user was authorized to impersonate a target identity, they gained all associated permissions. A drawback of this broad authorization was that it violated the principle of least privilege, preventing administrators from restricting impersonators to specific actions or resources.
--&gt;
&lt;p&gt;在过去，Kubernetes RBAC 中的 &lt;code&gt;impersonate&lt;/code&gt; 动词按“全有或全无”运作：
一旦用户被授权可以扮演某个目标身份，就会获得该身份所关联的全部权限。
这种宽泛授权的缺点是违背最小特权原则，使管理员难以将模拟者的权限限制到特定动作或特定资源上。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 introduces a new alpha feature, constrained impersonation, which adds a secondary authorization check to the impersonation flow. When enabled via the `ConstrainedImpersonation` feature gate, the API server verifies not only the basic `impersonate` permission but also checks if the impersonator is authorized for the specific action using new verb prefixes (e.g., `impersonate-on:&lt;mode&gt;:&lt;verb&gt;`). This allows administrators to define fine-grained policies—such as permitting a support engineer to impersonate a cluster admin solely to view logs, without granting full administrative access.
--&gt;
&lt;p&gt;Kubernetes v1.35 引入一个新的 Alpha 特性：受限的身份扮演（Constrained Impersonation），
它在身份扮演流程中增加一次二次鉴权检查。当 &lt;code&gt;ConstrainedImpersonation&lt;/code&gt; 特性门控被启用后，
API 服务器不仅会校验基础的 &lt;code&gt;impersonate&lt;/code&gt; 权限，还会使用新的动词前缀（例如 &lt;code&gt;impersonate-on:&amp;lt;mode&amp;gt;:&amp;lt;verb&amp;gt;&lt;/code&gt;）
检查身份扮演者是否被授权执行特定动作。
这使管理员可以定义细粒度策略——例如允许支持工程师模拟集群管理员仅用于查看日志，
而不授予完整的管理员访问权限。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5284](https://kep.k8s.io/5284) led by SIG Auth.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5284&#34;&gt;KEP #5284&lt;/a&gt; 的一部分，由 SIG Auth 牵头完成。&lt;/p&gt;
&lt;!--
### Flagz for Kubernetes components
--&gt;
&lt;h3 id=&#34;flagz-for-kubernetes-components&#34;&gt;Kubernetes 组件的 Flagz  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#flagz-for-kubernetes-components&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Verifying the runtime configuration of Kubernetes components, such as the API server or `kubelet`, has traditionally required privileged access to the host node or process arguments. To address this, the `/flagz` endpoint was introduced to expose command-line options via HTTP. However, its output was initially limited to plain text, making it difficult for automated tools to parse and validate configurations reliably.
--&gt;
&lt;p&gt;在过去，要验证 Kubernetes 组件（例如 API 服务器或 &lt;code&gt;kubelet&lt;/code&gt;）的运行时配置，
通常需要对宿主机节点或进程参数具有特权访问权限。
为解决这一问题，引入了 &lt;code&gt;/flagz&lt;/code&gt; 端点，通过 HTTP 公开其命令行选项。
但其最初输出仅为纯文本，使自动化工具难以可靠地解析并校验配置。&lt;/p&gt;
&lt;!--
In Kubernetes v1.35, the `/flagz` endpoint has been enhanced to support structured, machine-readable JSON output. Authorized users can now request a versioned JSON response using standard HTTP content negotiation, while the original plain text format remains available for human inspection. This update significantly improves observability and compliance workflows, allowing external systems to programmatically audit component configurations without fragile text parsing or direct infrastructure access.
--&gt;
&lt;p&gt;在 Kubernetes v1.35 中，&lt;code&gt;/flagz&lt;/code&gt; 端点增强为支持结构化、机器可读的 JSON 输出。
经授权的用户现在可以通过标准 HTTP 内容协商请求版本化的 JSON 响应，
同时原先的纯文本格式仍保留，便于人工查看。
此更新显著改进可观测性与合规工作流，让外部系统无需脆弱的文本解析或直接基础设施访问，
即可通过编程方式审计组件配置。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4828](https://kep.k8s.io/4828) led by SIG Instrumentation.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4828&#34;&gt;KEP #4828&lt;/a&gt; 的一部分，由 SIG Instrumentation 牵头完成。&lt;/p&gt;
&lt;!--
### Statusz for Kubernetes components
--&gt;
&lt;h3 id=&#34;statusz-for-kubernetes-components&#34;&gt;Kubernetes 组件的 Statusz  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#statusz-for-kubernetes-components&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Troubleshooting Kubernetes components like the `kube-apiserver` or `kubelet` has traditionally involved parsing unstructured logs or text output, which is brittle and difficult to automate. While a basic `/statusz` endpoint existed previously, it lacked a standardized, machine-readable format, limiting its utility for external monitoring systems.
--&gt;
&lt;p&gt;传统上，排查 &lt;code&gt;kube-apiserver&lt;/code&gt; 或 &lt;code&gt;kubelet&lt;/code&gt; 等 Kubernetes 组件问题，
往往需要解析非结构化日志或文本输出，这种方式脆弱且难以自动化。
此前虽然存在基础的 &lt;code&gt;/statusz&lt;/code&gt; 端点，
但缺乏标准化、机器可读的格式，从而限制了外部监控系统的可用性。&lt;/p&gt;
&lt;!--
In Kubernetes v1.35, the `/statusz` endpoint has been enhanced to support structured, machine-readable JSON output. Authorized users can now request this format using standard HTTP content negotiation to retrieve precise status data—such as version information and health indicators—without relying on fragile text parsing. This improvement provides a reliable, consistent interface for automated debugging and observability tools across all core components.
--&gt;
&lt;p&gt;在 Kubernetes v1.35 中，&lt;code&gt;/statusz&lt;/code&gt; 端点增强为支持结构化、机器可读的 JSON 输出。
经授权的用户现在可以通过标准 HTTP 内容协商请求这一格式，
以获取精确的状态数据——例如版本信息与健康指标——而无需依赖脆弱的文本解析。
该改进为所有核心组件的自动化调试与可观测性工具提供了可靠且一致的接口。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #4827](https://kep.k8s.io/4827) led by SIG Instrumentation.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/4827&#34;&gt;KEP #4827&lt;/a&gt; 的一部分，由 SIG Instrumentation 牵头完成。&lt;/p&gt;
&lt;!--
### CCM: watch-based route controller reconciliation using informers
--&gt;
&lt;h3 id=&#34;ccm-watch-based-route-controller-reconciliation-using-informers&#34;&gt;CCM：基于 Informer 的 Watch 式路由控制器调谐  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ccm-watch-based-route-controller-reconciliation-using-informers&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Managing network routes within cloud environments has traditionally relied on the Cloud Controller Manager (CCM) periodically polling the cloud provider&#39;s API to verify and update route tables. This fixed-interval reconciliation approach can be inefficient, often generating a high volume of unnecessary API calls and introducing latency between a node state change and the corresponding route update.
--&gt;
&lt;p&gt;在云环境中管理网络路由，传统上依赖云控制器管理器（CCM）定期轮询云提供商 API 来校验并更新路由表。
这种固定间隔的调谐方式可能效率不高，
常会产生大量不必要的 API 调用，并在节点状态变化与路由更新之间引入延迟。&lt;/p&gt;
&lt;!--
For the Kubernetes v1.35 release, the cloud-controller-manager library introduces a watch-based reconciliation strategy for the route controller. Instead of relying on a timer, the controller now utilizes informers to watch for specific Node events, such as additions, deletions, or relevant field updates and triggers route synchronization only when a change actually occurs.
--&gt;
&lt;p&gt;在 Kubernetes v1.35 中，cloud-controller-manager 库为路由控制器引入基于 watch 的调谐策略。
控制器不再依赖定时器，而是利用 Informer 监听特定的 Node 事件，例如新增、删除或相关字段更新，
仅在确有变更发生时触发路由同步。&lt;/p&gt;
&lt;!--
The primary benefit is a significant reduction in cloud provider API usage, which lowers the risk of hitting rate limits and reduces operational overhead. Additionally, this event-driven model improves the responsiveness of the cluster&#39;s networking layer by ensuring that route tables are updated immediately following changes in cluster topology.
--&gt;
&lt;p&gt;其主要收益是显著减少对云提供商 API 的使用，从而降低触发速率限制的风险并减少运维开销。
此外，这种事件驱动模型通过确保路由表在集群拓扑变化后立即更新，提升了集群网络层的响应速度。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5237](https://kep.k8s.io/5237) led by SIG Cloud Provider.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5237&#34;&gt;KEP #5237&lt;/a&gt; 的一部分，由 SIG Cloud Provider 牵头完成。&lt;/p&gt;
&lt;!--
### Extended toleration operators for threshold-based placement
--&gt;
&lt;h3 id=&#34;extended-toleration-operators-for-threshold-based-placement&#34;&gt;用于基于阈值放置的扩展容忍度运算符  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#extended-toleration-operators-for-threshold-based-placement&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes v1.35 introduces SLA-aware scheduling by enabling workloads to express reliability requirements. The feature adds numeric comparison operators to tolerations, allowing pods to match or avoid nodes based on SLA-oriented taints such as service guarantees or fault-domain quality.
--&gt;
&lt;p&gt;Kubernetes v1.35 通过允许工作负载表达可靠性要求，引入 SLA 感知调度（SLA-aware scheduling）。
该特性为容忍度增加数值比较运算符，
让 Pod 可以依据与 SLA 相关的污点（例如服务保障或故障域质量）来匹配或避开节点。&lt;/p&gt;
&lt;!--
The primary benefit is enhancing the scheduler with more precise placement. Critical workloads can demand higher-SLA nodes, while lower priority workloads can opt into lower SLA ones. This improves utilization and reduces cost without compromising reliability.
--&gt;
&lt;p&gt;其主要收益是让调度器具备更精确的放置能力。关键工作负载可要求更高 SLA 的节点，
而低优先级工作负载则可选择使用较低 SLA 的节点。这在不牺牲可靠性的前提下提升了利用率并降低成本。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5471](https://kep.k8s.io/5471) led by SIG Scheduling.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5471&#34;&gt;KEP #5471&lt;/a&gt; 的一部分，由 SIG Scheduling 牵头完成。&lt;/p&gt;
&lt;!--
### Mutable container resources when Job is suspended
--&gt;
&lt;h3 id=&#34;mutable-container-resources-when-job-is-suspended&#34;&gt;Job 挂起时可变更的容器资源  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#mutable-container-resources-when-job-is-suspended&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Running batch workloads often involves trial and error with resource limits. Currently, the Job specification is immutable, meaning that if a Job fails due to an Out of Memory (OOM) error or insufficient CPU, the user cannot simply adjust the resources; they must delete the Job and create a new one, losing the execution history and status.
--&gt;
&lt;p&gt;运行批处理工作负载时，经常需要对资源限制进行反复试错。
目前 Job 规约是不可变的，这意味着当 Job 因内存不足（OOM）或 CPU 不足而失败时，
用户无法直接调整资源；他们必须删除 Job 并重新创建，从而丢失执行历史与状态信息。&lt;/p&gt;
&lt;!--
Kubernetes v1.35 introduces the capability to update resource requests and limits for Jobs that are in a suspended state. Enabled via the `MutablePodResourcesForSuspendedJobs` feature gate, this enhancement allows users to pause a failing Job, modify its Pod template with appropriate resource values, and then resume execution with the corrected configuration.
--&gt;
&lt;p&gt;Kubernetes v1.35 引入一种能力：对处于挂起状态的 Job 更新资源请求与限制。
通过 &lt;code&gt;MutablePodResourcesForSuspendedJobs&lt;/code&gt; 特性门控启用后，
用户可以暂停一个失败的 Job，修改其 Pod 模板中的资源值，然后在修正配置后恢复执行。&lt;/p&gt;
&lt;!--
The primary benefit is a smoother recovery workflow for misconfigured jobs. By allowing in-place corrections during suspension, users can resolve resource bottlenecks without disrupting the Job&#39;s lifecycle identity or losing track of its completion status, significantly improving the developer experience for batch processing.
--&gt;
&lt;p&gt;其主要收益是让配置错误的 Job 具备更平滑的恢复流程。
通过允许在挂起期间进行原地修正，用户可以消除资源瓶颈，
而不会破坏 Job 的生命周期标识，也不会丢失完成状态追踪，
从而显著改善批处理场景下的开发体验。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5440](https://kep.k8s.io/5440) led by SIG Apps.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5440&#34;&gt;KEP #5440&lt;/a&gt; 的一部分，由 SIG Apps 牵头完成。&lt;/p&gt;
&lt;!--
## Other notable changes
--&gt;
&lt;h2 id=&#34;other-notable-changes&#34;&gt;其他值得关注的变更  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#other-notable-changes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Continued innovation in Dynamic Resource Allocation (DRA)
--&gt;
&lt;h3 id=&#34;continued-innovation-in-dynamic-resource-allocation-dra&#34;&gt;动态资源分配（DRA）的持续创新  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#continued-innovation-in-dynamic-resource-allocation-dra&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
The [core functionality](https://kep.k8s.io/4381) was graduated to stable in v1.34, with the ability to turn it off. In v1.35 it is always enabled. Several alpha features have also been significantly improved and are ready for testing. We encourage users to provide feedback on these capabilities to help clear the path for their target promotion to beta in upcoming releases.
--&gt;
&lt;p&gt;&lt;a href=&#34;https://kep.k8s.io/4381&#34;&gt;核心能力&lt;/a&gt;在 v1.34 中进阶至稳定（GA）阶段，并允许关闭。
在 v1.35 中，此特性将始终被启用。此外，若干 Alpha 特性也得到了显著改进，已准备好进行测试。
我们鼓励用户就这些能力提供反馈，以帮助它们在后续版本中更顺利地走向 Beta。&lt;/p&gt;
&lt;!--
#### Extended Resource Requests via DRA
--&gt;
&lt;h4 id=&#34;extended-resource-requests-via-dra&#34;&gt;通过 DRA 扩展资源请求  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#extended-resource-requests-via-dra&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
Several functional gaps compared to Extended Resource requests via Device Plugins were addressed, for example scoring and reuse of devices in init containers.
--&gt;
&lt;p&gt;相较于通过设备插件（Device Plugins）实现的扩展资源请求，
当前版本补齐了若干特性差距，例如对 Init 容器中设备的打分与复用能力。&lt;/p&gt;
&lt;!--
#### Device Taints and Tolerations
--&gt;
&lt;h4 id=&#34;device-taints-and-tolerations&#34;&gt;设备污点与容忍度  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#device-taints-and-tolerations&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
The new &#34;None&#34; effect can be used to report a problem without immediately affecting scheduling or running pod. DeviceTaintRule now provides status information about an ongoing eviction. The &#34;None&#34; effect can be used for a &#34;dry run&#34; before actually evicting pods:
--&gt;
&lt;p&gt;新的 “None” 效果可用于报告问题，而不会立刻影响调度或正在运行的 Pod。
DeviceTaintRule 现在还会提供正在进行驱逐的状态信息。
在真正开始驱逐 Pod 之前，可以先用 “None” 效果进行一次“演练”（dry run）：&lt;/p&gt;
&lt;!--
- Create DeviceTaintRule with &#34;effect: None&#34;.
- Check the status to see how many pods would be evicted.
- Replace &#34;effect: None&#34; with &#34;effect: NoExecute&#34;.
--&gt;
&lt;ul&gt;
&lt;li&gt;使用 &lt;code&gt;effect: None&lt;/code&gt; 创建 DeviceTaintRule。&lt;/li&gt;
&lt;li&gt;检查状态，了解将会驱逐多少个 Pod。&lt;/li&gt;
&lt;li&gt;将 &lt;code&gt;effect: None&lt;/code&gt; 替换为 &lt;code&gt;effect: NoExecute&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
#### Partitionable Devices
--&gt;
&lt;h4 id=&#34;partitionable-devices&#34;&gt;可切分设备  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#partitionable-devices&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
Devices belonging to the same partitionable devices may now be defined in different ResourceSlices.
--&gt;
&lt;p&gt;属于同一类可切分设备（Partitionable Devices）的设备，
现在可以定义在不同的 ResourceSlice 中。&lt;/p&gt;
&lt;!--
You can read more in the [official documentation](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#partitionable-devices).
--&gt;
&lt;p&gt;更多信息请参阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#partitionable-devices&#34;&gt;官方文档&lt;/a&gt;。&lt;/p&gt;
&lt;!--
#### Consumable Capacity, Device Binding Conditions
--&gt;
&lt;h4 id=&#34;consumable-capacity-device-binding-conditions&#34;&gt;可消耗容量与设备绑定条件  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#consumable-capacity-device-binding-conditions&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
Several bugs were fixed and/or more tests added.
--&gt;
&lt;p&gt;该版本修复了若干缺陷并添加了更多测试。&lt;/p&gt;
&lt;!--
You can learn more about [Consumable Capacity](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#consumable-capacity) and [Binding Conditions](/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-binding-conditions) in the official documentation.
--&gt;
&lt;p&gt;你可以在官方文档中进一步了解&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#consumable-capacity&#34;&gt;可消耗容量&lt;/a&gt;
与&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/dynamic-resource-allocation/#device-binding-conditions&#34;&gt;绑定条件&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### Comparable resource version semantics
--&gt;
&lt;h3 id=&#34;comparable-resource-version-semantics&#34;&gt;可比较的资源版本语义  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#comparable-resource-version-semantics&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes v1.35 changes the way that clients are allowed to interpret [resource versions](/docs/reference/using-api/api-concepts/#resource-versions).
--&gt;
&lt;p&gt;Kubernetes v1.35 改变了客户端被允许解释&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/using-api/api-concepts/#resource-versions&#34;&gt;资源版本（resource versions）&lt;/a&gt;的方式。&lt;/p&gt;
&lt;!--
Before v1.35, the only supported comparison that clients could make was to check for string equality: if two resource versions were equal, they were the same. Clients could also provide a resource version to the API server and ask the control plane to do internal comparisons, such as streaming all events since a particular resource version.
--&gt;
&lt;p&gt;在 v1.35 之前，客户端唯一受支持的比较方式是字符串相等性检查：
如果两个资源版本相等，它们就是同一个版本。
客户端也可以向 API 服务器提供资源版本，并请求控制平面执行内部比较，
例如流式获取自某个资源版本以来的所有事件。&lt;/p&gt;
&lt;!--
In v1.35, all in-tree resource versions meet a new stricter definition: the values are a special form of decimal number. And, because they can be compared, clients can do their own operations to compare two different resource versions.
--&gt;
&lt;p&gt;在 v1.35 中，所有 in-tree 的资源版本都满足更严格的新定义：
它们的取值是一种特殊形式的十进制数。由于这些值可比较，
客户端也可以自行比较两个不同的资源版本。&lt;/p&gt;
&lt;!--
For example, this means that a client reconnecting after a crash can detect when it has lost updates, as distinct from the case where there has been an update but no lost changes in the meantime.
--&gt;
&lt;p&gt;例如，这意味着客户端在崩溃后重新连接时，可以检测自己是否丢失了更新，
而不仅仅是判断“期间是否有更新但没有丢失变更”的情况。&lt;/p&gt;
&lt;!--
This change in semantics enables other important use cases such as [storage version migration](/docs/tasks/manage-kubernetes-objects/storage-version-migration/), performance improvements to _informers_ (a client helper concept), and controller reliability. All of those cases require knowing whether one resource version is newer than another.
--&gt;
&lt;p&gt;这一语义变更还支撑了其他重要用例，例如
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/manage-kubernetes-objects/storage-version-migration/&#34;&gt;存储版本迁移&lt;/a&gt;、对 &lt;code&gt;informers&lt;/code&gt;
（一种客户端辅助概念）的性能改进，以及控制器可靠性提升。
这些用例都需要能够判断一个资源版本是否比另一个更新。&lt;/p&gt;
&lt;!--
This work was done as part of [KEP #5504](https://kep.k8s.io/5504) led by SIG API Machinery.
--&gt;
&lt;p&gt;此项工作是 &lt;a href=&#34;https://kep.k8s.io/5504&#34;&gt;KEP #5504&lt;/a&gt; 的一部分，由 SIG API Machinery 牵头完成。&lt;/p&gt;
&lt;!--
## Graduations, deprecations, and removals in v1.35
--&gt;
&lt;h2 id=&#34;deprecations-and-removals&#34;&gt;v1.35 的升级、弃用与移除  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecations-and-removals&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Graduations to stable
--&gt;
&lt;h3 id=&#34;graduations-to-stable&#34;&gt;进入稳定（GA）阶段的特性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#graduations-to-stable&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
This lists all the features that graduated to stable (also known as *general availability*). For a full list of updates including new features and graduations from alpha to beta, see the release notes.
--&gt;
&lt;p&gt;这里列出所有进入稳定（也称为 &lt;strong&gt;正式发布（GA）&lt;/strong&gt;）阶段的特性。
要获取包含新增特性与从 Alpha 升级到 Beta 等在内的完整更新列表，请参阅发布说明。&lt;/p&gt;
&lt;!--
This release includes a total of 15 enhancements promoted to stable:
--&gt;
&lt;p&gt;本次发布共有 15 个增强项进入稳定（GA）阶段：&lt;/p&gt;
&lt;!--
* [Add CPUManager policy option to restrict reservedSystemCPUs to system daemons and interrupt processing](https://kep.k8s.io/4540)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4540&#34;&gt;为 CPUManager 策略增加选项，将 reservedSystemCPUs 限定用于系统守护进程与中断处理&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Pod Generation](https://kep.k8s.io/5067)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5067&#34;&gt;Pod Generation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Invariant Testing](https://kep.k8s.io/5468)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5468&#34;&gt;Invariant Testing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [In-Place Update of Pod Resources](https://kep.k8s.io/1287)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/1287&#34;&gt;Pod 资源原地更新&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Fine-grained SupplementalGroups control](https://kep.k8s.io/3619)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/3619&#34;&gt;更细粒度的 SupplementalGroups 控制&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Add support for a drop-in kubelet configuration directory](https://kep.k8s.io/3983)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/3983&#34;&gt;支持 drop-in kubelet 配置目录&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Remove gogo protobuf dependency for Kubernetes API types](https://kep.k8s.io/5589)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/5589&#34;&gt;移除 Kubernetes API 类型对 gogo protobuf 的依赖&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [kubelet image GC after a maximum age](https://kep.k8s.io/4210)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4210&#34;&gt;kubelet 镜像垃圾回收：基于最大镜像年龄&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Kubelet limit of Parallel Image Pulls](https://kep.k8s.io/3673)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/3673&#34;&gt;kubelet 并行拉取镜像的上限&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Add a TopologyManager policy option for MaxAllowableNUMANodes](https://kep.k8s.io/4622)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4622&#34;&gt;为 TopologyManager 策略增加 MaxAllowableNUMANodes 选项&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Include kubectl command metadata in http request headers](https://kep.k8s.io/859)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/859&#34;&gt;在 HTTP 请求头中包含 kubectl 命令元数据&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [PreferSameNode Traffic Distribution (formerly PreferLocal traffic policy / Node-level topology)](https://kep.k8s.io/3015)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/3015&#34;&gt;PreferSameNode 流量分配（原 PreferLocal 流量策略/节点级拓扑）&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Job API managed-by mechanism](https://kep.k8s.io/4368)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4368&#34;&gt;Job API 的 managed-by 机制&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Transition from SPDY to WebSockets](https://kep.k8s.io/4006)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://kep.k8s.io/4006&#34;&gt;从 SPDY 迁移到 WebSockets&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Deprecations, removals and community updates
--&gt;
&lt;h3 id=&#34;deprecations-removals-and-community-updates&#34;&gt;弃用、移除与社区更新  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecations-removals-and-community-updates&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
As Kubernetes develops and matures, features may be deprecated, removed, or replaced with better
ones to improve the project&#39;s overall health. See the Kubernetes
[deprecation and removal policy](/docs/reference/using-api/deprecation-policy/) for more details on this process. Kubernetes v1.35 includes a couple of deprecations.
--&gt;
&lt;p&gt;随着 Kubernetes 的发展与成熟，为提升项目整体健康度，
一些特性可能会被弃用、移除，或被更好的方案替代。
关于这一过程的更多信息，请参阅 Kubernetes 的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/using-api/deprecation-policy/&#34;&gt;弃用与移除策略&lt;/a&gt;。
Kubernetes v1.35 包含了若干项弃用内容。&lt;/p&gt;
&lt;!--
#### Ingress NGINX retirement
--&gt;
&lt;h4 id=&#34;ingress-nginx-retirement&#34;&gt;Ingress NGINX 退役  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#ingress-nginx-retirement&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
For years, the Ingress NGINX controller has been a popular choice for routing traffic into Kubernetes clusters. It was flexible, widely adopted, and served as the standard entry point for countless applications.
--&gt;
&lt;p&gt;多年来，Ingress NGINX 控制器一直是将流量路由到 Kubernetes 集群的热门选择。
它灵活、被广泛采用，并长期作为无数应用的标准入口。&lt;/p&gt;
&lt;!--
However, maintaining the project has become unsustainable. With a severe shortage of maintainers and mounting technical debt, the community recently made the difficult decision to retire it. This isn&#39;t strictly part of the v1.35 release, but it&#39;s such an important change that we wanted to highlight it here.
--&gt;
&lt;p&gt;然而，项目维护已经变得难以为继。由于维护者严重短缺且技术债不断累积，
社区近期做出了艰难决定：让该项目退役。这虽然并非严格意义上的 v1.35 发布内容，
但它影响重大，我们希望在这里特别强调。&lt;/p&gt;
&lt;!--
Consequently, the Kubernetes project announced that Ingress NGINX will receive only best-effort maintenance until **March 2026**. After this date, it will be archived with no further updates. The recommended path forward is to migrate to the [Gateway API](https://gateway-api.sigs.k8s.io/), which offers a more modern, secure, and extensible standard for traffic management.
--&gt;
&lt;p&gt;因此，Kubernetes 项目宣布 Ingress NGINX 将仅提供尽力而为的维护，
直至 &lt;strong&gt;2026 年 3 月&lt;/strong&gt;。
此日期之后，该项目将归档并不再更新。
推荐的后续路径是迁移到 &lt;a href=&#34;https://gateway-api.sigs.k8s.io/&#34;&gt;Gateway API&lt;/a&gt;，
它提供了更现代、更安全且更可扩展的流量管理标准。&lt;/p&gt;
&lt;!--
You can find more in the [official blog post](/blog/2025/11/11/ingress-nginx-retirement/).
--&gt;
&lt;p&gt;更多信息请参阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/11/11/ingress-nginx-retirement/&#34;&gt;官方博客文章&lt;/a&gt;。&lt;/p&gt;
&lt;!--
#### Removal of cgroup v1 support
--&gt;
&lt;h4 id=&#34;removal-of-cgroup-v1-support&#34;&gt;移除对 cgroup v1 的支持  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#removal-of-cgroup-v1-support&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
When it comes to managing resources on Linux nodes, Kubernetes has historically relied on cgroups (control groups). While the original cgroup v1 was functional, it was often inconsistent and limited. That is why Kubernetes introduced support for cgroup v2 back in v1.25, offering a much cleaner, unified hierarchy and better resource isolation.
--&gt;
&lt;p&gt;在 Linux 节点的资源管理方面，Kubernetes 历史上依赖 cgroups（control groups）。
尽管最初的 cgroup v1 可以工作，但它常常不一致且存在局限。
因此，Kubernetes 在 v1.25 引入对 cgroup v2 的支持，
提供了更干净的统一层级结构与更好的资源隔离能力。&lt;/p&gt;
&lt;!--
Because cgroup v2 is now the modern standard, Kubernetes is ready to retire the legacy cgroup v1 support in v1.35. This is an important notice for cluster administrators: if you are still running nodes on older Linux distributions that don&#39;t support cgroup v2, your `kubelet` will fail to start. To avoid downtime, you will need to migrate those nodes to systems where cgroup v2 is enabled.
--&gt;
&lt;p&gt;由于 cgroup v2 现已成为现代标准，
Kubernetes 准备在 v1.35 中退役遗留的 cgroup v1 支持。
这对集群管理员而言是一项重要提醒：
如果你仍在运行不支持 cgroup v2 的旧 Linux 发行版节点，
你的 &lt;code&gt;kubelet&lt;/code&gt; 将无法启动。
为避免停机，你需要将这些节点迁移到启用了 cgroup v2 的系统上。&lt;/p&gt;
&lt;!--
To learn more, read [about cgroup v2](/docs/concepts/architecture/cgroups/);  
you can also track the switchover work via [KEP-5573: Remove cgroup v1 support](https://kep.k8s.io/5573).  
--&gt;
&lt;p&gt;要了解更多信息，请阅读&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/architecture/cgroups/&#34;&gt;关于 cgroup v2&lt;/a&gt;；&lt;br&gt;
你也可以通过 &lt;a href=&#34;https://kep.k8s.io/5573&#34;&gt;KEP-5573：移除 cgroup v1 支持&lt;/a&gt; 跟踪切换工作。&lt;/p&gt;
&lt;!--
#### Deprecation of ipvs mode in kube-proxy
--&gt;
&lt;h4 id=&#34;deprecation-of-ipvs-mode-in-kube-proxy&#34;&gt;kube-proxy 中 ipvs 模式的弃用  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecation-of-ipvs-mode-in-kube-proxy&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
Years ago, Kubernetes adopted the [`ipvs`](/docs/reference/networking/virtual-ips/#proxy-mode-ipvs) mode in `kube-proxy` to provide faster load balancing than the standard [`iptables`](/docs/reference/networking/virtual-ips/#proxy-mode-iptables). While it offered a performance boost, keeping it in sync with evolving networking requirements created too much technical debt and complexity.
--&gt;
&lt;p&gt;多年前，Kubernetes 在 &lt;code&gt;kube-proxy&lt;/code&gt; 中采用&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/networking/virtual-ips/#proxy-mode-ipvs&#34;&gt;&lt;code&gt;ipvs&lt;/code&gt;&lt;/a&gt; 模式，
以提供比标准&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/networking/virtual-ips/#proxy-mode-iptables&#34;&gt;&lt;code&gt;iptables&lt;/code&gt;&lt;/a&gt; 更快的负载均衡。
虽然它带来了性能提升，但为了跟上不断演进的网络需求，
维护其一致性所带来的技术债与复杂度已过高。&lt;/p&gt;
&lt;!--
Because of this maintenance burden, Kubernetes v1.35 deprecates `ipvs` mode. Although the mode remains available in this release, `kube-proxy` will now emit a warning on startup when configured to use it. The goal is to streamline the codebase and focus on modern standards. For Linux nodes, you should begin transitioning to [`nftables`](/docs/reference/networking/virtual-ips/#proxy-mode-nftables), which is now the recommended replacement.
--&gt;
&lt;p&gt;由于这一维护负担，Kubernetes v1.35 弃用 &lt;code&gt;ipvs&lt;/code&gt; 模式。尽管该模式在本次发布中仍可用，
但当 &lt;code&gt;kube-proxy&lt;/code&gt; 被配置为使用该模式时，将在启动时发出警告。
该弃用的目标是精简代码库并聚焦于现代标准。
对于 Linux 节点，你应开始迁移到&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/networking/virtual-ips/#proxy-mode-nftables&#34;&gt;&lt;code&gt;nftables&lt;/code&gt;&lt;/a&gt;，
它现在是推荐的替代方案。&lt;/p&gt;
&lt;!--
You can find more in [KEP-5495: Deprecate ipvs mode in kube-proxy](https://kep.k8s.io/5495).
--&gt;
&lt;p&gt;更多信息请参阅 &lt;a href=&#34;https://kep.k8s.io/5495&#34;&gt;KEP-5495：弃用 kube-proxy 的 ipvs 模式&lt;/a&gt;。&lt;/p&gt;
&lt;!--
#### Final call for containerd v1.X
--&gt;
&lt;h4 id=&#34;final-call-for-containerd-v1x&#34;&gt;containerd v1.X 的最后通告  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#final-call-for-containerd-v1x&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
While Kubernetes v1.35 still supports containerd 1.7 and other LTS releases, this is the final version with such support. The SIG Node community has designated v1.35 as the last release to support the containerd v1.X series.
--&gt;
&lt;p&gt;尽管 Kubernetes v1.35 仍支持 containerd 1.7 与其他 LTS 版本，
但这是最后一个提供此类支持的版本。
SIG Node 社区已将 v1.35 指定为最后一个支持 containerd v1.X 系列的版本。&lt;/p&gt;
&lt;!--
This serves as an important reminder: before upgrading to the next Kubernetes version, you must switch to containerd 2.0 or later. To help identify which nodes need attention, you can monitor the `kubelet_cri_losing_support` metric within your cluster.
--&gt;
&lt;p&gt;这是一条重要提醒：
在升级到下一个 Kubernetes 版本之前，你必须切换到 containerd 2.0 或更高版本。
为帮助识别哪些节点需要关注，你可以在集群中监控 &lt;code&gt;kubelet_cri_losing_support&lt;/code&gt; 指标。&lt;/p&gt;
&lt;!--
You can find more in the [official blog post](/blog/2025/09/12/kubernetes-v1-34-cri-cgroup-driver-lookup-now-ga/#announcement-kubernetes-is-deprecating-containerd-v1-y-support) or in [KEP-4033: Discover cgroup driver from CRI](https://kep.k8s.io/4033).
--&gt;
&lt;p&gt;更多信息可参阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/09/12/kubernetes-v1-34-cri-cgroup-driver-lookup-now-ga/#announcement-kubernetes-is-deprecating-containerd-v1-y-support&#34;&gt;官方博客文章&lt;/a&gt;，
或阅读 &lt;a href=&#34;https://kep.k8s.io/4033&#34;&gt;KEP-4033：从 CRI 发现 cgroup driver&lt;/a&gt;。&lt;/p&gt;
&lt;!--
#### Improved Pod stability during `kubelet` restarts
--&gt;
&lt;h4 id=&#34;improved-pod-stability-during-kubelet-restarts&#34;&gt;&lt;code&gt;kubelet&lt;/code&gt; 重启期间的 Pod 稳定性改进  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#improved-pod-stability-during-kubelet-restarts&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h4&gt;&lt;!--
Previously, restarting the `kubelet` service often caused a temporary disruption in Pod status. During a restart, the kubelet would reset container states, causing healthy Pods to be marked as `NotReady` and removed from load balancers, even if the application itself was still running correctly.
--&gt;
&lt;p&gt;此前，重启 &lt;code&gt;kubelet&lt;/code&gt; 服务往往会造成 Pod 状态的短暂波动。在重启期间，kubelet 会重置容器状态，
导致健康的 Pod 被标记为 &lt;code&gt;NotReady&lt;/code&gt; 并从负载均衡器中移除，即便应用本身仍在正常运行。&lt;/p&gt;
&lt;!--
To address this reliability issue, this behavior has been corrected to ensure seamless node maintenance. The `kubelet` now properly restores the state of existing containers from the runtime upon startup. This ensures that your workloads remain `Ready` and traffic continues to flow uninterrupted during `kubelet` restarts or upgrades.
--&gt;
&lt;p&gt;为解决这一可靠性问题，该行为已被修正，以确保节点维护更平滑。
&lt;code&gt;kubelet&lt;/code&gt; 现在会在启动时从运行时中正确恢复现有容器状态，
确保你的工作负载保持 &lt;code&gt;Ready&lt;/code&gt;，并使流量在 &lt;code&gt;kubelet&lt;/code&gt; 重启或升级期间持续不中断。&lt;/p&gt;
&lt;!--
You can find more in [KEP-4781: Fix inconsistent container ready state after kubelet restart](https://kep.k8s.io/4781).
--&gt;
&lt;p&gt;更多信息请参阅
&lt;a href=&#34;https://kep.k8s.io/4781&#34;&gt;KEP-4781：修复 kubelet 重启后容器就绪状态不一致问题&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Release notes
--&gt;
&lt;h2 id=&#34;release-notes&#34;&gt;发布说明  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#release-notes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Check out the full details of the Kubernetes v1.35 release in our [release notes](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.35.md).
--&gt;
&lt;p&gt;请在我们的&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.35.md&#34;&gt;发布说明&lt;/a&gt;
中查看 Kubernetes v1.35 发布的完整细节。&lt;/p&gt;
&lt;!--
## Availability
--&gt;
&lt;h2 id=&#34;availability&#34;&gt;可用性  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#availability&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes v1.35 is available for download on [GitHub](https://github.com/kubernetes/kubernetes/releases/tag/v1.35.0) or on the [Kubernetes download page](/releases/download/).
--&gt;
&lt;p&gt;Kubernetes v1.35 可通过&lt;a href=&#34;https://github.com/kubernetes/kubernetes/releases/tag/v1.35.0&#34;&gt;GitHub&lt;/a&gt;
或 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/releases/download/&#34;&gt;Kubernetes 下载页面&lt;/a&gt;获取。&lt;/p&gt;
&lt;!--
To get started with Kubernetes, check out these [interactive tutorials](/docs/tutorials/) or run local Kubernetes clusters using [minikube](https://minikube.sigs.k8s.io/). You can also easily install v1.35 using [kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/).
--&gt;
&lt;p&gt;要开始使用 Kubernetes，请查看这些&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tutorials/&#34;&gt;交互式教程&lt;/a&gt;，
或使用 &lt;a href=&#34;https://minikube.sigs.k8s.io/&#34;&gt;minikube&lt;/a&gt; 在本地运行 Kubernetes 集群。
你也可以使用 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/&#34;&gt;kubeadm&lt;/a&gt;
轻松安装 v1.35。&lt;/p&gt;
&lt;!--
## Release team
--&gt;
&lt;h2 id=&#34;release-team&#34;&gt;发布团队  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#release-team&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes is only possible with the support, commitment, and hard work of its community. Each release team is made up of dedicated community volunteers who work together to build the many pieces that make up the Kubernetes releases you rely on. This requires the specialized skills of people from all corners of our community, from the code itself to its documentation and project management.
--&gt;
&lt;p&gt;Kubernetes 之所以成为可能，离不开社区的支持、承诺与辛勤付出。
每个发布团队由一群投入的社区志愿者组成，他们一起构建你所依赖的 Kubernetes 发布版本的诸多部分。
这需要来自社区各个角落的专业能力：从代码本身到文档与项目管理。&lt;/p&gt;
&lt;!--
[We honor the memory of Han Kang](https://github.com/cncf/memorials/blob/main/han-kang.md), a long-time contributor and respected engineer whose technical excellence and infectious enthusiasm left a lasting impact on the Kubernetes community. Han was a significant force within SIG Instrumentation and SIG API Machinery, earning a [2021 Kubernetes Contributor Award](https://www.kubernetes.dev/community/awards/2021/) for his critical work and sustained commitment to the project&#39;s core stability. Beyond his technical contributions, Han was deeply admired for his generosity as a mentor and his passion for building connections among people. He was known for &#34;opening doors&#34; for others, whether guiding new contributors through their first pull requests or supporting colleagues with patience and kindness. Han’s legacy lives on through the engineers he inspired, the robust systems he helped build, and the warm, collaborative spirit he fostered within the cloud native ecosystem.
--&gt;
&lt;p&gt;我们在此缅怀&lt;a href=&#34;https://github.com/cncf/memorials/blob/main/han-kang.md&#34;&gt;Han Kang&lt;/a&gt;
——一位长期贡献者与备受尊敬的工程师，他的技术卓越与感染力十足的热情，
为 Kubernetes 社区留下了深远影响。Han 是 SIG Instrumentation 与 SIG API Machinery 中的重要力量，
并因其关键工作与对项目核心稳定性的持续投入，
获得了&lt;a href=&#34;https://www.kubernetes.dev/community/awards/2021/&#34;&gt;2021 Kubernetes Contributor Award&lt;/a&gt;。
除技术贡献之外，Han 也因其作为导师的慷慨与联结人们的热情而广受敬重。
他以“为他人打开大门”而闻名——无论是带领新贡献者完成第一次 PR，
还是以耐心与善意支持同事。Han 的遗产将通过他所激励的工程师、他参与构建的健壮系统，
以及他在云原生生态中所塑造的温暖协作精神延续下去。&lt;/p&gt;
&lt;!--
We would like to thank the entire [Release Team](https://github.com/kubernetes/sig-release/blob/master/releases/release-1.35/release-team.md) for the hours spent hard at work to deliver the Kubernetes v1.35 release to our community. The Release Team&#39;s membership ranges from first-time shadows to returning team leads with experience forged over several release cycles. We are incredibly grateful to our Release Lead, [Drew Hagen](https://github.com/drewhagen), whose hands-on guidance and vibrant energy not only navigated us through complex challenges but also fueled the community spirit behind this successful release.
--&gt;
&lt;p&gt;我们感谢整个&lt;a href=&#34;https://github.com/kubernetes/sig-release/blob/master/releases/release-1.35/release-team.md&#34;&gt;发布团队&lt;/a&gt;
为向社区交付 Kubernetes v1.35 所付出的辛勤时间。
发布团队成员既有第一次参与的 shadow，也有历经多轮发布周期、经验丰富的回归 team lead。
我们尤其感谢发布负责人&lt;a href=&#34;https://github.com/drewhagen&#34;&gt;Drew Hagen&lt;/a&gt;：
他既以务实指导带我们穿越复杂挑战，也以充沛能量点燃了这次成功发布背后的社区精神。&lt;/p&gt;
&lt;!--
## Project velocity
--&gt;
&lt;h2 id=&#34;project-velocity&#34;&gt;项目活跃度  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#project-velocity&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The CNCF K8s [DevStats](https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;var-period=m&amp;var-repogroup_name=All) project aggregates a number of interesting data points related to the velocity of Kubernetes and various sub-projects. This includes everything from individual contributions to the number of companies that are contributing and is an illustration of the depth and breadth of effort that goes into evolving this ecosystem.
--&gt;
&lt;p&gt;CNCF K8s 的&lt;a href=&#34;https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;var-period=m&amp;var-repogroup_name=All&#34;&gt;DevStats&lt;/a&gt;
项目汇总了与 Kubernetes 及其各子项目活跃度相关的一系列有趣数据点。
这些数据涵盖从个人贡献到参与贡献公司的数量等多个方面，
体现了推动该生态演进所投入努力的深度与广度。&lt;/p&gt;
&lt;!--
During the v1.35 release cycle, which spanned 14 weeks from 15th September 2025 to 17th December 2025, Kubernetes received contributions from as many as 85 different companies and 419 individuals. In the wider cloud native ecosystem, the figure goes up to 281 companies, counting 1769 total contributors.
--&gt;
&lt;p&gt;在 v1.35 发布周期（从 2025 年 9 月 15 日到 2025 年 12 月 17 日，共 14 周）期间，
Kubernetes 收到了来自多达 85 家公司与 419 名个人的贡献。
在更广泛的云原生生态中，这一数字上升到 281 家公司，共计 1769 名贡献者。&lt;/p&gt;
&lt;!--
Note that &#34;contribution&#34; counts when someone makes a commit, code review, comment, creates an issue or PR, reviews a PR (including blogs and documentation) or comments on issues and PRs.  
If you are interested in contributing, visit [Getting Started](https://www.kubernetes.dev/docs/guide/#getting-started) on our contributor website.
--&gt;
&lt;p&gt;请注意，这里的“贡献”统计包括：提交 commit、进行代码评审、发表评论、创建 Issue 或 PR、
评审 PR（包括博客与文档）以及对 Issue 与 PR 的评论等。&lt;br&gt;
如果你有兴趣参与贡献，请访问贡献者网站上的&lt;a href=&#34;https://www.kubernetes.dev/docs/guide/#getting-started&#34;&gt;Getting Started&lt;/a&gt;。&lt;/p&gt;
&lt;!--
Sources for this data:
--&gt;
&lt;p&gt;数据来源：&lt;/p&gt;
&lt;!--
* [Companies contributing to Kubernetes](https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;from=1757890800000&amp;to=1765929599000&amp;var-period=d28&amp;var-repogroup_name=Kubernetes&amp;var-repo_name=kubernetes%2Fkubernetes)  
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;from=1757890800000&amp;to=1765929599000&amp;var-period=d28&amp;var-repogroup_name=Kubernetes&amp;var-repo_name=kubernetes%2Fkubernetes&#34;&gt;贡献 Kubernetes 的公司&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* [Overall ecosystem contributions](https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;from=1757890800000&amp;to=1765929599000&amp;var-period=d28&amp;var-repogroup_name=All&amp;var-repo_name=kubernetes%2Fkubernetes)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://k8s.devstats.cncf.io/d/11/companies-contributing-in-repository-groups?orgId=1&amp;from=1757890800000&amp;to=1765929599000&amp;var-period=d28&amp;var-repogroup_name=All&amp;var-repo_name=kubernetes%2Fkubernetes&#34;&gt;整体生态的贡献&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Events update
--&gt;
&lt;h2 id=&#34;events-update&#34;&gt;活动更新  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#events-update&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Explore upcoming Kubernetes and cloud native events, including KubeCon \+ CloudNativeCon, KCD, and other notable conferences worldwide. Stay informed and get involved with the Kubernetes community\!
--&gt;
&lt;p&gt;了解即将到来的 Kubernetes 与云原生活动，包括 KubeCon + CloudNativeCon、KCD 与全球其他重要会议。
保持关注并参与 Kubernetes 社区！&lt;/p&gt;
&lt;!--
**February 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 2 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- [**KCD - Kubernetes Community Days:  New Delhi**](https://www.kcddelhi.com/index.html): Feb 21, 2026 | New Delhi, India
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.kcddelhi.com/index.html&#34;&gt;&lt;strong&gt;KCD - Kubernetes Community Days:  New Delhi&lt;/strong&gt;&lt;/a&gt;：2026 年 2 月 21 日｜印度 New Delhi&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**KCD - Kubernetes Community Days:  Guadalajara**](https://community.cncf.io/events/details/cncf-kcd-guadalajara-presents-kcd-guadalajara-open-source-contributor-summit/cohost-kcd-guadalajara): Feb 23, 2026 | Guadalajara, Mexico
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-guadalajara-presents-kcd-guadalajara-open-source-contributor-summit/cohost-kcd-guadalajara&#34;&gt;&lt;strong&gt;KCD：Guadalajara&lt;/strong&gt;&lt;/a&gt;：2026 年 2 月 23 日｜墨西哥 Guadalajara&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**March 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 3 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- [**KubeCon + CloudNativeCon Europe 2026**](https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/): Mar 23-26, 2026 | Amsterdam, Netherlands
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://events.linuxfoundation.org/kubecon-cloudnativecon-europe/&#34;&gt;&lt;strong&gt;KubeCon + CloudNativeCon Europe 2026&lt;/strong&gt;&lt;/a&gt;：2026 年 3 月 23-26 日｜荷兰 Amsterdam&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**May 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 5 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- [**KCD - Kubernetes Community Days:  Toronto**](https://community.cncf.io/events/details/cncf-kcd-toronto-presents-kcd-toronto-canada-2026/): May 13, 2026 | Toronto, Canada
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://community.cncf.io/events/details/cncf-kcd-toronto-presents-kcd-toronto-canada-2026/&#34;&gt;&lt;strong&gt;KCD - Kubernetes Community Days:  Toronto&lt;/strong&gt;&lt;/a&gt;：2026 年 5 月 13 日｜加拿大 Toronto&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**KCD - Kubernetes Community Days:  Helsinki**](https://cloudnativefinland.org/kcd-helsinki-2026/): May 20, 2026 | Helsinki, Finland
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://cloudnativefinland.org/kcd-helsinki-2026/&#34;&gt;&lt;strong&gt;KCD - Kubernetes Community Days:  Helsinki&lt;/strong&gt;&lt;/a&gt;：2026 年 5 月 20 日｜芬兰 Helsinki&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**June 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 6 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- [**KubeCon + CloudNativeCon India 2026**](https://events.linuxfoundation.org/kubecon-cloudnativecon-india/): Jun 18-19, 2026 | Mumbai, India
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://events.linuxfoundation.org/kubecon-cloudnativecon-india/&#34;&gt;&lt;strong&gt;KubeCon + CloudNativeCon India 2026&lt;/strong&gt;&lt;/a&gt;：2026 年 6 月 18-19 日｜印度 Mumbai&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
- [**KCD - Kubernetes Community Days:  Kuala Lumpur**](https://community.cncf.io/kcd-kuala-lumpur-2026/): Jun 27, 2026 | Kuala Lumpur, Malaysia
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://community.cncf.io/kcd-kuala-lumpur-2026/&#34;&gt;&lt;strong&gt;KCD：Kuala Lumpur&lt;/strong&gt;&lt;/a&gt;：2026 年 6 月 27 日｜马来西亚 Kuala Lumpur&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**July 2026**
--&gt;
&lt;p&gt;&lt;strong&gt;2026 年 7 月&lt;/strong&gt;&lt;/p&gt;
&lt;!--
- [**KubeCon + CloudNativeCon Japan 2026**](https://events.linuxfoundation.org/kubecon-cloudnativecon-japan/): Jul 29-30, 2026 | Yokohama, Japan
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://events.linuxfoundation.org/kubecon-cloudnativecon-japan/&#34;&gt;&lt;strong&gt;KubeCon + CloudNativeCon Japan 2026&lt;/strong&gt;&lt;/a&gt;：2026 年 7 月 29-30 日｜日本 Yokohama&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
You can find the latest event details [here](https://community.cncf.io/events/#/list).
--&gt;
&lt;p&gt;你可以在&lt;a href=&#34;https://community.cncf.io/events/#/list&#34;&gt;此处&lt;/a&gt;查看最新活动详情。&lt;/p&gt;
&lt;!--
## Upcoming release webinar
--&gt;
&lt;h2 id=&#34;upcoming-release-webinar&#34;&gt;即将举行的发布网络研讨会  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#upcoming-release-webinar&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Join members of the Kubernetes v1.35 Release Team on **Wednesday, January 14, 2026, at 5:00 PM (UTC)** to learn about the release highlights of this release. For more information and registration, visit the [event page](https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cloud-native-live-kubernetes-v135-release/) on the CNCF Online Programs site.
--&gt;
&lt;p&gt;欢迎在 &lt;strong&gt;2026 年 1 月 14 日（星期三）17:00（UTC）&lt;/strong&gt; 与 Kubernetes v1.35 发布团队成员一起，
了解本次发布的重点亮点。有关更多信息与注册方式，请访问 CNCF Online Programs 网站上的&lt;a href=&#34;https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cloud-native-live-kubernetes-v135-release/&#34;&gt;活动页面&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Get involved
--&gt;
&lt;h2 id=&#34;get-involved&#34;&gt;参与其中  &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#get-involved&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The simplest way to get involved with Kubernetes is by joining one of the many [Special Interest Groups](https://github.com/kubernetes/community/blob/master/sig-list.md) (SIGs) that align with your interests. Have something you’d like to broadcast to the Kubernetes community? Share your voice at our weekly [community meeting](https://github.com/kubernetes/community/tree/master/communication), and through the channels below. Thank you for your continued feedback and support.
--&gt;
&lt;p&gt;参与 Kubernetes 最简单的方式之一，是加入与你兴趣相符的众多&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-list.md&#34;&gt;特别兴趣小组（Special Interest Groups，SIG）&lt;/a&gt;
之一。你想向 Kubernetes 社区发布一些内容吗？欢迎在我们每周的&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/communication&#34;&gt;社区会议&lt;/a&gt;
上发声，也可以通过以下渠道参与交流。感谢你持续的反馈与支持。&lt;/p&gt;
&lt;!--
* Follow us on Bluesky [@Kubernetesio](https://bsky.app/profile/kubernetes.io) for the latest updates
--&gt;
&lt;ul&gt;
&lt;li&gt;在 Bluesky 关注我们：&lt;a href=&#34;https://bsky.app/profile/kubernetes.io&#34;&gt;@Kubernetesio&lt;/a&gt;，获取最新动态&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* Join the community discussion on [Discuss](https://discuss.kubernetes.io/)
--&gt;
&lt;ul&gt;
&lt;li&gt;在 &lt;a href=&#34;https://discuss.kubernetes.io/&#34;&gt;Discuss&lt;/a&gt; 加入社区讨论&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* Join the community on [Slack](http://slack.k8s.io/)
--&gt;
&lt;ul&gt;
&lt;li&gt;在 &lt;a href=&#34;http://slack.k8s.io/&#34;&gt;Slack&lt;/a&gt; 加入社区&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* Post questions (or answer questions) on [Stack Overflow](http://stackoverflow.com/questions/tagged/kubernetes)
--&gt;
&lt;ul&gt;
&lt;li&gt;在 &lt;a href=&#34;http://stackoverflow.com/questions/tagged/kubernetes&#34;&gt;Stack Overflow&lt;/a&gt; 提问（或解答问题）&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* Share your Kubernetes [story](https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform)
--&gt;
&lt;ul&gt;
&lt;li&gt;分享你的 Kubernetes &lt;a href=&#34;https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform&#34;&gt;故事&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* Read more about what’s happening with Kubernetes on the [blog](https://kubernetes.io/blog/)
--&gt;
&lt;ul&gt;
&lt;li&gt;在&lt;a href=&#34;https://kubernetes.io/blog/&#34;&gt;博客&lt;/a&gt;阅读 Kubernetes 的更多动态&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
* Learn more about the [Kubernetes Release Team](https://github.com/kubernetes/sig-release/tree/master/release-team)
--&gt;
&lt;ul&gt;
&lt;li&gt;了解更多关于 &lt;a href=&#34;https://github.com/kubernetes/sig-release/tree/master/release-team&#34;&gt;Kubernetes 发布团队&lt;/a&gt;的信息&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.35 抢先一览</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/11/26/kubernetes-v1-35-sneak-peek/</link>
      <pubDate>Wed, 26 Nov 2025 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/11/26/kubernetes-v1-35-sneak-peek/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#39;Kubernetes v1.35 Sneak Peek&#39;
date: 2025-11-26
slug: kubernetes-v1-35-sneak-peek
author: &gt;
  Aakanksha Bhende,
  Arujjwal Negi,
  Chad M. Crowell,
  Graziano Casto,
  Swathi Rao
--&gt;
&lt;!--
As the release of Kubernetes v1.35 approaches, the Kubernetes project continues to evolve.
Features may be deprecated, removed, or replaced to improve the project&#39;s overall health.
This blog post outlines planned changes for the v1.35 release that the release team believes
you should be aware of to ensure the continued smooth operation of your Kubernetes cluster(s),
and to keep you up to date with the latest developments.
The information below is based on the current status of the v1.35 release
and is subject to change before the final release date.
--&gt;
&lt;p&gt;随着 Kubernetes v1.35 发布的临近，Kubernetes 项目持续演进。
为了改善项目的整体健康状况，某些功能可能会被弃用、移除或替换。
本博客文章概述了 v1.35 版本的计划变更，
发布团队认为你应该了解这些变更，以确保 Kubernetes 集群的持续平稳运行，
并让你了解最新进展。
以下信息基于 v1.35 版本的当前状态，在最终发布日期之前可能会发生变化。&lt;/p&gt;
&lt;!--
## Deprecations and removals for Kubernetes v1.35
--&gt;
&lt;h2 id=&#34;deprecations-and-removals-for-kubernetes-v1-35&#34;&gt;Kubernetes v1.35 的弃用和移除&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecations-and-removals-for-kubernetes-v1-35&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### cgroup v1 support
--&gt;
&lt;h3 id=&#34;cgroup-v1-support&#34;&gt;cgroup v1 支持&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#cgroup-v1-support&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
On Linux nodes, container runtimes typically rely on cgroups (short for &#34;control groups&#34;).
Support for using cgroup v2 has been stable in Kubernetes since v1.25,
providing an alternative to the original v1 cgroup support.
While cgroup v1 provided the initial resource control mechanism,
it suffered from well-known inconsistencies and limitations.
Adding support for cgroup v2 allowed use of a unified control group hierarchy,
improved resource isolation, and served as the foundation for modern features,
making legacy cgroup v1 support ready for removal.
The removal of cgroup v1 support will only impact cluster administrators
running nodes on older Linux distributions that do not support cgroup v2;
on those nodes, the `kubelet` will fail to start.
Administrators must migrate their nodes to systems with cgroup v2 enabled.
More details on compatibility requirements will be available in a blog post
soon after the v1.35 release.
--&gt;
&lt;p&gt;在 Linux 节点上，容器运行时通常依赖于 cgroups（&amp;quot;control groups&amp;quot; 的缩写）。
自 v1.25 以来，Kubernetes 中对 cgroup v2 的支持已经稳定，
为原有的 v1 cgroup 支持提供了替代方案。
虽然 cgroup v1 提供了初始的资源控制机制，
但它存在众所周知的不一致性和局限性。
添加对 cgroup v2 的支持允许使用统一的控制组层次结构，
改善了资源隔离，并为现代功能奠定了基础，
使得传统的 cgroup v1 支持可以准备移除。
移除 cgroup v1 支持只会影响在不支持 cgroup v2 的旧版 Linux 发行版上运行节点的集群管理员；
在这些节点上，&lt;code&gt;kubelet&lt;/code&gt; 将无法启动。
管理员必须将其节点迁移到启用了 cgroup v2 的系统。
关于兼容性要求的更多详细信息将在 v1.35 发布后不久在博客文章中提供。&lt;/p&gt;
&lt;!--
To learn more, read [about cgroup v2](/docs/concepts/architecture/cgroups/);
you can also track the switchover work via [KEP-5573: Remove cgroup v1 support](https://kep.k8s.io/5573).
--&gt;
&lt;p&gt;要了解更多信息，请阅读&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/architecture/cgroups/&#34;&gt;关于 cgroup v2&lt;/a&gt;；
你也可以通过 &lt;a href=&#34;https://kep.k8s.io/5573&#34;&gt;KEP-5573：移除 cgroup v1 支持&lt;/a&gt; 跟踪切换工作。&lt;/p&gt;
&lt;!--
### Deprecation of ipvs mode in kube-proxy
--&gt;
&lt;h3 id=&#34;deprecation-of-ipvs-mode-in-kube-proxy&#34;&gt;kube-proxy 中 ipvs 模式的弃用&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#deprecation-of-ipvs-mode-in-kube-proxy&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Many releases ago, the Kubernetes project implemented an [ipvs](/docs/reference/networking/virtual-ips/#proxy-mode-ipvs)
mode in `kube-proxy`.
It was adopted as a way to provide high-performance service load balancing,
with better performance than the existing `iptables` mode.
However, maintaining feature parity between ipvs and other kube-proxy modes
became difficult, due to technical complexity and diverging requirements.
This created significant technical debt and made the ipvs backend impractical
to support alongside newer networking capabilities.
--&gt;
&lt;p&gt;许多版本之前，Kubernetes 项目在 &lt;code&gt;kube-proxy&lt;/code&gt; 中实现了
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/networking/virtual-ips/#proxy-mode-ipvs&#34;&gt;ipvs&lt;/a&gt; 模式。
它被采用作为一种提供高性能服务负载均衡的方式，
性能优于现有的 &lt;code&gt;iptables&lt;/code&gt; 模式。
然而，由于技术复杂性和需求分歧，
在 ipvs 和其他 kube-proxy 模式之间保持功能对等变得困难。
这造成了重大的技术债务，并使 ipvs 后端难以与更新的网络功能一起支持。&lt;/p&gt;
&lt;!--
The Kubernetes project intends to deprecate kube-proxy `ipvs` mode in the v1.35 release,
to streamline the `kube-proxy` codebase.
For Linux nodes, the recommended `kube-proxy` mode is already [nftables](/docs/reference/networking/virtual-ips/#proxy-mode-nftables).
--&gt;
&lt;p&gt;Kubernetes 项目计划在 v1.35 版本中弃用 kube-proxy &lt;code&gt;ipvs&lt;/code&gt; 模式，
以简化 &lt;code&gt;kube-proxy&lt;/code&gt; 代码库。
对于 Linux 节点，推荐的 &lt;code&gt;kube-proxy&lt;/code&gt; 模式已经是
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/networking/virtual-ips/#proxy-mode-nftables&#34;&gt;nftables&lt;/a&gt;。&lt;/p&gt;
&lt;!--
You can find more in [KEP-5495: Deprecate ipvs mode in kube-proxy](https://kep.k8s.io/5495)
--&gt;
&lt;p&gt;你可以在 &lt;a href=&#34;https://kep.k8s.io/5495&#34;&gt;KEP-5495：弃用 kube-proxy 中的 ipvs 模式&lt;/a&gt; 中找到更多信息。&lt;/p&gt;
&lt;!--
### Kubernetes is deprecating containerd v1.y support
--&gt;
&lt;h3 id=&#34;kubernetes-is-deprecating-containerd-v1-y-support&#34;&gt;Kubernetes 正在弃用 containerd v1.y 支持&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#kubernetes-is-deprecating-containerd-v1-y-support&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
While Kubernetes v1.35 still supports containerd 1.7 and other LTS releases of containerd,
as a consequence of automated cgroup driver detection,
the Kubernetes SIG Node community has formally agreed upon a final support timeline
for containerd v1.X.
Kubernetes v1.35 is the last release to offer this support (aligned with containerd 1.7 EOL).
--&gt;
&lt;p&gt;虽然 Kubernetes v1.35 仍然支持 containerd 1.7 和其他 containerd LTS 版本，
但由于自动化的 cgroup 驱动程序检测，
Kubernetes SIG Node 社区已正式商定了 containerd v1.X 的最终支持时间表。
Kubernetes v1.35 是提供此支持的最后一个版本（与 containerd 1.7 EOL 对齐）。&lt;/p&gt;
&lt;!--
This is a final warning that if you are using containerd 1.X,
you must switch to 2.0 or later before upgrading Kubernetes to the next version.
You are able to monitor the `kubelet_cri_losing_support` metric to determine
if any nodes in your cluster are using a containerd version that will soon be unsupported.
--&gt;
&lt;p&gt;这是最终警告：如果你正在使用 containerd 1.X，
必须在将 Kubernetes 升级到下一个版本之前切换到 2.0 或更高版本。
你可以监控 &lt;code&gt;kubelet_cri_losing_support&lt;/code&gt; 指标来确定
集群中的任何节点是否正在使用即将不受支持的 containerd 版本。&lt;/p&gt;
&lt;!--
You can find more in the [official blog post](/blog/2025/09/12/kubernetes-v1-34-cri-cgroup-driver-lookup-now-ga/#announcement-kubernetes-is-deprecating-containerd-v1-y-support)
or in [KEP-4033: Discover cgroup driver from CRI](https://kep.k8s.io/4033)
--&gt;
&lt;p&gt;你可以在&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/blog/2025/09/12/kubernetes-v1-34-cri-cgroup-driver-lookup-now-ga/#announcement-kubernetes-is-deprecating-containerd-v1-y-support&#34;&gt;官方博客文章&lt;/a&gt;
或 &lt;a href=&#34;https://kep.k8s.io/4033&#34;&gt;KEP-4033：从 CRI 发现 cgroup 驱动程序&lt;/a&gt; 中找到更多信息。&lt;/p&gt;
&lt;!--
## Featured enhancements of Kubernetes v1.35
--&gt;
&lt;h2 id=&#34;featured-enhancements-of-kubernetes-v1-35&#34;&gt;Kubernetes v1.35 的重点增强功能&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#featured-enhancements-of-kubernetes-v1-35&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The following enhancements are some of those likely to be included in the v1.35 release.
This is not a commitment, and the release content is subject to change.
--&gt;
&lt;p&gt;以下增强功能是可能包含在 v1.35 版本中的部分功能。
这不是承诺，发布内容可能会发生变化。&lt;/p&gt;
&lt;!--
### Node declared features
--&gt;
&lt;h3 id=&#34;node-declared-features&#34;&gt;节点声明式特性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#node-declared-features&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
When scheduling Pods, Kubernetes uses node labels, taints, and tolerations
to match workload requirements with node capabilities.
However, managing feature compatibility becomes challenging during cluster upgrades
due to version skew between the control plane and nodes.
This can lead to Pods being scheduled on nodes that lack required features,
resulting in runtime failures.
--&gt;
&lt;p&gt;在调度 Pod 时，Kubernetes 使用节点标签、污点和容忍度
来匹配工作负载需求与节点能力。
然而，由于控制平面和节点之间的版本偏移，
在集群升级期间管理功能兼容性变得具有挑战性。
这可能导致 Pod 被调度到缺少所需功能的节点上，从而导致运行时失败。&lt;/p&gt;
&lt;!--
The _node declared features_ framework will introduce a standard mechanism
for nodes to declare their supported Kubernetes features.
With the new alpha feature enabled, a Node reports the features it can support,
publishing this information to the control plane through a new `.status.declaredFeatures` field.
Then, the `kube-scheduler`, admission controllers and third-party components
can use these declarations.
For example, you can enforce scheduling and API validation constraints,
ensuring that Pods run only on compatible nodes.
--&gt;
&lt;p&gt;**节点声明式特性（Node Declared Features）**框架将引入一种标准机制，
让节点声明其所支持的 Kubernetes 特性。
启用这一新的 Alpha 特性后，节点会报告其可以支持的特性，
通过新的 &lt;code&gt;.status.declaredFeatures&lt;/code&gt; 字段将此信息发布到控制平面。
然后，&lt;code&gt;kube-scheduler&lt;/code&gt;、准入控制器和第三方组件可以使用这些声明。
例如，你可以强制执行调度和 API 验证约束，
确保 Pod 仅在兼容的节点上运行。&lt;/p&gt;
&lt;!--
This approach reduces manual node labeling, improves scheduling accuracy,
and prevents incompatible pod placements proactively.
It also integrates with the Cluster Autoscaler for informed scale-up decisions.
Feature declarations are temporary and tied to Kubernetes feature gates,
enabling safe rollout and cleanup.
--&gt;
&lt;p&gt;这种方法可以减少手动为节点打标签的操作，提高调度准确性，
并主动防止不兼容的 Pod 放置。
它还与集群自动扩缩器（Cluster Autoscaler）集成，以便做出明智的扩容决策。
特性声明是临时性的，并与 Kubernetes 特性门控绑定，
从而实现安全的推出和清理。&lt;/p&gt;
&lt;!--
Targeting alpha in v1.35, _node declared features_ aims to solve version skew
scheduling issues by making node capabilities explicit,
enhancing reliability and cluster stability in heterogeneous version environments.
--&gt;
&lt;p&gt;目标是在 v1.35 中达到 Alpha 阶段，&lt;strong&gt;节点声明式特性&lt;/strong&gt;旨在通过明确节点能力
来解决版本偏移调度问题，在异构版本环境中增强可靠性和集群稳定性。&lt;/p&gt;
&lt;!--
To learn more about this before the official documentation is published,
you can read [KEP-5328](https://kep.k8s.io/5328).
--&gt;
&lt;p&gt;在官方文档发布之前了解更多信息，你可以阅读 &lt;a href=&#34;https://kep.k8s.io/5328&#34;&gt;KEP-5328&lt;/a&gt;。&lt;/p&gt;
&lt;!--
### In-place update of Pod resources
--&gt;
&lt;h3 id=&#34;in-place-update-of-pod-resources&#34;&gt;Pod 资源的原地更新&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#in-place-update-of-pod-resources&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes is graduating in-place updates for Pod resources to General Availability (GA).
This feature allows users to adjust `cpu` and `memory` resources
without restarting Pods or Containers.
Previously, such modifications required recreating Pods,
which could disrupt workloads, particularly for stateful or batch applications.
--&gt;
&lt;p&gt;Kubernetes 正在将 Pod 资源的原地更新提升到正式发布（GA）状态。
此特性允许用户在不重启 Pod 或容器的情况下调整 &lt;code&gt;cpu&lt;/code&gt; 和 &lt;code&gt;memory&lt;/code&gt; 资源。
以前，此类修改需要重新创建 Pod，这可能会中断工作负载，
特别是对于有状态或批处理应用程序。&lt;/p&gt;
&lt;!--
Previous Kubernetes releases already allowed you to change infrastructure resources settings
(requests and limits) for existing Pods.
This allows for smoother [vertical scaling](/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/),
improves efficiency, and can also simplify solution development.
--&gt;
&lt;p&gt;之前的 Kubernetes 版本已经允许你更改现有 Pod 的基础设施资源设置（requests 和 limits）。
这允许更平滑的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/docs/concepts/workloads/autoscaling/vertical-pod-autoscale/&#34;&gt;垂直扩缩容&lt;/a&gt;，
提高效率，还可以简化解决方案开发。&lt;/p&gt;
&lt;!--
The Container Runtime Interface (CRI) has also been improved,
extending the `UpdateContainerResources` API for Windows and future runtimes
while allowing `ContainerStatus` to report real-time resource configurations.
Together, these changes make scaling in Kubernetes faster, more flexible, and disruption-free.
The feature was introduced as alpha in v1.27, graduated to beta in v1.33,
and is targeting graduation to stable in v1.35.
--&gt;
&lt;p&gt;容器运行时接口（CRI）也得到了改进，
为 Windows 和未来的运行时扩展了 &lt;code&gt;UpdateContainerResources&lt;/code&gt; API，
同时允许 &lt;code&gt;ContainerStatus&lt;/code&gt; 报告实时的资源配置情况。
这些更改一起使 Kubernetes 中的扩缩容更快、更灵活且无中断。
此特性在 v1.27 中作为 Alpha 特性引入，在 v1.33 中升级到 Beta，
并且计划在 v1.35 中升级到稳定状态。&lt;/p&gt;
&lt;!--
You can find more in [KEP-1287: In-place Update of Pod Resources](https://kep.k8s.io/1287)
--&gt;
&lt;p&gt;你可以在 &lt;a href=&#34;https://kep.k8s.io/1287&#34;&gt;KEP-1287：Pod 资源的原地更新&lt;/a&gt; 中找到更多信息。&lt;/p&gt;
&lt;!--
### Pod certificates
--&gt;
&lt;h3 id=&#34;pod-certificates&#34;&gt;Pod 证书&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#pod-certificates&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
When running microservices, Pods often require a strong cryptographic identity
to authenticate with each other using mutual TLS (mTLS).
While Kubernetes provides Service Account tokens,
these are designed for authenticating to the API server,
not for general-purpose workload identity.
--&gt;
&lt;p&gt;在运行微服务时，Pod 通常需要强加密身份，
以便使用双向 TLS（mTLS）相互进行身份认证。
虽然 Kubernetes 提供服务账号令牌，
但这些令牌设计用于向 API 服务器进行身份认证，
而不是用于通用工作负载身份。&lt;/p&gt;
&lt;!--
Before this enhancement, operators had to rely on complex, external projects
like SPIFFE/SPIRE or cert-manager to provision and rotate certificates for their workloads.
But what if you could issue a unique, short-lived certificate to your Pods natively and automatically?
KEP-4317 is designed to enable such native workload identity.
It opens up various possibilities for securing pod-to-pod communication
by allowing the `kubelet` to request and mount certificates for a Pod via a projected volume.
--&gt;
&lt;p&gt;在此增强之前，操作员必须依赖复杂的外部项目（如 SPIFFE/SPIRE 或 cert-manager）
来为其工作负载提供和轮换证书。
但是，如果你可以原生且自动地为 Pod 颁发唯一的短期证书呢？
KEP-4317 旨在启用这种原生工作负载身份。
它通过允许 &lt;code&gt;kubelet&lt;/code&gt; 通过投影卷为 Pod 请求和挂载证书，
为保护 Pod 到 Pod 的通信开辟了多种可能性。&lt;/p&gt;
&lt;!--
This provides a built-in mechanism for workload identity,
complete with automated certificate rotation,
significantly simplifying the setup of service meshes and other zero-trust network policies.
This feature was introduced as alpha in v1.34 and is targeting beta in v1.35.
--&gt;
&lt;p&gt;Pod 证书为工作负载身份提供了一种内置的机制，包括自动证书轮换，
显著简化了服务网格和其他零信任网络策略的设置。
该特性在 v1.34 中作为 Alpha 特性引入，目标是在 v1.35 中达到 Beta 阶段。&lt;/p&gt;
&lt;!--
You can find more in [KEP-4317: Pod Certificates](https://kep.k8s.io/4317)
--&gt;
&lt;p&gt;你可以在 &lt;a href=&#34;https://kep.k8s.io/4317&#34;&gt;KEP-4317：Pod 证书&lt;/a&gt; 中找到更多信息。&lt;/p&gt;
&lt;!--
### Numeric values for taints
--&gt;
&lt;h3 id=&#34;numeric-values-for-taints&#34;&gt;数值形式的污点&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#numeric-values-for-taints&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes is enhancing [taints and tolerations](/docs/concepts/scheduling-eviction/taint-and-toleration/)
by adding numeric comparison operators, such as `Gt` (Greater Than) and `Lt` (Less Than).
--&gt;
&lt;p&gt;Kubernetes 正在通过添加数值比较运算符（如 &lt;code&gt;Gt&lt;/code&gt;（大于）和 &lt;code&gt;Lt&lt;/code&gt;（小于））
来增强&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration/&#34;&gt;污点和容忍度&lt;/a&gt;。&lt;/p&gt;
&lt;!--
Previously, tolerations supported only exact (`Equal`) or existence (`Exists`) matches,
which were not suitable for numeric properties such as reliability SLAs.
--&gt;
&lt;p&gt;以前，容忍度仅支持精确（&lt;code&gt;Equal&lt;/code&gt;）或存在（&lt;code&gt;Exists&lt;/code&gt;）匹配，
这不适用于可靠性 SLA 等数值属性。&lt;/p&gt;
&lt;!--
With this change, a Pod can use a toleration to &#34;opt-in&#34; to nodes
that meet a specific numeric threshold.
For example, a Pod can require a Node with an SLA taint value greater than 950
(`operator: Gt`, `value: &#34;950&#34;`).
--&gt;
&lt;p&gt;通过此更改，Pod 可以使用容忍度来&amp;quot;选择&amp;quot;满足特定数值阈值的节点。
例如，Pod 可以要求 SLA 污点值大于 950 的节点（&lt;code&gt;operator: Gt&lt;/code&gt;，&lt;code&gt;value: &amp;quot;950&amp;quot;&lt;/code&gt;）。&lt;/p&gt;
&lt;!--
This approach is more powerful than Node Affinity because it supports the NoExecute effect,
allowing Pods to be automatically evicted if a node&#39;s numeric value
drops below the tolerated threshold.
--&gt;
&lt;p&gt;这种方法比节点亲和性更强大，因为它支持 NoExecute 效果，
如果节点的数值降至容忍阈值以下，允许自动驱逐 Pod。&lt;/p&gt;
&lt;!--
You can find more in [KEP-5471: Enable SLA-based Scheduling](https://kep.k8s.io/5471)
--&gt;
&lt;p&gt;你可以在 &lt;a href=&#34;https://kep.k8s.io/5471&#34;&gt;KEP-5471：启用基于 SLA 的调度&lt;/a&gt; 中找到更多信息。&lt;/p&gt;
&lt;!--
### User namespaces
--&gt;
&lt;h3 id=&#34;user-namespaces&#34;&gt;用户名字空间&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#user-namespaces&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
When running Pods, you can use `securityContext` to drop privileges,
but containers inside the pod often still run as root (UID 0).
This simplicity poses a significant challenge,
as that container UID 0 maps directly to the host&#39;s root user.
--&gt;
&lt;p&gt;在运行 Pod 时，你可以使用 &lt;code&gt;securityContext&lt;/code&gt; 来去除特权，
但 Pod 内的容器通常仍以 root（UID 0）运行。
这种简单性带来了重大挑战，因为容器 UID 0 直接映射到主机的 root 用户。&lt;/p&gt;
&lt;!--
Before this enhancement, a container breakout vulnerability
could grant an attacker full root access to the node.
But what if you could dynamically remap the container&#39;s root user
to a safe, unprivileged user on the host?
KEP-127 specifically allows such native support for Linux User Namespaces.
It opens up various possibilities for pod security
by isolating container and host user/group IDs.
This allows a process to have root privileges (UID 0) within its namespace,
while running as a non-privileged, high-numbered UID on the host.
--&gt;
&lt;p&gt;在此增强之前，容器逃逸漏洞可能授予攻击者对节点的完全 root 访问权限。
但是，如果你可以将容器的 root 用户动态重新映射到主机上的安全、无特权用户呢？
KEP-127 专门为 Linux 用户名字空间提供原生支持。
它通过隔离容器和主机用户/组 ID 为 Pod 安全开辟了各种可能性。
这允许进程在其名字空间内拥有 root 权限（UID 0），
同时在主机上以非特权的高编号 UID 运行。&lt;/p&gt;
&lt;!--
Released as alpha in v1.25 and beta in v1.30,
this feature continues to progress through beta maturity,
paving the way for truly &#34;rootless&#34; containers
that drastically reduce the attack surface for a whole class of security vulnerabilities.
--&gt;
&lt;p&gt;该特性在 v1.25 中作为 Alpha 特性发布，并在 v1.30 中进阶到 Beta 阶段，
在 Beta 成熟度级别，此特性仍在进一步演化，
为真正的&amp;quot;无 root&amp;quot;容器铺平道路，
这些改进大大减少了一整类安全漏洞的攻击面。&lt;/p&gt;
&lt;!--
You can find more in [KEP-127: User Namespaces](https://kep.k8s.io/127)
--&gt;
&lt;p&gt;你可以在 &lt;a href=&#34;https://kep.k8s.io/127&#34;&gt;KEP-127：用户名字空间&lt;/a&gt; 中找到更多信息。&lt;/p&gt;
&lt;!--
### Support for mounting OCI images as volumes
--&gt;
&lt;h3 id=&#34;support-for-mounting-oci-images-as-volumes&#34;&gt;支持将 OCI 镜像挂载为卷&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#support-for-mounting-oci-images-as-volumes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
When provisioning a Pod, you often need to bundle data, binaries,
or configuration files for your containers.
Before this enhancement, people often included that kind of data
directly into the main container image,
or required a custom init container to download and unpack files into an `emptyDir`.
You can still take either of those approaches, of course.
--&gt;
&lt;p&gt;在配置 Pod 时，你经常需要为容器打包数据、二进制文件或配置文件。
在此增强之前，人们通常将此类数据直接包含在主容器镜像中，
或需要自定义 Init 容器将文件下载并解压到 &lt;code&gt;emptyDir&lt;/code&gt; 中。
当然，你仍然可以采用这两种方法中的任何一种。&lt;/p&gt;
&lt;!--
But what if you could populate a volume directly from a data-only artifact
in an OCI registry, just like pulling a container image?
Kubernetes v1.31 added support for the `image` volume type,
allowing Pods to pull and unpack OCI container image artifacts into a volume declaratively.
--&gt;
&lt;p&gt;但是，如果你可以直接使用 OCI 镜像库中的纯数据工件填充卷，
就像拉取容器镜像一样呢？
Kubernetes v1.31 添加了对 &lt;code&gt;image&lt;/code&gt; 卷类型的支持，
允许 Pod 以声明的方式将 OCI 容器镜像工件拉取并解压到卷中。&lt;/p&gt;
&lt;!--
This allows for seamless distribution of data, binaries, or ML models
using standard registry tooling,
completely decoupling data from the container image
and eliminating the need for complex init containers or startup scripts.
This volume type has been in beta since v1.33
and will likely be enabled by default in v1.35.
--&gt;
&lt;p&gt;这一特性使我们能够使用标准镜像库工具无缝分发数据、二进制文件或 ML 模型，
完全将数据与容器镜像解耦，并消除对复杂 Init 容器或启动脚本的需求。
此卷类型自 v1.33 以来一直处于 Beta 状态，并可能在 v1.35 中默认启用。&lt;/p&gt;
&lt;!--
You can try out the beta version of [`image` volumes](/docs/concepts/storage/volumes/#image),
or you can learn more about the plans from [KEP-4639: OCI Volume Source](https://kep.k8s.io/4639).
--&gt;
&lt;p&gt;你可以试用 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/storage/volumes/#image&#34;&gt;&lt;code&gt;image&lt;/code&gt; 卷&lt;/a&gt; 的 Beta 版本，
或者你可以从 &lt;a href=&#34;https://kep.k8s.io/4639&#34;&gt;KEP-4639：OCI 卷源&lt;/a&gt; 了解更多计划。&lt;/p&gt;
&lt;!--
## Want to know more?
--&gt;
&lt;h2 id=&#34;want-to-know-more&#34;&gt;想了解更多？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#want-to-know-more&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
New features and deprecations are also announced in the Kubernetes release notes.
We will formally announce what&#39;s new in [Kubernetes v1.35](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.35.md)
as part of the CHANGELOG for that release.
--&gt;
&lt;p&gt;新特性和弃用也在 Kubernetes 发布说明中宣布。
我们将正式宣布 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.35.md&#34;&gt;Kubernetes v1.35&lt;/a&gt; 的新内容，
作为该版本 CHANGELOG 的一部分。&lt;/p&gt;
&lt;!--
The Kubernetes v1.35 release is planned for **December 17, 2025**. Stay tuned for updates!
--&gt;
&lt;p&gt;Kubernetes v1.35 版本计划于 &lt;strong&gt;2025 年 12 月 17 日&lt;/strong&gt;发布。请关注更新！&lt;/p&gt;
&lt;!--
You can also see the announcements of changes in the release notes for:
--&gt;
&lt;p&gt;你还可以在以下版本的发布说明中查看变更公告：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.34.md&#34;&gt;Kubernetes v1.34&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.33.md&#34;&gt;Kubernetes v1.33&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.32.md&#34;&gt;Kubernetes v1.32&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.31.md&#34;&gt;Kubernetes v1.31&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.30.md&#34;&gt;Kubernetes v1.30&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## Get involved
--&gt;
&lt;h2 id=&#34;get-involved&#34;&gt;参与进来&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#get-involved&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
The simplest way to get involved with Kubernetes is by joining one of the many
[Special Interest Groups](https://github.com/kubernetes/community/blob/master/sig-list.md) (SIGs)
that align with your interests.
Have something you&#39;d like to broadcast to the Kubernetes community?
Share your voice at our weekly [community meeting](https://github.com/kubernetes/community/tree/master/communication),
and through the channels below.
Thank you for your continued feedback and support.
--&gt;
&lt;p&gt;参与 Kubernetes 最简单的方法是加入众多&lt;a href=&#34;https://github.com/kubernetes/community/blob/master/sig-list.md&#34;&gt;特别兴趣小组&lt;/a&gt;（SIG）
中与你兴趣相符的一个。有什么想向 Kubernetes 社区广播的内容吗？
在我们的每周&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/communication&#34;&gt;社区会议&lt;/a&gt;上
以及通过下面的渠道分享你的声音。感谢你持续的反馈和支持。&lt;/p&gt;
&lt;!--
- Follow us on Bluesky [@kubernetes.io](https://bsky.app/profile/kubernetes.io) for the latest updates
- Join the community discussion on [Discuss](https://discuss.kubernetes.io/)
- Join the community on [Slack](http://slack.k8s.io/)
- Post questions (or answer questions) on [Server Fault](https://serverfault.com/questions/tagged/kubernetes) or [Stack Overflow](http://stackoverflow.com/questions/tagged/kubernetes)
- Share your Kubernetes [story](https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform)
- Read more about what&#39;s happening with Kubernetes on the [blog](https://kubernetes.io/blog/)
- Learn more about the [Kubernetes Release Team](https://github.com/kubernetes/sig-release/tree/master/release-team)
--&gt;
&lt;ul&gt;
&lt;li&gt;在 Bluesky 上关注我们 &lt;a href=&#34;https://bsky.app/profile/kubernetes.io&#34;&gt;@kubernetes.io&lt;/a&gt; 获取最新动态&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;https://discuss.kubernetes.io/&#34;&gt;Discuss&lt;/a&gt; 上加入社区讨论&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;http://slack.k8s.io/&#34;&gt;Slack&lt;/a&gt; 上加入社区&lt;/li&gt;
&lt;li&gt;在 &lt;a href=&#34;https://serverfault.com/questions/tagged/kubernetes&#34;&gt;Server Fault&lt;/a&gt; 或
&lt;a href=&#34;http://stackoverflow.com/questions/tagged/kubernetes&#34;&gt;Stack Overflow&lt;/a&gt; 上发布问题（或回答问题）&lt;/li&gt;
&lt;li&gt;分享你的 Kubernetes &lt;a href=&#34;https://docs.google.com/a/linuxfoundation.org/forms/d/e/1FAIpQLScuI7Ye3VQHQTwBASrgkjQDSS5TP0g3AXfFhwSM9YpHgxRKFA/viewform&#34;&gt;故事&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;在&lt;a href=&#34;https://kubernetes.io/zh-cn/blog/&#34;&gt;博客&lt;/a&gt;上阅读更多关于 Kubernetes 正在发生的事情&lt;/li&gt;
&lt;li&gt;了解更多关于 &lt;a href=&#34;https://github.com/kubernetes/sig-release/tree/master/release-team&#34;&gt;Kubernetes 发布团队&lt;/a&gt; 的信息&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes 配置最佳实践</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/11/25/configuration-good-practices/</link>
      <pubDate>Tue, 25 Nov 2025 00:00:00 +0000</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/11/25/configuration-good-practices/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes Configuration Good Practices&#34;
date: 2025-11-25T00:00:00+00:00
slug: configuration-good-practices
evergreen: true
author: Kirti Goyal
--&gt;
&lt;!--
Configuration is one of those things in Kubernetes that seems small until it&#39;s not.
Configuration is at the heart of every Kubernetes workload.
A missing quote, a wrong API version or a misplaced YAML indent can ruin your entire deploy.
--&gt;
&lt;p&gt;配置是 Kubernetes 中看似微不足道，实则关键的事情之一。
配置是每个 Kubernetes 工作负载的核心。
一个缺失的引号、错误的 API 版本或错位的 YAML 缩进都可能毁掉你的整个部署。&lt;/p&gt;
&lt;!--
This blog brings together tried-and-tested configuration best practices.
The small habits that make your Kubernetes setup clean, consistent and easier to manage.
Whether you are just starting out or already deploying apps daily,
these are the little things that keep your cluster stable and your future self sane.
--&gt;
&lt;p&gt;本博客汇集了经过验证的配置最佳实践。
这些小的习惯让你的 Kubernetes 设置更干净、一致且更易于管理。
无论你是刚刚开始还是已经在每天部署应用，
这些都是让你的集群保持稳定、让未来的你保持理智的小细节。&lt;/p&gt;
&lt;!--
_This blog is inspired by the original *Configuration Best Practices* page,
which has evolved through contributions from many members of the Kubernetes community._
--&gt;
&lt;p&gt;&lt;strong&gt;本博客的灵感源自最初的 Configuration Best Practices（配置最佳实践） 页面，
该页面由 Kubernetes 社区众多成员的贡献不断演进而来。&lt;/strong&gt;&lt;/p&gt;
&lt;!--
## General configuration practices
--&gt;
&lt;h2 id=&#34;general-configuration-practices&#34;&gt;通用配置实践&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#general-configuration-practices&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
### Use the latest stable API version
Kubernetes evolves fast. Older APIs eventually get deprecated and stop working.
So, whenever you are defining resources, make sure you are using the latest stable API version.
You can always check with
--&gt;
&lt;h3 id=&#34;use-the-latest-stable-api-version&#34;&gt;使用最新的稳定 API 版本&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-the-latest-stable-api-version&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Kubernetes 发展很快。旧版 API 最终会被弃用并停止工作。
因此，在定义资源时，请确保使用最新的稳定 API 版本。
你可以随时使用以下命令检查：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl api-resources
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This simple step saves you from future compatibility issues.
--&gt;
&lt;p&gt;这个简单的步骤可以让你避免未来的兼容性问题。&lt;/p&gt;
&lt;!--
### Store configuration in version control
Never apply manifest files directly from your desktop.
Always keep them in a version control system like Git, it&#39;s your safety net.
If something breaks, you can instantly roll back to a previous commit,
compare changes or recreate your cluster setup without panic.
--&gt;
&lt;h3 id=&#34;store-configuration-in-version-control&#34;&gt;将配置存储在版本控制中&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#store-configuration-in-version-control&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;永远不要直接从桌面应用清单文件。
始终将它们保存在像 Git 这样的版本控制系统中，这是你的安全网。
如果出现问题，你可以立即回滚到之前的提交、
比较更改或重新创建集群设置，而不会惊慌。&lt;/p&gt;
&lt;!--
### Write configs in YAML not JSON
Write your configuration files using YAML rather than JSON.
Both work technically, but YAML is just easier for humans.
It&#39;s cleaner to read and less noisy and widely used in the community.
--&gt;
&lt;h3 id=&#34;write-configs-in-yaml-not-json&#34;&gt;使用 YAML 而不是 JSON 编写配置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#write-configs-in-yaml-not-json&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;使用 YAML 而不是 JSON 编写配置文件。
两者在技术上都可以工作，但 YAML 对人类来说更容易。
它更易读、更简洁，并在社区中广泛使用。&lt;/p&gt;
&lt;!--
YAML has some sneaky gotchas with boolean values:
Use only `true` or `false`.
Don&#39;t write `yes`, `no`, `on` or  `off`.
They might work in one version of YAML but break in another.
To be safe, quote anything that looks like a Boolean (for example `&#34;yes&#34;`).
--&gt;
&lt;p&gt;YAML 在布尔值方面有一些隐藏的陷阱：
只使用 &lt;code&gt;true&lt;/code&gt; 或 &lt;code&gt;false&lt;/code&gt;。
不要写 &lt;code&gt;yes&lt;/code&gt;、&lt;code&gt;no&lt;/code&gt;、&lt;code&gt;on&lt;/code&gt; 或 &lt;code&gt;off&lt;/code&gt;。
它们可能在同一个 YAML 版本中工作，但在另一个版本中会失败。
为了安全起见，请给任何看起来像布尔值的内容加引号（例如 &lt;code&gt;&amp;quot;yes&amp;quot;&lt;/code&gt;）。&lt;/p&gt;
&lt;!--
###     Keep configuration simple and minimal
Avoid setting default values that are already handled by Kubernetes.
Minimal manifests are easier to debug, cleaner to review and less likely to break things later.
--&gt;
&lt;h3 id=&#34;keep-configuration-simple-and-minimal&#34;&gt;保持配置简单和最小化&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#keep-configuration-simple-and-minimal&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;避免设置 Kubernetes 已经处理的默认值。
最小化的清单更容易调试、更易于审查，并且以后不太可能破坏东西。&lt;/p&gt;
&lt;!--
###     Group related objects together
If your Deployment, Service and ConfigMap all belong to one app, put them in a single manifest file.
It&#39;s easier to track changes and apply them as a unit.
See the [Guestbook all-in-one.yaml](https://github.com/kubernetes/examples/blob/master/web/guestbook/all-in-one/guestbook-all-in-one.yaml) file for an example of this syntax.
--&gt;
&lt;h3 id=&#34;group-related-objects-together&#34;&gt;将相关对象分组在一起&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#group-related-objects-together&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;如果你的 Deployment、Service 和 ConfigMap 都属于一个应用，
请将它们放在一个清单文件中。
这样更容易跟踪更改并将它们作为一个单元应用。
有关此语法的示例，请参阅
&lt;a href=&#34;https://github.com/kubernetes/examples/blob/master/web/guestbook/all-in-one/guestbook-all-in-one.yaml&#34;&gt;Guestbook all-in-one.yaml&lt;/a&gt; 文件。&lt;/p&gt;
&lt;!--
You can even apply entire directories with:
--&gt;
&lt;p&gt;你甚至可以使用以下命令应用整个目录：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl apply -f configs/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
One command and boom everything in that folder gets deployed.
--&gt;
&lt;p&gt;只需一个命令，该文件夹中的所有内容都会被部署。&lt;/p&gt;
&lt;!--
###     Add helpful annotations
Manifest files are not just for machines, they are for humans too.
Use annotations to describe why something exists or what it does.
A quick one-liner can save hours when debugging later and also allows better collaboration.
--&gt;
&lt;h3 id=&#34;add-helpful-annotations&#34;&gt;添加有用的注解&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#add-helpful-annotations&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;清单文件不仅是为机器准备的，也是为人类准备的。
使用注解来描述某些内容存在的原因或它的作用。
快速的一行注释可以在以后调试时节省数小时，并且还可以实现更好的协作。&lt;/p&gt;
&lt;!--
The most helpful annotation to set is `kubernetes.io/description`.
It&#39;s like using comment, except that it gets copied into the API
so that everyone else can see it even after you deploy.
--&gt;
&lt;p&gt;最有用的注解是 &lt;code&gt;kubernetes.io/description&lt;/code&gt;。
这就像使用注释一样，只是它会被复制到 API 中，
这样其他人在你部署后也能看到它。&lt;/p&gt;
&lt;!--
## Managing Workloads: Pods, Deployments, and Jobs
--&gt;
&lt;h2 id=&#34;managing-workloads-pods-deployments-and-jobs&#34;&gt;管理工作负载：Pod、Deployment 和 Job&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#managing-workloads-pods-deployments-and-jobs&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
A common early mistake in Kubernetes is creating Pods directly.
Pods work, but they don&#39;t reschedule themselves if something goes wrong.
--&gt;
&lt;p&gt;在 Kubernetes 中，一个常见的早期错误是直接创建 Pod。
Pod 可以工作，但如果出现问题，它们不会重新调度自己。&lt;/p&gt;
&lt;!--
_Naked Pods_ (Pods not managed by a controller, such as [Deployment](/docs/concepts/workloads/controllers/deployment/) or a [StatefulSet](/docs/concepts/workloads/controllers/statefulset/)) are fine for testing, but in real setups, they are risky.
--&gt;
&lt;p&gt;&lt;strong&gt;裸 Pod&lt;/strong&gt;（不受控制器管理的 Pod，例如
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/controllers/deployment/&#34;&gt;Deployment&lt;/a&gt; 或
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/controllers/statefulset/&#34;&gt;StatefulSet&lt;/a&gt;）
用于测试是可以的，但在实际设置中，它们是有风险的。&lt;/p&gt;
&lt;!--
Why?
Because if the node hosting that Pod dies, the Pod dies with it
and Kubernetes won&#39;t bring it back automatically.
--&gt;
&lt;p&gt;为什么？
因为如果托管该 Pod 的节点死亡，Pod 也会随之死亡，
Kubernetes 不会自动将其恢复。&lt;/p&gt;
&lt;!--
### Use Deployments for apps that should always be running
A Deployment, which both creates a ReplicaSet to ensure that the desired number of Pods is always available,
and specifies a strategy to replace Pods (such as [RollingUpdate](/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment)),
is almost always preferable to creating Pods directly.
You can roll out a new version, and if something breaks, roll back instantly.
--&gt;
&lt;h3 id=&#34;use-deployments-for-apps-that-should-always-be-running&#34;&gt;对应该始终运行的应用使用 Deployment&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-deployments-for-apps-that-should-always-be-running&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Deployment 既创建 ReplicaSet 以确保所需数量的 Pod 始终可用，
又指定替换 Pod 的策略（例如&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment&#34;&gt;滚动更新&lt;/a&gt;），
几乎总是比直接创建 Pod 更可取。
你可以推出新版本，如果出现问题，可以立即回滚。&lt;/p&gt;
&lt;!--
### Use Jobs for tasks that should finish
A [Job](/docs/concepts/workloads/controllers/job/) is perfect when you need something to run once and then stop
like database migration or batch processing task.
It will retry if the pods fails and report success when it&#39;s done.
--&gt;
&lt;h3 id=&#34;use-jobs-for-tasks-that-should-finish&#34;&gt;对应该完成的任务使用 Job&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-jobs-for-tasks-that-should-finish&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;当你需要某些东西运行一次然后停止时（如数据库迁移或批处理任务），
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/controllers/job/&#34;&gt;Job&lt;/a&gt; 是完美的选择。
如果 Pod 失败，它会重试，并在完成时报告成功。&lt;/p&gt;
&lt;!--
## Service Configuration and Networking
--&gt;
&lt;h2 id=&#34;service-configuration-and-networking&#34;&gt;Service 配置和网络&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#service-configuration-and-networking&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Services are how your workloads talk to each other inside (and sometimes outside) your cluster.
Without them, your pods exist but can&#39;t reach anyone. Let&#39;s make sure that doesn&#39;t happen.
--&gt;
&lt;p&gt;Service 是你的工作负载在集群内部（有时是外部）相互通信的方式。
没有它们，你的 Pod 存在但无法被任何人访问。让我们确保这种情况不会发生。&lt;/p&gt;
&lt;!--
### Create Services before workloads that use them
When Kubernetes starts a Pod, it automatically injects environment variables for existing Services.
So, if a Pod depends on a Service, create a [Service](/docs/concepts/services-networking/service/) **before** its corresponding backend workloads (Deployments or StatefulSets),
and before any workloads that need to access it.
--&gt;
&lt;h3 id=&#34;create-services-before-workloads-that-use-them&#34;&gt;在使用它们的工作负载之前创建 Service&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#create-services-before-workloads-that-use-them&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;当 Kubernetes 启动 Pod 时，它会自动为现有 Service 注入环境变量。
因此，如果 Pod 依赖于 Service，请在其相应的后端工作负载（Deployment 或 StatefulSet）
以及任何需要访问它的工作负载&lt;strong&gt;之前&lt;/strong&gt;创建 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/services-networking/service/&#34;&gt;Service&lt;/a&gt;。&lt;/p&gt;
&lt;!--
For example, if a Service named foo exists, all containers will get the following variables in their initial environment:
--&gt;
&lt;p&gt;例如，如果存在名为 foo 的 Service，所有容器将在其初始环境中获得以下变量：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;FOO_SERVICE_HOST=&amp;lt;the host the Service runs on&amp;gt;
FOO_SERVICE_PORT=&amp;lt;the port the Service runs on&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;!--
DNS based discovery doesn&#39;t have this problem, but it&#39;s a good habit to follow anyway.
--&gt;
&lt;p&gt;基于 DNS 的发现没有这个问题，但无论如何遵循它是一个好习惯。&lt;/p&gt;
&lt;!--
### Use DNS for Service discovery
If your cluster has the DNS [add-on](/docs/concepts/cluster-administration/addons/) (most do),
every Service automatically gets a DNS entry.
That means you can access it by name instead of IP:
--&gt;
&lt;h3 id=&#34;use-dns-for-service-discovery&#34;&gt;使用 DNS 进行 Service 发现&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-dns-for-service-discovery&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;如果你的集群有 DNS &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/cluster-administration/addons/&#34;&gt;安装扩展（Addon）&lt;/a&gt;（大多数都有），
每个 Service 都会自动获得一个 DNS 条目。
这意味着你可以通过名称而不是 IP 访问它：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl http://my-service.default.svc.cluster.local
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
It&#39;s one of those features that makes Kubernetes networking feel magical.
--&gt;
&lt;p&gt;这是让 Kubernetes 网络感觉神奇的特性之一。&lt;/p&gt;
&lt;!--
### Avoid `hostPort` and `hostNetwork` unless absolutely necessary
You&#39;ll sometimes see these options in manifests:
--&gt;
&lt;h3 id=&#34;avoid-hostport-and-hostnetwork-unless-absolutely-necessary&#34;&gt;除非绝对必要，否则避免使用 &lt;code&gt;hostPort&lt;/code&gt; 和 &lt;code&gt;hostNetwork&lt;/code&gt;&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#avoid-hostport-and-hostnetwork-unless-absolutely-necessary&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;你有时会在清单中看到这些选项：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostPort&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;8080&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;hostNetwork&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#a2f;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
But here&#39;s the thing:
They tie your Pods to specific nodes, making them harder to schedule and scale.
Because each &lt;`hostIP`, `hostPort`, `protocol`&gt; combination must be unique.
If you don&#39;t specify the `hostIP` and `protocol` explicitly,
Kubernetes will use `0.0.0.0` as the default `hostIP` and `TCP` as the default `protocol`.
Unless you&#39;re debugging or building something like a network plugin, avoid them.
--&gt;
&lt;p&gt;但问题是：
它们将你的 Pod 绑定到特定节点，使它们更难调度和扩缩容。
因为每个 &amp;lt;&lt;code&gt;hostIP&lt;/code&gt;、&lt;code&gt;hostPort&lt;/code&gt;、&lt;code&gt;protocol&lt;/code&gt;&amp;gt; 组合必须是唯一的。
如果你没有明确指定 &lt;code&gt;hostIP&lt;/code&gt; 和 &lt;code&gt;protocol&lt;/code&gt;，
Kubernetes 将使用 &lt;code&gt;0.0.0.0&lt;/code&gt; 作为默认 &lt;code&gt;hostIP&lt;/code&gt;，使用 &lt;code&gt;TCP&lt;/code&gt; 作为默认 &lt;code&gt;protocol&lt;/code&gt;。
除非你在调试或构建网络插件之类的东西，否则请避免使用它们。&lt;/p&gt;
&lt;!--
If you just need local access for testing, try [`kubectl port-forward`](/docs/reference/kubectl/generated/kubectl_port-forward/):
--&gt;
&lt;p&gt;如果你只需要本地访问进行测试，请尝试 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/kubectl/generated/kubectl_port-forward/&#34;&gt;&lt;code&gt;kubectl port-forward&lt;/code&gt;&lt;/a&gt;：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl port-forward deployment/web 8080:80
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
See [Use Port Forwarding to access applications in a cluster](/docs/tasks/access-application-cluster/port-forward-access-application-cluster/) to learn more.
Or if you really need external access, use a [`type: NodePort` Service](/docs/concepts/services-networking/service/#type-nodeport). That&#39;s the safer, Kubernetes-native way.
--&gt;
&lt;p&gt;有关更多信息，请参阅
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/access-application-cluster/port-forward-access-application-cluster/&#34;&gt;使用端口转发访问集群中的应用程序&lt;/a&gt;。
或者如果你真的需要外部访问，请使用 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/services-networking/service/#type-nodeport&#34;&gt;&lt;code&gt;type: NodePort&lt;/code&gt; Service&lt;/a&gt;。
这是更安全、更符合 Kubernetes 原生方式的做法。&lt;/p&gt;
&lt;!--
### Use headless Services for internal discovery
Sometimes, you don&#39;t want Kubernetes to load balance traffic.
You want to talk directly to each Pod. That&#39;s where [headless Services](/docs/concepts/services-networking/service/#headless-services) come in.
--&gt;
&lt;h3 id=&#34;use-headless-services-for-internal-discovery&#34;&gt;使用无头 Service 进行内部服务发现&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-headless-services-for-internal-discovery&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;有时，你不想让 Kubernetes 负载均衡流量。
你想直接与每个 Pod 通信。这就是&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/services-networking/service/#headless-services&#34;&gt;无头 Service&lt;/a&gt; 的用武之地。&lt;/p&gt;
&lt;!--
You create one by setting `clusterIP: None`.
Instead of a single IP, DNS gives you a list of all Pods IPs,
perfect for apps that manage connections themselves.
--&gt;
&lt;p&gt;你通过设置 &lt;code&gt;clusterIP: None&lt;/code&gt; 来创建一个。
DNS 不是给你一个 IP，而是给你所有 Pod IP 的列表，
这非常适合自己管理连接的应用程序。&lt;/p&gt;
&lt;!--
## Working with labels effectively
--&gt;
&lt;h2 id=&#34;working-with-labels-effectively&#34;&gt;有效使用标签&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#working-with-labels-effectively&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
[Labels](/docs/concepts/overview/working-with-objects/labels/) are key/value pairs that are attached to objects such as Pods.
Labels help you organize, query and group your resources.
They don&#39;t do anything by themselves, but they make everything else from Services to Deployments work together smoothly.
--&gt;
&lt;p&gt;&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/working-with-objects/labels/&#34;&gt;标签&lt;/a&gt;是附加到 Pod 等对象的键/值对。
标签帮助你组织、查询和分组资源。
它们本身不做任何事情，但它们使从 Service 到 Deployment 的所有其他内容都能顺利协同工作。&lt;/p&gt;
&lt;!--
### Use semantics labels
Good labels help you understand what&#39;s what, even after months later.
Define and use [labels](/docs/concepts/overview/working-with-objects/labels/) that identify semantic attributes of your application or Deployment.
For example;
--&gt;
&lt;h3 id=&#34;use-semantics-labels&#34;&gt;使用语义标签&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-semantics-labels&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;好的标签可以帮助你理解什么是什么，即使在几个月后也是如此。
定义并使用&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/working-with-objects/labels/&#34;&gt;标签&lt;/a&gt;来标识应用程序或 Deployment 的语义属性。
例如：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;labels&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;myapp&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;app.kubernetes.io/component&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;web&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;tier&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;frontend&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;phase&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;test&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
  - `app.kubernetes.io/name` : what the app is
  - `tier` : which layer it belongs to (frontend/backend)
  - `phase` : which stage it&#39;s in (test/prod)
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;app.kubernetes.io/name&lt;/code&gt;：应用是什么&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tier&lt;/code&gt;：它属于哪一层（前端/后端）&lt;/li&gt;
&lt;li&gt;&lt;code&gt;phase&lt;/code&gt;：它处于哪个阶段（测试/生产）&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
You can then use these labels to make powerful selectors.
For example:
--&gt;
&lt;p&gt;然后你可以使用这些标签来创建强大的选择算符。
例如：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get pods -l &lt;span style=&#34;color:#b8860b&#34;&gt;tier&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;frontend
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This will list all frontend Pods across your cluster, no matter which Deployment they came from.
Basically you are not manually listing Pod names; you are just describing what you want.
See the [guestbook](https://github.com/kubernetes/examples/tree/master/web/guestbook/) app for examples of this approach.
--&gt;
&lt;p&gt;这将列出集群中所有前端 Pod，无论它们来自哪个 Deployment。
基本上，你不需要手动列出 Pod 名称；你只是在描述你想要什么。
有关此方法的示例，请参阅 &lt;a href=&#34;https://github.com/kubernetes/examples/tree/master/web/guestbook/&#34;&gt;guestbook&lt;/a&gt; 应用。&lt;/p&gt;
&lt;!--
### Use common Kubernetes labels
Kubernetes actually recommends a set of [common labels](/docs/concepts/overview/working-with-objects/common-labels/).
It&#39;s a standardized way to name things across your different workloads or projects.
Following this convention makes your manifests cleaner, and it means that tools such as [Headlamp](https://headlamp.dev/),
[dashboard](https://github.com/kubernetes/dashboard#introduction), or third-party monitoring systems can all
automatically understand what&#39;s running.
--&gt;
&lt;h3 id=&#34;use-common-kubernetes-labels&#34;&gt;使用常见的 Kubernetes 标签&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-common-kubernetes-labels&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Kubernetes 实际上推荐一组&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/working-with-objects/common-labels/&#34;&gt;常见标签&lt;/a&gt;。
这是在你的不同工作负载或项目中命名事物的一种标准方式。
遵循此约定使你的清单更清晰，这意味着诸如 &lt;a href=&#34;https://headlamp.dev/&#34;&gt;Headlamp&lt;/a&gt;、
&lt;a href=&#34;https://github.com/kubernetes/dashboard#introduction&#34;&gt;dashboard&lt;/a&gt; 或第三方监控系统等工具
都可以自动理解正在运行的内容。&lt;/p&gt;
&lt;!--
###     Manipulate labels for debugging
Since controllers (like ReplicaSets or Deployments) use labels to manage Pods,
you can remove a label to &#34;detach&#34; a Pod temporarily.
--&gt;
&lt;h3 id=&#34;manipulate-labels-for-debugging&#34;&gt;操作标签进行调试&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#manipulate-labels-for-debugging&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;由于控制器（如 ReplicaSet 或 Deployment）使用标签来管理 Pod，
你可以删除标签以临时 &amp;quot;分离&amp;quot; Pod。&lt;/p&gt;
&lt;!--
Example:
--&gt;
&lt;p&gt;示例：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl label pod mypod app-
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
The `app-` part removes the label key `app`.
Once that happens, the controller won&#39;t manage that Pod anymore.
It&#39;s like isolating it for inspection, a &#34;quarantine mode&#34; for debugging.
To interactively remove or add labels, use [`kubectl label`](/docs/reference/kubectl/generated/kubectl_label/).
--&gt;
&lt;p&gt;&lt;code&gt;app-&lt;/code&gt; 部分会删除标签键 &lt;code&gt;app&lt;/code&gt;。
一旦发生这种情况，控制器将不再管理该 Pod。
这就像将其隔离以进行检查，一种用于调试的&amp;quot;隔离模式&amp;quot;。
要交互式地删除或添加标签，请使用 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/kubectl/generated/kubectl_label/&#34;&gt;&lt;code&gt;kubectl label&lt;/code&gt;&lt;/a&gt;。&lt;/p&gt;
&lt;!--
You can then check logs, exec into it and once done, delete it manually.
That&#39;s a super underrated trick every Kubernetes engineer should know.
--&gt;
&lt;p&gt;然后你可以检查 Pod 日志、exec 进入 Pod，完成后手动删除 Pod。
这是每个 Kubernetes 工程师都应该知道的超级被低估的技巧。&lt;/p&gt;
&lt;!--
## Handy kubectl tips
--&gt;
&lt;h2 id=&#34;handy-kubectl-tips&#34;&gt;实用的 kubectl 技巧&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#handy-kubectl-tips&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
These small tips make life much easier when you are working with multiple manifest files or clusters.
--&gt;
&lt;p&gt;这些小技巧使你在处理多个清单文件或集群时生活变得更加轻松。&lt;/p&gt;
&lt;!--
### Apply entire directories
Instead of applying one file at a time, apply the whole folder:
--&gt;
&lt;h3 id=&#34;apply-entire-directories&#34;&gt;应用整个目录&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#apply-entire-directories&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;不要一次应用一个文件，而是应用整个文件夹：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# Using server-side apply is also a good practice&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl apply -f configs/ --server-side
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This command looks for `.yaml`, `.yml` and `.json` files in that folder and applies them all together.
It&#39;s faster, cleaner and helps keep things grouped by app.
--&gt;
&lt;p&gt;此命令在该文件夹中查找 &lt;code&gt;.yaml&lt;/code&gt;、&lt;code&gt;.yml&lt;/code&gt; 和 &lt;code&gt;.json&lt;/code&gt; 文件并将它们一起应用。
它更快、更清晰，并有助于按应用分组。&lt;/p&gt;
&lt;!--
### Use label selectors to get or delete resources
You don&#39;t always need to type out resource names one by one.
Instead, use [selectors](/docs/concepts/overview/working-with-objects/labels/#label-selectors) to act on entire groups at once:
--&gt;
&lt;h3 id=&#34;use-label-selectors-to-get-or-delete-resources&#34;&gt;使用标签选择算符获取或删除资源&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-label-selectors-to-get-or-delete-resources&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;你不需要总是逐个输入资源名称。
相反，使用&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/overview/working-with-objects/labels/#label-selectors&#34;&gt;标签选择算符&lt;/a&gt;一次对整个组进行操作：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl get pods -l &lt;span style=&#34;color:#b8860b&#34;&gt;app&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;myapp
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl delete pod -l &lt;span style=&#34;color:#b8860b&#34;&gt;phase&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#a2f&#34;&gt;test&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
It&#39;s especially useful in CI/CD pipelines, where you want to clean up test resources dynamically.
--&gt;
&lt;p&gt;这在 CI/CD 流水线中特别有用，你可以在其中动态清理测试资源。&lt;/p&gt;
&lt;!--
### Quickly create Deployments and Services
For quick experiments, you don&#39;t always need to write a manifest.
You can spin up a Deployment right from the CLI:
--&gt;
&lt;h3 id=&#34;quickly-create-deployments-and-services&#34;&gt;快速创建 Deployment 和 Service&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#quickly-create-deployments-and-services&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;对于快速实验，你不需要总是编写清单。
你可以直接从 CLI 启动 Deployment：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl create deployment webapp --image&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;nginx
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Then expose it as a Service:
--&gt;
&lt;p&gt;然后将其公开为 Service：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl expose deployment webapp --port&lt;span style=&#34;color:#666&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;80&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This is great when you just want to test something before writing full manifests.
Also, see [Use a Service to Access an Application in a cluster](/docs/tasks/access-application-cluster/service-access-application-cluster/) for an example.
--&gt;
&lt;p&gt;当你想在编写完整清单之前测试某些内容时，这非常有用。
另外，有关示例，请参阅
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/access-application-cluster/service-access-application-cluster/&#34;&gt;使用 Service 访问集群中的应用程序&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## Conclusion
--&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;结论&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#conclusion&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Cleaner configuration leads to calmer cluster administrators.
If you stick to a few simple habits: keep configuration simple and minimal, version-control everything,
use consistent labels, and avoid relying on naked Pods, you&#39;ll save yourself hours of debugging down the road.
--&gt;
&lt;p&gt;更清晰的配置可以让集群管理员更为泰然自若。
如果你坚持几个简单的习惯：保持配置简单和最小化、对所有内容进行版本控制、
使用一致的标签，并避免依赖裸 Pod，你将为自己节省数小时的调试时间。&lt;/p&gt;
&lt;!--
The best part?
Clean configurations stay readable. Even after months, you or anyone on your team
can glance at them and know exactly what&#39;s happening.
--&gt;
&lt;p&gt;最好的部分是什么？
清晰的配置保持可读性。即使在几个月后，
你或团队中的任何人都可以瞥一眼它们并确切知道发生了什么。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Ingress NGINX 退役：你需要了解的内容</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/11/11/ingress-nginx-retirement/</link>
      <pubDate>Tue, 11 Nov 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/11/11/ingress-nginx-retirement/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Ingress NGINX Retirement: What You Need to Know&#34;
slug: ingress-nginx-retirement
canonicalUrl: https://www.kubernetes.dev/blog/2025/11/12/ingress-nginx-retirement
date: 2025-11-11T10:30:00-08:00
author: &gt;
  Tabitha Sable (Kubernetes SRC)
--&gt;
&lt;!--
To prioritize the safety and security of the ecosystem, Kubernetes SIG Network and the Security Response Committee are announcing the upcoming retirement of [Ingress NGINX](https://github.com/kubernetes/ingress-nginx/). Best-effort maintenance will continue until March 2026. Afterward, there will be no further releases, no bugfixes, and no updates to resolve any security vulnerabilities that may be discovered. **Existing deployments of Ingress NGINX will continue to function and installation artifacts will remain available.**

We recommend migrating to one of the many alternatives. Consider [migrating to Gateway API](https://gateway-api.sigs.k8s.io/guides/), the modern replacement for Ingress. If you must continue using Ingress, many alternative Ingress controllers are [listed in the Kubernetes documentation](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/). Continue reading for further information about the history and current state of Ingress NGINX, as well as next steps.
--&gt;
&lt;p&gt;为了优先考虑生态系统的安全，Kubernetes SIG Network 和安全响应委员会宣布
&lt;a href=&#34;https://github.com/kubernetes/ingress-nginx/&#34;&gt;Ingress NGINX&lt;/a&gt; 即将退役，
并将尽力将其维护期持续到 2026 年 3 月。
之后，将不再有进一步的版本发布、错误修复和更新来解决可能发现的任何安全漏洞。
&lt;strong&gt;现有的 Ingress NGINX Deployment 将继续运行，并且安装工件仍将可用。&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;我们建议迁移到替代方案之一。考虑&lt;a href=&#34;https://gateway-api.sigs.k8s.io/guides/&#34;&gt;迁移到 Gateway API&lt;/a&gt;，
这是 Ingress 的现代替代品。如果你必须继续使用 Ingress，许多替代的 Ingress 控制器已在
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/services-networking/ingress-controllers/&#34;&gt;Kubernetes 文档中列出&lt;/a&gt;。
下文介绍有关 Ingress NGINX 的历史和当前状态以及后续步骤的更多信息。&lt;/p&gt;
&lt;!--
## About Ingress NGINX

[Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) is the original user-friendly way to direct network traffic to workloads running on Kubernetes. ([Gateway API](https://kubernetes.io/docs/concepts/services-networking/gateway/) is a newer way to achieve many of the same goals.) In order for an Ingress to work in your cluster, there must be an [Ingress controller](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/) running. There are many Ingress controller choices available, which serve the needs of different users and use cases. Some are cloud-provider specific, while others have more general applicability.

[Ingress NGINX](https://www.github.com/kubernetes/ingress-nginx) was an Ingress controller, developed early in the history of the Kubernetes project as an example implementation of the API. It became very popular due to its tremendous flexibility, breadth of features, and independence from any particular cloud or infrastructure provider. Since those days, many other Ingress controllers have been created within the Kubernetes project by community groups, and by cloud native vendors. Ingress NGINX has continued to be one of the most popular, deployed as part of many hosted Kubernetes platforms and within innumerable independent users’ clusters.
--&gt;
&lt;h2 id=&#34;关于-ingress-nginx&#34;&gt;关于 Ingress NGINX&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%85%b3%e4%ba%8e-ingress-nginx&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;a href=&#34;https://kubernetes.io/zh-cn/docs/concepts/services-networking/ingress/&#34;&gt;Ingress&lt;/a&gt;
是将网络流量导向运行在 Kubernetes 上的工作负载的原生的、用户友好的方式。
（&lt;a href=&#34;https://kubernetes.io/zh-cn/docs/concepts/services-networking/gateway/&#34;&gt;Gateway API&lt;/a&gt; 是实现许多相同目标的新方法。）
为了使 Ingress 在集群中工作，你必须运行一个
&lt;a href=&#34;https://kubernetes.io/zh-cn/docs/concepts/services-networking/ingress-controllers/&#34;&gt;Ingress 控制器&lt;/a&gt;。
有多种 Ingress 控制器可供选择，可以满足不同用户和使用场景的需求。
有些是特定于云提供商的，而其他的则具有更广泛的应用性。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.github.com/kubernetes/ingress-nginx&#34;&gt;Ingress NGINX&lt;/a&gt;
是一个 Ingress 控制器，作为 API 的示例实现，在 Kubernetes 项目早期开发。
由于其极大的灵活性、丰富的特性以及不依赖于任何特定的云或基础设施提供商，它变得非常流行。
自那时以来，许多其他的 Ingress 控制器已经在 Kubernetes 项目中由社区小组和云原生供应商创建。
Ingress NGINX 一直是其中最受欢迎的选择之一，被部署在许多托管的 Kubernetes
平台上以及无数独立用户的集群中。&lt;/p&gt;
&lt;!--
## History and Challenges

The breadth and flexibility of Ingress NGINX has caused maintenance challenges. Changing expectations about cloud native software have also added complications. What were once considered helpful options have sometimes come to be considered serious security flaws, such as the ability to add arbitrary NGINX configuration directives via the &#34;snippets&#34; annotations. Yesterday’s flexibility has become today’s insurmountable technical debt.

Despite the project’s popularity among users, Ingress NGINX has always struggled with insufficient or barely-sufficient maintainership. For years, the project has had only one or two people doing development work, on their own time, after work hours and on weekends. Last year, the Ingress NGINX maintainers [announced](https://kccncna2024.sched.com/event/1hoxW/securing-the-future-of-ingress-nginx-james-strong-isovalent-marco-ebert-giant-swarm) their plans to wind down Ingress NGINX and develop a replacement controller together with the Gateway API community. Unfortunately, even that announcement failed to generate additional interest in helping maintain Ingress NGINX or develop InGate to replace it. (InGate development never progressed far enough to create a mature replacement; it will also be retired.)
--&gt;
&lt;h2 id=&#34;历史与挑战&#34;&gt;历史与挑战&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8e%86%e5%8f%b2%e4%b8%8e%e6%8c%91%e6%88%98&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ingress NGINX 的广度和灵活性导致了维护上的挑战，对于云原生软件不断变化的期望也增加了复杂性。
其中曾经被认为是有帮助的选项，有时却被视为严重的安全缺陷，例如通过“片段”注解添加任意 NGINX 配置指令的能力。
昨天的灵活性已成为今天的难以克服的技术债务。&lt;/p&gt;
&lt;p&gt;尽管该项目在用户中非常受欢迎，但 Ingress NGINX 一直存在一个问题，就是维护者很少、勉强应付。
多年来，项目仅有的一到两个人在其业余时间、下班后和周末进行开发工作。去年，Ingress NGINX
维护者&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/contribute/blog/securing-the-future-of-ingress-nginx&#34;&gt;宣布&lt;/a&gt;
他们的计划是逐步停止 Ingress NGINX，并与 Gateway API 社区一起开发替代控制器。
不幸的是，即使是这样的公告也未能激起更多兴趣来帮助维护 Ingress NGINX 或开发 InGate 以取代它。
（InGate 的开发从未进展到足以创建一个成熟的替代品；它也将被退役。）&lt;/p&gt;
&lt;!--
## Current State and Next Steps

Currently, Ingress NGINX is receiving best-effort maintenance. SIG Network and the Security Response Committee have exhausted our efforts to find additional support to make Ingress NGINX sustainable. To prioritize user safety, we must retire the project.

In March 2026, Ingress NGINX maintenance will be halted, and the project will be [retired](https://github.com/kubernetes-retired/). After that time, there will be no further releases, no bugfixes, and no updates to resolve any security vulnerabilities that may be discovered. The GitHub repositories will be made read-only and left available for reference.
--&gt;
&lt;h2 id=&#34;当前状态与下一步&#34;&gt;当前状态与下一步&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%bd%93%e5%89%8d%e7%8a%b6%e6%80%81%e4%b8%8e%e4%b8%8b%e4%b8%80%e6%ad%a5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;目前，Ingress NGINX 的维护模式是尽力而为的。
SIG Network 和安全响应委员会已经用尽全力寻找额外的支持来使 Ingress NGINX 可持续发展。
为了优先考虑用户的安全，我们必须停止该项目。&lt;/p&gt;
&lt;p&gt;2026 年 3 月，Ingress NGINX 的维护将被停止，项目将被&lt;a href=&#34;https://github.com/kubernetes-retired/&#34;&gt;退役&lt;/a&gt;。
之后，将不再有进一步的版本发布、错误修复或更新来解决可能发现的任何安全漏洞。
GitHub 仓库将变为只读，并留作参考。&lt;/p&gt;
&lt;!--
Existing deployments of Ingress NGINX will not be broken. Existing project artifacts such as Helm charts and container images will remain available.

In most cases, you can check whether you use Ingress NGINX by running `kubectl get pods \--all-namespaces \--selector app.kubernetes.io/name=ingress-nginx` with cluster administrator permissions.
--&gt;
&lt;p&gt;现有的 Ingress NGINX 部署不会受到影响。现有的项目制品，如 Helm 图表和容器镜像，仍将保持可用。&lt;/p&gt;
&lt;p&gt;在大多数情况下，你可以通过运行 &lt;code&gt;kubectl get pods --all-namespaces --selector app.kubernetes.io/name=ingress-nginx&lt;/code&gt;
来检查是否使用了 Ingress NGINX，这需要集群管理员权限。&lt;/p&gt;
&lt;!--
We would like to thank the Ingress NGINX maintainers for their work in creating and maintaining this project–their dedication remains impressive. This Ingress controller has powered billions of requests in datacenters and homelabs all around the world. In a lot of ways, Kubernetes wouldn’t be where it is without Ingress NGINX, and we are grateful for so many years of incredible effort.

**SIG Network and the Security Response Committee recommend that all Ingress NGINX users begin migration to Gateway API or another Ingress controller immediately.** Many options are listed in the Kubernetes documentation: [Gateway API](https://gateway-api.sigs.k8s.io/guides/), [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/). Additional options may be available from vendors you work with.
--&gt;
&lt;p&gt;我们想感谢 Ingress NGINX 的维护者们在创建和维护此项目中所做的工作——他们的奉献精神令人印象深刻。
这个 Ingress 控制器在全球的数据中心和家庭实验室中处理了数十亿次请求。
在很多方面，如果没有 Ingress NGINX，Kubernetes 不会取得如今的成就，我们对如此多年的杰出努力表示感激。&lt;/p&gt;
&lt;p&gt;**SIG Network 和安全响应委员会建议所有 Ingress NGINX 用户立即开始迁移到 Gateway API
或其他 Ingress 控制器。
** Kubernetes 文档中列出了许多选项：&lt;a href=&#34;https://gateway-api.sigs.k8s.io/guides/&#34;&gt;Gateway API&lt;/a&gt;、
&lt;a href=&#34;https://kubernetes.io/zh-cn/docs/concepts/services-networking/ingress-controllers/&#34;&gt;Ingress&lt;/a&gt;。
与你合作的供应商可能还提供其他选项。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>公布 2025 年指导委员会选举结果</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/11/09/steering-committee-results-2025/</link>
      <pubDate>Sun, 09 Nov 2025 15:10:00 -0500</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/11/09/steering-committee-results-2025/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Announcing the 2025 Steering Committee Election Results&#34;
slug: steering-committee-results-2025
canonicalUrl: https://www.kubernetes.dev/blog/2025/11/09/steering-committee-results-2025
date: 2025-11-09T15:10:00-05:00
author: &gt;
  Arujjwal Negi
--&gt;
&lt;!--
The [2025 Steering Committee Election](https://github.com/kubernetes/community/tree/master/elections/steering/2025) is now complete. The Kubernetes Steering Committee consists of 7 seats, 4 of which were up for election in 2025. Incoming committee members serve a term of 2 years, and all members are elected by the Kubernetes Community.

The Steering Committee oversees the governance of the entire Kubernetes project. With that great power comes great responsibility. You can learn more about the steering committee’s role in their [charter](https://github.com/kubernetes/steering/blob/master/charter.md).

Thank you to everyone who voted in the election; your participation helps support the community’s continued health and success.
--&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/elections/steering/2025&#34;&gt;2025 指导委员会选举&lt;/a&gt;现已结束。
Kubernetes 指导委员会由 7 个席位组成，其中 4 个席位在 2025 年进行了选举。
新当选的委员会成员将任职 2 年，所有成员均由 Kubernetes 社区选举产生。&lt;/p&gt;
&lt;p&gt;指导委员会负责监督整个 Kubernetes 项目的治理。权力越大责任越大，
你可以通过他们的&lt;a href=&#34;https://github.com/kubernetes/steering/blob/master/charter.md&#34;&gt;章程&lt;/a&gt;了解指导委员会的角色。&lt;/p&gt;
&lt;p&gt;感谢每位参与投票的人；你的参与有助于支持社区的持续健康和成功。&lt;/p&gt;
&lt;!--
## Results

Congratulations to the elected committee members whose two year terms begin immediately (listed in alphabetical order by GitHub handle):
--&gt;
&lt;h2 id=&#34;结果&#34;&gt;结果&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%bb%93%e6%9e%9c&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;祝贺当选的委员会成员，其两年任期立即开始（按 GitHub 名称字母顺序列出）：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Kat Cosgrove (&lt;a href=&#34;https://github.com/katcosgrove&#34;&gt;@katcosgrove&lt;/a&gt;), Minimus&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Paco Xu 徐俊杰 (&lt;a href=&#34;https://github.com/pacoxu&#34;&gt;@pacoxu&lt;/a&gt;), DaoCloud&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rita Zhang (&lt;a href=&#34;https://github.com/ritazh&#34;&gt;@ritazh&lt;/a&gt;), Microsoft&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maciej Szulik (&lt;a href=&#34;https://github.com/soltysh&#34;&gt;@soltysh&lt;/a&gt;), Defense Unicorns&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
They join continuing members:
--&gt;
&lt;p&gt;他们将与以下连任成员一起工作：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Antonio Ojea (&lt;a href=&#34;https://github.com/aojea&#34;&gt;@aojea&lt;/a&gt;), Google&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Benjamin Elder (&lt;a href=&#34;https://github.com/BenTheElder&#34;&gt;@BenTheElder&lt;/a&gt;), Google&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sascha Grunert (&lt;a href=&#34;https://github.com/saschagrunert&#34;&gt;@saschagrunert&lt;/a&gt;), Red Hat&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Maciej Szulik and Paco Xu are returning Steering Committee Members.

## Big thanks!

Thank you and congratulations on a successful election to this round’s election officers:
--&gt;
&lt;p&gt;Maciej Szulik 和徐俊杰（Paco Xu）是回归的指导委员会成员。&lt;/p&gt;
&lt;h2 id=&#34;十分感谢&#34;&gt;十分感谢！&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8d%81%e5%88%86%e6%84%9f%e8%b0%a2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;感谢并祝贺本轮选举官员成功完成选举工作：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Christoph Blecker (&lt;a href=&#34;https://github.com/cblecker&#34;&gt;@cblecker&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Nina Polshakova (&lt;a href=&#34;https://github.com/npolshakova&#34;&gt;@npolshakova&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Sreeram Venkitesh (&lt;a href=&#34;https://github.com/sreeram-venkitesh&#34;&gt;@sreeram-venkitesh&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
Thanks to the Emeritus Steering Committee Members. Your service is appreciated by the community:
--&gt;
&lt;p&gt;感谢名誉指导委员会成员，你们的服务受到社区的赞赏：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Stephen Augustus (&lt;a href=&#34;https://github.com/justaugustus&#34;&gt;@justaugustus&lt;/a&gt;), Bloomberg&lt;/li&gt;
&lt;li&gt;Patrick Ohly (&lt;a href=&#34;https://github.com/pohly&#34;&gt;@pohly&lt;/a&gt;), Intel&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
And thank you to all the candidates who came forward to run for election.
--&gt;
&lt;p&gt;感谢所有参加竞选的候选人。&lt;/p&gt;
&lt;!--
## Get involved with the Steering Committee

This governing body, like all of Kubernetes, is open to all. You can follow along with Steering Committee [meeting notes](https://bit.ly/k8s-steering-wd) and weigh in by filing an issue or creating a PR against their [repo](https://github.com/kubernetes/steering). They have an open meeting on [the first Wednesday at 8am PT of every month](https://github.com/kubernetes/steering). They can also be contacted at their public mailing list steering@kubernetes.io.

You can see what the Steering Committee meetings are all about by watching past meetings on the [YouTube Playlist](https://www.youtube.com/playlist?list=PL69nYSiGNLP1yP1B_nd9-drjoxp0Q14qM).
--&gt;
&lt;h2 id=&#34;参与指导委员会&#34;&gt;参与指导委员会&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8f%82%e4%b8%8e%e6%8c%87%e5%af%bc%e5%a7%94%e5%91%98%e4%bc%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;这个管理机构与所有 Kubernetes 一样，向所有人开放。
你可以关注指导委员会&lt;a href=&#34;https://github.com/orgs/kubernetes/projects/40&#34;&gt;会议记录&lt;/a&gt;，
并通过提交 Issue 或针对其 &lt;a href=&#34;https://github.com/kubernetes/steering&#34;&gt;repo&lt;/a&gt; 创建 PR 来参与。
他们在&lt;a href=&#34;https://github.com/kubernetes/steering&#34;&gt;太平洋时间每月第一个周三上午 8:00&lt;/a&gt; 举行开放的会议。
你还可以通过其公共邮件列表 &lt;a href=&#34;mailto:steering@kubernetes.io&#34;&gt;steering@kubernetes.io&lt;/a&gt; 与他们联系。&lt;/p&gt;
&lt;p&gt;你可以通过在
&lt;a href=&#34;https://www.youtube.com/playlist?list=PL69nYSiGNLP1yP1B_nd9-drjoxp0Q14qM&#34;&gt;YouTube 播放列表&lt;/a&gt;上观看过去的会议来了解指导委员会会议的全部内容。&lt;/p&gt;
&lt;hr&gt;
&lt;!--
_This post was adapted from one written by the [Contributor Comms Subproject](https://github.com/kubernetes/community/tree/master/communication/contributor-comms). If you want to write stories about the Kubernetes community, learn more about us._
--&gt;
&lt;p&gt;&lt;strong&gt;这篇文章是由&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/communication/contributor-comms&#34;&gt;贡献者通信子项目&lt;/a&gt;撰写的。
如果你想撰写有关 Kubernetes 社区的故事，请了解有关我们的更多信息。&lt;/strong&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>7 个常见的 Kubernetes 坑（以及我是如何避开的）</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/10/20/seven-kubernetes-pitfalls-and-how-to-avoid/</link>
      <pubDate>Mon, 20 Oct 2025 08:30:00 -0700</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/10/20/seven-kubernetes-pitfalls-and-how-to-avoid/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;7 Common Kubernetes Pitfalls (and How I Learned to Avoid Them)&#34;
date: 2025-10-20T08:30:00-07:00
slug: seven-kubernetes-pitfalls-and-how-to-avoid
author: &gt;
  Abdelkoddous Lhajouji
--&gt;
&lt;!--
It&#39;s no secret that Kubernetes can be both powerful and frustrating at times. When I first started dabbling with container orchestration, I made more than my fair share of mistakes enough to compile a whole list of pitfalls. In this post, I want to walk through seven big gotchas I&#39;ve encountered (or seen others run into) and share some tips on how to avoid them. Whether you&#39;re just kicking the tires on Kubernetes or already managing production clusters, I hope these insights help you steer clear of a little extra stress.
--&gt;
&lt;p&gt;Kubernetes 功能强大，但有时也会令人沮丧，这已不是什么秘密。
当我刚开始接触容器编排时，我犯了不少错误，足以列出一整张误区清单。
在这篇文章中，我想分享我遇到的（或看到其他人遇到的）七个常见误区，
以及如何避免它们的建议。
无论你只是刚开始尝试 Kubernetes，还是已经在管理生产集群，
我希望这些见解能帮助你避免一些额外的麻烦。&lt;/p&gt;
&lt;!--
## 1. Skipping resource requests and limits
--&gt;
&lt;h2 id=&#34;1-skipping-resource-requests-and-limits&#34;&gt;1. 忽略资源 requests 和 limits&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#1-skipping-resource-requests-and-limits&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**The pitfall**: Not specifying CPU and memory requirements in Pod specifications. This typically happens because Kubernetes does not require these fields, and workloads can often start and run without them—making the omission easy to overlook in early configurations or during rapid deployment cycles.
--&gt;
&lt;p&gt;&lt;strong&gt;常见误区&lt;/strong&gt;：在 Pod 规约中未指定 CPU 和内存需求。
这种情况经常发生，原因是 Kubernetes 不要求这些字段必须设置，
工作负载通常可以在没有这些字段的情况下启动和运行——
这使得在早期配置或快速部署周期中很容易忽略这些设置。&lt;/p&gt;
&lt;!--
**Context**:
In Kubernetes, resource requests and limits are critical for efficient cluster management. Resource requests ensure that the scheduler reserves the appropriate amount of CPU and memory for each pod, guaranteeing that it has the necessary resources to operate. Resource limits cap the amount of CPU and memory a pod can use, preventing any single pod from consuming excessive resources and potentially starving other pods.
When resource requests and limits are not set:
--&gt;
&lt;p&gt;&lt;strong&gt;背景&lt;/strong&gt;：
在 Kubernetes 中，资源请求和限制对于高效的集群管理至关重要。
资源请求确保调度器为每个 Pod 预留适当数量的 CPU 和内存，
保证它有必要的资源来运行。
资源限制限制了 Pod 可以使用的 CPU 和内存数量，
防止任何单个 Pod 消耗过多资源而可能导致其他 Pod 资源不足。
当未设置资源请求和限制时：&lt;/p&gt;
&lt;!--
 1. Resource Starvation: Pods may get insufficient resources, leading to degraded performance or failures. This is because Kubernetes schedules pods based on these requests. Without them, the scheduler might place too many pods on a single node, leading to resource contention and performance bottlenecks.
 2. Resource Hoarding: Conversely, without limits, a pod might consume more than its fair share of resources, impacting the performance and stability of other pods on the same node. This can lead to issues such as other pods getting evicted or killed by the Out-Of-Memory (OOM) killer due to lack of available memory.
--&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;资源不足&lt;/strong&gt;：Pod 可能未获得足够的资源，导致性能下降或运行失败。
这是因为 Kubernetes 根据这些请求来调度 Pod。
没有这些请求，调度器可能会在单个节点上放置过多的 Pod，导致资源竞争和性能瓶颈。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;资源囤积&lt;/strong&gt;：相反，没有设置限制值时，一个 Pod 可能会消耗过多的资源，
影响同一节点上其他 Pod 的性能和稳定性。
这可能导致其他 Pod 因内存不足而被驱逐或被 OOM（Out-Of-Memory）强制终止。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
### How to avoid it:
- Start with modest `requests` (for example `100m` CPU, `128Mi` memory) and see how your app behaves.
- Monitor real-world usage and refine your values; the [HorizontalPodAutoscaler](/docs/tasks/run-application/horizontal-pod-autoscale/) can help automate scaling based on metrics.
- Keep an eye on `kubectl top pods` or your logging/monitoring tool to confirm you&#39;re not over- or under-provisioning.
--&gt;
&lt;h3 id=&#34;如何避免&#34;&gt;如何避免：&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;从适度的 &lt;code&gt;requests&lt;/code&gt; 开始（例如 &lt;code&gt;100m&lt;/code&gt; CPU、&lt;code&gt;128Mi&lt;/code&gt; 内存），观察应用的行为。&lt;/li&gt;
&lt;li&gt;监控实际使用情况并优化你的值；&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale/&#34;&gt;Pod 水平自动扩缩&lt;/a&gt;
可以帮助基于指标自动扩缩容。&lt;/li&gt;
&lt;li&gt;关注 &lt;code&gt;kubectl top pods&lt;/code&gt; 或你的日志/监控工具，
确认你没有过多或过少地配置资源。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**My reality check**: Early on, I never thought about memory limits. Things seemed fine on my local cluster. Then, on a larger environment, Pods got *OOMKilled* left and right. Lesson learned.
For detailed instructions on configuring resource requests and limits for your containers, please refer to [Assign Memory Resources to Containers and Pods](/docs/tasks/configure-pod-container/assign-memory-resource/)
(part of the official Kubernetes documentation).
--&gt;
&lt;p&gt;&lt;strong&gt;我的经验教训&lt;/strong&gt;：早期，我从未考虑过内存限制。
在我的本地集群上一切看起来都很好。
后来，在更大的环境中，Pod 被 &lt;strong&gt;OOMKilled&lt;/strong&gt;（内存不足终止）的情况比比皆是。
教训深刻。有关为容器配置资源请求和限制的详细说明，
请参阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/configure-pod-container/assign-memory-resource/&#34;&gt;为容器和 Pod 分配内存资源&lt;/a&gt;
（Kubernetes 官方文档的一部分）。&lt;/p&gt;
&lt;!--
## 2. Underestimating liveness and readiness probes
--&gt;
&lt;h2 id=&#34;2-underestimating-liveness-and-readiness-probes&#34;&gt;2. 低估了存活探针和就绪态探针的重要性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#2-underestimating-liveness-and-readiness-probes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**The pitfall**: Deploying containers without explicitly defining how Kubernetes should check their health or readiness. This tends to happen because Kubernetes will consider a container &#34;running&#34; as long as the process inside hasn&#39;t exited. Without additional signals, Kubernetes assumes the workload is functioning—even if the application inside is unresponsive, initializing, or stuck.
--&gt;
&lt;p&gt;&lt;strong&gt;常见误区&lt;/strong&gt;：部署容器时未明确定义 Kubernetes 应如何检查其健康状态或就绪状态。
这通常发生在 Kubernetes 只要容器内的进程未退出就认为容器“正在运行”的情况下。
在没有额外的信号的情况下，Kubernetes 会假设工作负载正在运行——
即使内部的应用无响应、正在初始化或卡住。&lt;/p&gt;
&lt;!--
**Context**:  
Liveness, readiness, and startup probes are mechanisms Kubernetes uses to monitor container health and availability. 

- **Liveness probes** determine if the application is still alive. If a liveness check fails, the container is restarted.
- **Readiness probes** control whether a container is ready to serve traffic. Until the readiness probe passes, the container is removed from Service endpoints.
- **Startup probes** help distinguish between long startup times and actual failures.
--&gt;
&lt;p&gt;&lt;strong&gt;背景&lt;/strong&gt;：
存活态、就绪态和启动探针是 Kubernetes 用来监控容器健康状态和可用性的机制。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;存活态探针&lt;/strong&gt;确定应用是否仍然存活。如果存活态检查失败，容器会被重启。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;就绪态探针&lt;/strong&gt;控制容器是否准备好接收流量。
在就绪态探针通过之前，容器会从 Service 端点中移除。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;启动探针&lt;/strong&gt;帮助区分长时间启动和实际故障。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### How to avoid it:
- Add a simple HTTP `livenessProbe` to check a health endpoint (for example `/healthz`) so Kubernetes can restart a hung container.
- Use a `readinessProbe` to ensure traffic doesn&#39;t reach your app until it&#39;s warmed up.
- Keep probes simple. Overly complex checks can create false alarms and unnecessary restarts.
--&gt;
&lt;h3 id=&#34;如何避免-1&#34;&gt;如何避免：&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d-1&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;添加一个简单的 HTTP &lt;code&gt;livenessProbe&lt;/code&gt; 来检查健康端点（例如 &lt;code&gt;/healthz&lt;/code&gt;），
以便 Kubernetes 可以重启挂起的容器。&lt;/li&gt;
&lt;li&gt;使用 &lt;code&gt;readinessProbe&lt;/code&gt; 确保在应用预热完成之前流量不会到达应用。&lt;/li&gt;
&lt;li&gt;保持探针简单。过于复杂的检查可能会产生误报和不必要的重启。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**My reality check**: I once forgot a readiness probe for a web service that took a while to load. Users hit it prematurely, got weird timeouts, and I spent hours scratching my head. A 3-line readiness probe would have saved the day.
--&gt;
&lt;p&gt;&lt;strong&gt;我的经验教训&lt;/strong&gt;：我曾经忘记为一个需要一段时间才能加载的 Web 服务设置就绪态探针。
用户过早访问了它，遇到了奇怪的超时，我花了几个小时才找到问题。
一个 3 行的就绪态探针就能解决这个问题。&lt;/p&gt;
&lt;!--
For comprehensive instructions on configuring liveness, readiness, and startup probes for containers, please refer to [Configure Liveness, Readiness and Startup Probes](/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
in the official Kubernetes documentation.
--&gt;
&lt;p&gt;有关为容器配置存活态、就绪态和启动探针的全面说明，
请参阅 Kubernetes 官方文档中的&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/&#34;&gt;配置存活、就绪和启动探针&lt;/a&gt;。&lt;/p&gt;
&lt;!--
## 3. &#34;We&#39;ll just look at container logs&#34; (famous last words)
--&gt;
&lt;h2 id=&#34;3-well-just-look-at-container-logs-famous-last-words&#34;&gt;3. &amp;quot;我们只需要查看容器日志&amp;quot;（著名的遗言）&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#3-well-just-look-at-container-logs-famous-last-words&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**The pitfall**: Relying solely on container logs retrieved via `kubectl logs`. This often happens because the command is quick and convenient, and in many setups, logs appear accessible during development or early troubleshooting. However, `kubectl logs` only retrieves logs from currently running or recently terminated containers, and those logs are stored on the node&#39;s local disk. As soon as the container is deleted, evicted, or the node is restarted, the log files may be rotated out or permanently lost.
--&gt;
&lt;p&gt;&lt;strong&gt;常见误区&lt;/strong&gt;：仅依赖通过 &lt;code&gt;kubectl logs&lt;/code&gt; 检索的容器日志。
这种想法背后的原因通常是因为查看日志的命令既快速又便捷，
在许多集群环境中，日志在开发或早期故障排除时似乎可以访问。
然而，&lt;code&gt;kubectl logs&lt;/code&gt; 只能从当前正在运行或最近终止的容器中检索日志，
这些日志存储在节点的本地磁盘上。
一旦容器被删除、驱逐或节点重启，日志文件可能会被轮换掉或永久丢失。&lt;/p&gt;
&lt;!--
### How to avoid it:
- **Centralize logs** using CNCF tools like [Fluentd](https://kubernetes.io/docs/concepts/cluster-administration/logging/#sidecar-container-with-a-logging-agent) or [Fluent Bit](https://fluentbit.io/) to aggregate output from all Pods.
- **Adopt OpenTelemetry** for a unified view of logs, metrics, and (if needed) traces. This lets you spot correlations between infrastructure events and app-level behavior.
- **Pair logs with Prometheus metrics** to track cluster-level data alongside application logs. If you need distributed tracing, consider CNCF projects like [Jaeger](https://www.jaegertracing.io/).
--&gt;
&lt;h3 id=&#34;如何避免-2&#34;&gt;如何避免：&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d-2&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;集中化日志&lt;/strong&gt;：使用 CNCF 工具如 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/cluster-administration/logging/#sidecar-container-with-a-logging-agent&#34;&gt;Fluentd&lt;/a&gt;
或 &lt;a href=&#34;https://fluentbit.io/&#34;&gt;Fluent Bit&lt;/a&gt; 来聚合所有 Pod 的输出。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;采用 OpenTelemetry&lt;/strong&gt;：用于构造日志、指标和（如果需要）追踪的统一视图。
这让你能够发现基础设施事件和应用级行为之间的关联。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;将日志与 Prometheus 指标对应起来&lt;/strong&gt;：与应用日志同时跟踪集群级数据。
如果你需要分布式追踪，可以考虑 &lt;a href=&#34;https://www.jaegertracing.io/&#34;&gt;Jaeger&lt;/a&gt; 这类 CNCF 项目。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**My reality check**: The first time I lost Pod logs to a quick restart, I realized how flimsy &#34;kubectl logs&#34; can be on its own. Since then, I&#39;ve set up a proper pipeline for every cluster to avoid missing vital clues.
--&gt;
&lt;p&gt;&lt;strong&gt;我的经验教训&lt;/strong&gt;：第一次因为快速重启而丢失 Pod 日志时，
我意识到仅依赖 &amp;quot;kubectl logs&amp;quot; 是多么不可靠。
从那时起，我为每个集群都搭建了完整的日志采集管道，
以避免错过任何关键线索。&lt;/p&gt;
&lt;!--
## 4. Treating dev and prod exactly the same
--&gt;
&lt;h2 id=&#34;4-treating-dev-and-prod-exactly-the-same&#34;&gt;4. 将开发环境和生产环境视为完全相同&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#4-treating-dev-and-prod-exactly-the-same&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**The pitfall**: Deploying the same Kubernetes manifests with identical settings across development, staging, and production environments. This often occurs when teams aim for consistency and reuse, but overlook that environment-specific factors—such as traffic patterns, resource availability, scaling needs, or access control—can differ significantly. Without customization, configurations optimized for one environment may cause instability, poor performance, or security gaps in another.
--&gt;
&lt;p&gt;&lt;strong&gt;常见误区&lt;/strong&gt;：在开发、预发布和生产环境中使用相同的 Kubernetes 清单和相同的设置进行部署。
在团队追求一致性和复用，
但忽略了环境特定的因素——如流量模式、资源可用性、扩缩容需求或访问控制——
可能显著不同时，常会发生这种情况。
如果略过定制这一步骤，针对一个环境优化的配置可能会导致负载在另一个环境下不稳定、
性能差或暴露安全漏洞。&lt;/p&gt;
&lt;!--
### How to avoid it:
- Use environment overlays or [kustomize](https://kustomize.io/) to maintain a shared base while customizing resource requests, replicas, or config for each environment.
- Extract environment-specific configuration into ConfigMaps and / or Secrets. You can use a specialized tool such as [Sealed Secrets](https://github.com/bitnami-labs/sealed-secrets) to manage confidential data.
- Plan for scale in production. Your dev cluster can probably get away with minimal CPU/memory, but prod might need significantly more.
--&gt;
&lt;h3 id=&#34;如何避免-3&#34;&gt;如何避免：&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d-3&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;使用环境覆盖层或 &lt;a href=&#34;https://kustomize.io/&#34;&gt;kustomize&lt;/a&gt; 来维护共享基础，
同时为每个环境定制资源请求、副本数或配置。&lt;/li&gt;
&lt;li&gt;将环境特定的配置提取到 ConfigMap 和/或 Secret 中。
你可以使用专门的工具如 &lt;a href=&#34;https://github.com/bitnami-labs/sealed-secrets&#34;&gt;Sealed Secrets&lt;/a&gt; 来管理机密数据。&lt;/li&gt;
&lt;li&gt;为生产环境中的扩缩需求做规划。
你的开发集群可能只需要最少的 CPU/内存，但生产环境可能需要显著更多。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**My reality check**: One time, I scaled up `replicaCount` from 2 to 10 in a tiny dev environment just to &#34;test.&#34; I promptly ran out of resources and spent half a day cleaning up the aftermath. Oops.
--&gt;
&lt;p&gt;&lt;strong&gt;我的经验教训&lt;/strong&gt;：有一次，
我在一个很小的开发环境中将 &lt;code&gt;replicaCount&lt;/code&gt; 从 2 扩展到 10，只是为了&amp;quot;测试&amp;quot;。
我立即耗尽了资源，花了半天时间清理后果。&lt;/p&gt;
&lt;!--
## 5. Leaving old stuff floating around
--&gt;
&lt;h2 id=&#34;5-leaving-old-stuff-floating-around&#34;&gt;5. 遗留未清理的旧资源&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#5-leaving-old-stuff-floating-around&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**The pitfall**: Leaving unused or outdated resources—such as Deployments, Services, ConfigMaps, or PersistentVolumeClaims—running in the cluster. This often happens because Kubernetes does not automatically remove resources unless explicitly instructed, and there is no built-in mechanism to track ownership or expiration. Over time, these forgotten objects can accumulate, consuming cluster resources, increasing cloud costs, and creating operational confusion, especially when stale Services or LoadBalancers continue to route traffic.
--&gt;
&lt;p&gt;&lt;strong&gt;常见误区&lt;/strong&gt;：在集群中遗留未使用或过时的资源——例如 Deployment、Service、ConfigMap 或 PersistentVolumeClaim。
这种情况经常发生，因为 Kubernetes 不会自动删除资源，除非明确指示；
同时系统也没有内建机制来追踪资源的归属或过期时间。
随着时间推移，这些被遗忘的对象可能不断累积，
占用集群资源、增加云成本，并造成运维上的混乱，
尤其是在陈旧的 Service 或 LoadBalancer 仍持续转发流量的情况下。&lt;/p&gt;
&lt;!--
### How to avoid it:
- **Label everything** with a purpose or owner label. That way, you can easily query resources you no longer need.
- **Regularly audit** your cluster: run `kubectl get all -n &lt;namespace&gt;` to see what&#39;s actually running, and confirm it&#39;s all legit.
- **Adopt Kubernetes&#39; Garbage Collection**: [K8s docs](/docs/concepts/workloads/controllers/garbage-collection/) show how to remove dependent objects automatically.
- **Leverage policy automation**: Tools like [Kyverno](https://kyverno.io/) can automatically delete or block stale resources after a certain period, or enforce lifecycle policies so you don&#39;t have to remember every single cleanup step.
--&gt;
&lt;h3 id=&#34;如何避免-4&#34;&gt;如何避免：&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d-4&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;为所有资源添加标签&lt;/strong&gt;：使用用途或所有者标签。
这样，你可以轻松查询不再需要的资源。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;定期审计集群&lt;/strong&gt;：运行 &lt;code&gt;kubectl get all -n &amp;lt;namespace&amp;gt;&lt;/code&gt; 查看实际运行的内容，
并确认它们都是合法的。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;采用 Kubernetes 的垃圾收集&lt;/strong&gt;：&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/workloads/controllers/garbage-collection/&#34;&gt;K8s 文档&lt;/a&gt;
展示了如何自动删除依赖对象。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;利用策略自动化&lt;/strong&gt;：像 &lt;a href=&#34;https://kyverno.io/&#34;&gt;Kyverno&lt;/a&gt; 这样的工具可以在一定时间后自动删除或阻止过期的资源，
或强制执行生命周期策略，这样你就不必记住每个清理步骤。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**My reality check**: After a hackathon, I forgot to tear down a &#34;test-svc&#34; pinned to an external load balancer. Three weeks later, I realized I&#39;d been paying for that load balancer the entire time. Facepalm.
--&gt;
&lt;p&gt;&lt;strong&gt;我的经验教训&lt;/strong&gt;：在一次黑客松活动结束后，
我忘记删除一个绑定到外部负载均衡器的 &amp;quot;test-svc&amp;quot;。
三周后我才意识到，这段时间我一直在为那个负载均衡器付费。&lt;/p&gt;
&lt;!--
## 6. Diving too deep into networking too soon
--&gt;
&lt;h2 id=&#34;6-diving-too-deep-into-networking-too-soon&#34;&gt;6. 过早深入复杂的网络配置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#6-diving-too-deep-into-networking-too-soon&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**The pitfall**: Introducing advanced networking solutions—such as service meshes, custom CNI plugins, or multi-cluster communication—before fully understanding Kubernetes&#39; native networking primitives. This commonly occurs when teams implement features like traffic routing, observability, or mTLS using external tools without first mastering how core Kubernetes networking works: including Pod-to-Pod communication, ClusterIP Services, DNS resolution, and basic ingress traffic handling. As a result, network-related issues become harder to troubleshoot, especially when overlays introduce additional abstractions and failure points.
--&gt;
&lt;p&gt;&lt;strong&gt;常见误区&lt;/strong&gt;：在完全理解 Kubernetes 原生网络原语之前引入高级网络解决方案——
如服务网格、自定义 CNI 插件或多集群通信。
这通常发生在团队使用外部工具实现流量路由、可观测性或 mTLS 等功能，
而没有首先掌握核心 Kubernetes 网络的工作原理：
包括 Pod 到 Pod 通信、ClusterIP Services、DNS 解析和基本 Ingress 流量处理。
因此，网络相关问题变得更难排查，
特别是当覆盖层引入额外的抽象和故障点时。&lt;/p&gt;
&lt;!--
### How to avoid it:

- Start small: a Deployment, a Service, and a basic ingress controller such as one based on NGINX (e.g., Ingress-NGINX).
- Make sure you understand how traffic flows within the cluster, how service discovery works, and how DNS is configured.
- Only move to a full-blown mesh or advanced CNI features when you actually need them, complex networking adds overhead.
--&gt;
&lt;h3 id=&#34;如何避免-5&#34;&gt;如何避免：&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d-5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;从简单开始：部署一个 Deployment、一个 Service，
以及一个基础的 Ingress 控制器（例如基于 NGINX 的 Ingress-NGINX）。&lt;/li&gt;
&lt;li&gt;确保理解集群内的流量流向、服务发现机制以及 DNS 的配置方式。&lt;/li&gt;
&lt;li&gt;仅在确实需要时再引入完整的服务网格或高级 CNI 功能，
因为复杂的网络架构会带来额外开销。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**My reality check**: I tried Istio on a small internal app once, then spent more time debugging Istio itself than the actual app. Eventually, I stepped back, removed Istio, and everything worked fine.
--&gt;
&lt;p&gt;&lt;strong&gt;我的经验教训&lt;/strong&gt;：我曾经在一个小的内部应用上尝试 Istio，
然后花在调试 Istio 本身上的时间比调试实际应用还多。
最终，我退了一步，移除了 Istio，一切运行正常。&lt;/p&gt;
&lt;!--
## 7. Going too light on security and RBAC
--&gt;
&lt;h2 id=&#34;7-going-too-light-on-security-and-rbac&#34;&gt;7. 对安全性和基于角色的访问控制 (RBAC) 重视不足&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#7-going-too-light-on-security-and-rbac&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
**The pitfall**: Deploying workloads with insecure configurations, such as running containers as the root user, using the `latest` image tag, disabling security contexts, or assigning overly broad RBAC roles like `cluster-admin`. These practices persist because Kubernetes does not enforce strict security defaults out of the box, and the platform is designed to be flexible rather than opinionated. Without explicit security policies in place, clusters can remain exposed to risks like container escape, unauthorized privilege escalation, or accidental production changes due to unpinned images.
--&gt;
&lt;p&gt;&lt;strong&gt;常见误区&lt;/strong&gt;：以不安全的方式配置部署工作负载，例如以 root 用户运行容器、使用 &lt;code&gt;latest&lt;/code&gt; 镜像标签、
禁用安全上下文（security context），或分配过于宽泛的 RBAC 角色（如 &lt;code&gt;cluster-admin&lt;/code&gt;）。
这些做法之所以普遍存在，是因为 Kubernetes 默认并不会强制实施严格的安全策略——
该平台在设计上追求灵活性而非强约束性。如果未显式配置安全策略，集群可能面临容器逃逸、
未经授权的权限提升或由于未固定镜像导致的意外生产变更等风险。&lt;/p&gt;
&lt;!--
### How to avoid it:

- Use [RBAC](/docs/reference/access-authn-authz/rbac/) to define roles and permissions within Kubernetes. While RBAC is the default and most widely supported authorization mechanism, Kubernetes also allows the use of alternative authorizers. For more advanced or external policy needs, consider solutions like [OPA Gatekeeper](https://open-policy-agent.github.io/gatekeeper/) (based on Rego), [Kyverno](https://kyverno.io/), or custom webhooks using policy languages such as CEL or [Cedar](https://cedarpolicy.com/).
- Pin images to specific versions (no more `:latest`!). This helps you know what&#39;s actually deployed.
- Look into [Pod Security Admission](/docs/concepts/security/pod-security-admission/) (or other solutions like Kyverno) to enforce non-root containers, read-only filesystems, etc.
--&gt;
&lt;h3 id=&#34;如何避免-6&#34;&gt;如何避免：&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e9%81%bf%e5%85%8d-6&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;ul&gt;
&lt;li&gt;使用 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/access-authn-authz/rbac/&#34;&gt;RBAC&lt;/a&gt; 定义在 Kubernetes 中的角色和权限。
虽然 RBAC 是默认且最广泛支持的鉴权机制，Kubernetes 也允许使用替代性的鉴权组件。
对于更高级或外部策略需求，可以考虑 &lt;a href=&#34;https://open-policy-agent.github.io/gatekeeper/&#34;&gt;OPA Gatekeeper&lt;/a&gt;（基于 Rego）、
&lt;a href=&#34;https://kyverno.io/&#34;&gt;Kyverno&lt;/a&gt; 或使用 CEL 或 &lt;a href=&#34;https://cedarpolicy.com/&#34;&gt;Cedar&lt;/a&gt; 等策略语言的自定义 Webhook 等解决方案。&lt;/li&gt;
&lt;li&gt;将镜像固定到特定版本（不要再使用 &lt;code&gt;:latest&lt;/code&gt;！）。这有助于你了解实际部署的内容。&lt;/li&gt;
&lt;li&gt;查看 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/security/pod-security-admission/&#34;&gt;Pod 安全准入&lt;/a&gt;（或 Kyverno 等其他解决方案）
以强制执行非 root 容器、只读文件系统等。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
**My reality check**: I never had a huge security breach, but I&#39;ve heard plenty of cautionary tales. If you don&#39;t tighten things up, it&#39;s only a matter of time before something goes wrong.
--&gt;
&lt;p&gt;&lt;strong&gt;我的经验教训&lt;/strong&gt;：我从未遇到过巨大的安全漏洞，但我听过很多警示故事。
如果你不加强安全措施，出问题只是时间问题。&lt;/p&gt;
&lt;!--
## Final thoughts
--&gt;
&lt;h2 id=&#34;final-thoughts&#34;&gt;最后的话&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#final-thoughts&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Kubernetes is amazing, but it&#39;s not psychic, it won&#39;t magically do the right thing if you don&#39;t tell it what you need. By keeping these pitfalls in mind, you&#39;ll avoid a lot of headaches and wasted time. Mistakes happen (trust me, I&#39;ve made my share), but each one is a chance to learn more about how Kubernetes truly works under the hood.
If you&#39;re curious to dive deeper, the [official docs](/docs/home/) and the [community Slack](http://slack.kubernetes.io/) are excellent next steps. And of course, feel free to share your own horror stories or success tips, because at the end of the day, we&#39;re all in this cloud native adventure together.
--&gt;
&lt;p&gt;Kubernetes 非常强大，但它并非全知全能——如果你不明确告知它你的需求，它不会&amp;quot;神奇地&amp;quot;自动做出正确的决策。
牢记这些常见误区，你就能避免许多麻烦和时间浪费。错误在所难免（相信我，我也犯过不少），但每一次失误，
都是深入理解 Kubernetes 内部工作机制的机会。如果你希望进一步探索，
可以查阅&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/home/&#34;&gt;官方文档&lt;/a&gt;或加入&lt;a href=&#34;http://slack.kubernetes.io/&#34;&gt;社区 Slack&lt;/a&gt;。
当然，也欢迎你分享自己的&amp;quot;踩坑经历&amp;quot;或成功经验——毕竟，在云原生这场旅程中，我们都在同行。&lt;/p&gt;
&lt;!--
**Happy Shipping!**
--&gt;
&lt;p&gt;&lt;strong&gt;祝你部署顺利！&lt;/strong&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.34：从存储卷扩展失效中恢复（GA）</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/19/kubernetes-v1-34-recover-expansion-failure/</link>
      <pubDate>Fri, 19 Sep 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/19/kubernetes-v1-34-recover-expansion-failure/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.34: Recovery From Volume Expansion Failure (GA)&#34;
date: 2025-09-19T10:30:00-08:00
slug: kubernetes-v1-34-recover-expansion-failure
author: &gt;
  [Hemant Kumar](https://github.com/gnufied) (Red Hat)
--&gt;
&lt;!--
Have you ever made a typo when expanding your persistent volumes in Kubernetes? Meant to specify `2TB`
but specified `20TiB`? This seemingly innocuous problem was kinda hard to fix - and took the project almost 5 years to fix.
[Automated recovery from storage expansion](/docs/concepts/storage/persistent-volumes/#recovering-from-failure-when-expanding-volumes) has been around for a while in beta; however, with the v1.34 release, we have graduated this to
**general availability**.
--&gt;
&lt;p&gt;你是否曾经在扩展 Kubernetes 中的持久卷时犯过拼写错误？本来想指定 &lt;code&gt;2TB&lt;/code&gt; 却写成了 &lt;code&gt;20TiB&lt;/code&gt;？
这个看似无害的问题实际上很难修复——项目花了将近 5 年时间才解决。
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/concepts/storage/persistent-volumes/#recovering-from-failure-when-expanding-volumes&#34;&gt;存储扩展的自动恢复&lt;/a&gt;
此特性在一段时间内一直处于 Beta 状态；不过，随着 v1.34 版本的发布，我们已经将其提升到&lt;strong&gt;正式发布&lt;/strong&gt;状态。&lt;/p&gt;
&lt;!--
While it was always possible to recover from failing volume expansions manually, it usually required cluster-admin access and was tedious to do (See aformentioned link for more information).
--&gt;
&lt;p&gt;虽然手动从失败的卷扩展中恢复总是可能的，但这通常需要集群管理员权限，而且操作繁琐（更多信息请参见上述链接）。&lt;/p&gt;
&lt;!--
What if you make a mistake and then realize immediately?
With Kubernetes v1.34, you should be able to reduce the requested size of the PersistentVolumeClaim (PVC) and, as long as the expansion to previously requested
size hadn&#39;t finished, you can amend the size requested. Kubernetes will
automatically work to correct it. Any quota consumed by failed expansion will be returned to the user and the associated PersistentVolume should be resized to the
latest size you specified.
--&gt;
&lt;p&gt;如果你在申请存储时不小心填错了大小，并且立刻发现了这个错误怎么办？
在 Kubernetes v1.34 中，你可以&lt;strong&gt;降低 PersistentVolumeClaim（PVC）请求的存储大小&lt;/strong&gt;，只要上一次扩容操作还未完成，
就可以修改为新的大小。
Kubernetes 会自动进行修正，归还因扩容失败而暂时占用的配额，并将关联的 PersistentVolume 调整为你最新指定的大小。&lt;/p&gt;
&lt;!--
I&#39;ll walk through an example of how all of this works.
--&gt;
&lt;p&gt;我将通过一个示例来演示这一切是如何工作的。&lt;/p&gt;
&lt;!--
## Reducing PVC size to recover from failed expansion
--&gt;
&lt;h2 id=&#34;通过降低-pvc-尺寸完成从失败的扩展操作中恢复&#34;&gt;通过降低 PVC 尺寸完成从失败的扩展操作中恢复&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e9%80%9a%e8%bf%87%e9%99%8d%e4%bd%8e-pvc-%e5%b0%ba%e5%af%b8%e5%ae%8c%e6%88%90%e4%bb%8e%e5%a4%b1%e8%b4%a5%e7%9a%84%e6%89%a9%e5%b1%95%e6%93%8d%e4%bd%9c%e4%b8%ad%e6%81%a2%e5%a4%8d&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Imagine that you are running out of disk space for one of your database servers, and you want to expand the PVC from previously
specified `10TB` to `100TB` - but you make a typo and specify `1000TB`.
--&gt;
&lt;p&gt;想象一下，你的某个数据库服务器磁盘空间不足，
你想将 PVC 从之前指定的 &lt;code&gt;10TB&lt;/code&gt; 扩展到 &lt;code&gt;100TB&lt;/code&gt;——但你犯了一个拼写错误，指定了 &lt;code&gt;1000TB&lt;/code&gt;。&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PersistentVolumeClaim&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;myclaim&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;accessModes&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- ReadWriteOnce&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requests&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;storage&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;1000TB&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 新的大小配置，但不正确！&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Now, you may be out of disk space on your disk array or simply ran out of allocated quota on your cloud-provider. But, assume that expansion to `1000TB` is never going to succeed.
--&gt;
&lt;p&gt;现在，你的磁盘阵列可能空间不足，或者云平台所分配的配额已用完。
不管怎样，我们先来假设扩展到 &lt;code&gt;1000TB&lt;/code&gt; 的操作永远不会成功。&lt;/p&gt;
&lt;!--
In Kubernetes v1.34, you can simply correct your mistake and request a new PVC size,
that is smaller than the mistake, provided it is still larger than the original size
of the actual PersistentVolume.
--&gt;
&lt;p&gt;在 Kubernetes v1.34 中，你可以轻松地修正错误，重新请求一个新的 PVC 尺寸，令该尺寸比之前错误请求的更小，
但前提是它&lt;strong&gt;仍需大于最初 PersistentVolume 的实际尺寸&lt;/strong&gt;。&lt;/p&gt;
&lt;!--
```yaml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: myclaim
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100TB # Corrected size; has to be greater than 10TB.
                     # You cannot shrink the volume below its actual size.
```
--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;PersistentVolumeClaim&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;myclaim&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;accessModes&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- ReadWriteOnce&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;resources&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;requests&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;storage&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;100TB&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 更正后的大小；必须大于 10TB。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;                     &lt;/span&gt;&lt;span style=&#34;color:#080;font-style:italic&#34;&gt;# 你不能将卷缩小到其实际大小以下。&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This requires no admin intervention. Even better, any surplus Kubernetes quota that you temporarily consumed will be automatically returned.
--&gt;
&lt;p&gt;这不需要管理员干预。更好的是，你临时消耗的任何多余 Kubernetes 配额都将自动返回。&lt;/p&gt;
&lt;!--
This fault recovery mechanism does have a caveat: whatever new size you specify for the PVC, it **must** be still higher than the original size in `.status.capacity`.
Since Kubernetes doesn&#39;t support shrinking your PV objects, you can never go below the size that was originally allocated for your PVC request.
--&gt;
&lt;p&gt;这个故障恢复机制有一点很值得注意：无论你为 PVC 所指定的新尺寸是多少，
它&lt;strong&gt;必须&lt;/strong&gt;仍然高于 &lt;code&gt;.status.capacity&lt;/code&gt; 中的原始大小。
由于 Kubernetes 不支持缩小你的 PV 对象，你一定不能给出低于你的 PVC 请求的最初分配尺寸。&lt;/p&gt;
&lt;!--
## Improved error handling and observability of volume expansion
--&gt;
&lt;h2 id=&#34;卷扩展操作的错误处理和可观测性提升&#34;&gt;卷扩展操作的错误处理和可观测性提升&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%8d%b7%e6%89%a9%e5%b1%95%e6%93%8d%e4%bd%9c%e7%9a%84%e9%94%99%e8%af%af%e5%a4%84%e7%90%86%e5%92%8c%e5%8f%af%e8%a7%82%e6%b5%8b%e6%80%a7%e6%8f%90%e5%8d%87&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
Implementing what might look like a relatively minor change also required us to almost
fully redo how volume expansion works under the hood in Kubernetes.
There are new API fields available in PVC objects which you can monitor to observe progress of volume expansion.
--&gt;
&lt;p&gt;即便看似相对较小的更改，也需要我们几乎完全重新实现 Kubernetes 中卷扩展操作的底层工作方式。
PVC 对象中有新的 API 字段可供你监控以观察卷扩展的进度。&lt;/p&gt;
&lt;!--
### Improved observability of in-progress expansion
--&gt;
&lt;h3 id=&#34;对进行中扩展的可观测性改进&#34;&gt;对进行中扩展的可观测性改进&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%af%b9%e8%bf%9b%e8%a1%8c%e4%b8%ad%e6%89%a9%e5%b1%95%e7%9a%84%e5%8f%af%e8%a7%82%e6%b5%8b%e6%80%a7%e6%94%b9%e8%bf%9b&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
You can query `.status.allocatedResourceStatus[&#39;storage&#39;]` of a PVC to monitor progress of a volume expansion operation.
For a typical block volume, this should transition between `ControllerResizeInProgress`, `NodeResizePending` and `NodeResizeInProgress` and become nil/empty when volume expansion has finished.

If for some reason, volume expansion to requested size is not feasible it should accordingly be in states like - `ControllerResizeInfeasible` or `NodeResizeInfeasible`.

You can also observe size towards which Kubernetes is working by watching `pvc.status.allocatedResources`.
--&gt;
&lt;p&gt;你可以查询 PVC 的 &lt;code&gt;.status.allocatedResourceStatus[&#39;storage&#39;]&lt;/code&gt; 来监控卷扩展操作的进度。
对于典型的块卷，字段值应该在 &lt;code&gt;ControllerResizeInProgress&lt;/code&gt;、&lt;code&gt;NodeResizePending&lt;/code&gt; 和 &lt;code&gt;NodeResizeInProgress&lt;/code&gt; 之间转换，
并在卷扩展完成时变为 nil（空）。&lt;/p&gt;
&lt;p&gt;如果由于某种原因，无法将卷扩展到请求的尺寸，这一字段应该处于对应的 &lt;code&gt;ControllerResizeInfeasible&lt;/code&gt; 或 &lt;code&gt;NodeResizeInfeasible&lt;/code&gt; 等状态。&lt;/p&gt;
&lt;p&gt;你还可以通过观察 &lt;code&gt;pvc.status.allocatedResources&lt;/code&gt; 来观察 Kubernetes 正在处理的大小。&lt;/p&gt;
&lt;!--
### Improved error handling and reporting
--&gt;
&lt;h3 id=&#34;改进的错误处理和报告&#34;&gt;改进的错误处理和报告&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%94%b9%e8%bf%9b%e7%9a%84%e9%94%99%e8%af%af%e5%a4%84%e7%90%86%e5%92%8c%e6%8a%a5%e5%91%8a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
Kubernetes should now retry your failed volume expansions at slower rate, it should make fewer requests to both storage system and Kubernetes apiserver.

Errors observerd during volume expansion are now reported as condition on PVC objects and should persist unlike events. Kubernetes will now populate `pvc.status.conditions` with error keys `ControllerResizeError` or `NodeResizeError` when volume expansion fails.
--&gt;
&lt;p&gt;Kubernetes 现在应该以较慢的速率重试你已经失败的卷扩展操作，它应该向存储系统和 Kubernetes apiserver 发出更少的请求。&lt;/p&gt;
&lt;p&gt;卷扩展期间观察到的错误现在作为 PVC 对象上的状况报告，并且应该持久化，不像事件。当卷扩展失败时，
Kubernetes 现在将用错误键 &lt;code&gt;ControllerResizeError&lt;/code&gt; 或 &lt;code&gt;NodeResizeError&lt;/code&gt; 填充 &lt;code&gt;pvc.status.conditions&lt;/code&gt;。&lt;/p&gt;
&lt;!--
### Fixes long standing bugs in resizing workflows
--&gt;
&lt;h3 id=&#34;修复调整大小工作流中的长期错误&#34;&gt;修复调整大小工作流中的长期错误&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e4%bf%ae%e5%a4%8d%e8%b0%83%e6%95%b4%e5%a4%a7%e5%b0%8f%e5%b7%a5%e4%bd%9c%e6%b5%81%e4%b8%ad%e7%9a%84%e9%95%bf%e6%9c%9f%e9%94%99%e8%af%af&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;!--
This feature also has allowed us to fix long standing bugs in resizing workflow such as [Kubernetes issue #115294](https://github.com/kubernetes/kubernetes/issues/115294).
If you observe anything broken, please report your bugs to [https://github.com/kubernetes/kubernetes/issues](https://github.com/kubernetes/kubernetes/issues/new/choose), along with details about how to reproduce the problem.
--&gt;
&lt;p&gt;此功能还允许我们修复调整大小工作流中的长期存在的若干错误，例如 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/115294&#34;&gt;Kubernetes issue #115294&lt;/a&gt;。
如果你观察到任何问题，请将你所发现的错误及如何重新问题的详细信息报告到 &lt;a href=&#34;https://github.com/kubernetes/kubernetes/issues/new/choose&#34;&gt;https://github.com/kubernetes/kubernetes/issues&lt;/a&gt;。&lt;/p&gt;
&lt;!--
Working on this feature through its lifecycle was challenging and it wouldn&#39;t have been possible to reach GA
without feedback from [@msau42](https://github.com/msau42), [@jsafrane](https://github.com/jsafrane) and [@xing-yang](https://github.com/xing-yang).
--&gt;
&lt;p&gt;此功能的整个开发周期中充满挑战，如果没有 &lt;a href=&#34;https://github.com/msau42&#34;&gt;@msau42&lt;/a&gt;、&lt;a href=&#34;https://github.com/jsafrane&#34;&gt;@jsafrane&lt;/a&gt; 和 &lt;a href=&#34;https://github.com/xing-yang&#34;&gt;@xing-yang&lt;/a&gt; 的反馈，
就不可能达到正式发布状态。&lt;/p&gt;
&lt;!--
All of the contributors who worked on this also appreciate the input provided by [@thockin](https://github.com/thockin) and [@liggitt](https://github.com/liggitt) at various Kubernetes contributor summits.
--&gt;
&lt;p&gt;感谢所有参与此功能开发的贡献者，同时也感谢 &lt;a href=&#34;https://github.com/thockin&#34;&gt;@thockin&lt;/a&gt;
和 &lt;a href=&#34;https://github.com/liggitt&#34;&gt;@liggitt&lt;/a&gt; 在各种 Kubernetes 贡献者峰会上提供的意见。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.34: 将卷组快照推进至 v1beta2 阶段</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/16/kubernetes-v1-34-volume-group-snapshot-beta-2/</link>
      <pubDate>Tue, 16 Sep 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/16/kubernetes-v1-34-volume-group-snapshot-beta-2/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.34: Moving Volume Group Snapshots to v1beta2&#34;
date: 2025-09-16T10:30:00-08:00
slug: kubernetes-v1-34-volume-group-snapshot-beta-2
author: &gt;
   Xing Yang (VMware by Broadcom)
--&gt;
&lt;!--
Volume group snapshots were [introduced](/blog/2023/05/08/kubernetes-1-27-volume-group-snapshot-alpha/)
as an Alpha feature with the Kubernetes 1.27 release and moved to [Beta](/blog/2024/12/18/kubernetes-1-32-volume-group-snapshot-beta/) in the Kubernetes 1.32 release.
The recent release of Kubernetes v1.34 moved that support to a second beta.
The support for volume group snapshots relies on a set of
[extension APIs for group snapshots](https://kubernetes-csi.github.io/docs/group-snapshot-restore-feature.html#volume-group-snapshot-apis).
These APIs allow users to take crash consistent snapshots for a set of volumes.
Behind the scenes, Kubernetes uses a label selector to group multiple PersistentVolumeClaims
for snapshotting.
A key aim is to allow you restore that set of snapshots to new volumes and
recover your workload based on a crash consistent recovery point.

This new feature is only supported for [CSI](https://kubernetes-csi.github.io/docs/) volume drivers.
--&gt;
&lt;p&gt;卷组快照在 Kubernetes 1.27 版本中作为 Alpha 特性被引入，
并在 Kubernetes 1.32 版本中移至 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2024/12/18/kubernetes-1-32-volume-group-snapshot-beta/&#34;&gt;Beta&lt;/a&gt; 阶段。
Kubernetes v1.34 的最近一次发布将该支持移至第二个 Beta 阶段。
对卷组快照的支持依赖于一组&lt;a href=&#34;https://kubernetes-csi.github.io/docs/group-snapshot-restore-feature.html#volume-group-snapshot-apis&#34;&gt;用于组快照的扩展 API&lt;/a&gt;。
这些 API 允许用户为一组卷获取崩溃一致性快照。在后台，Kubernetes 根据标签选择器对多个
PersistentVolumeClaim 分组，并进行快照操作。关键目标是允许你将这组快照恢复到新卷上，
并基于崩溃一致性恢复点恢复工作负载。&lt;/p&gt;
&lt;p&gt;此新特性仅支持 &lt;a href=&#34;https://kubernetes-csi.github.io/docs/&#34;&gt;CSI&lt;/a&gt; 卷驱动。&lt;/p&gt;
&lt;!--
## What&#39;s new in Beta 2?

While testing the beta version, we encountered an [issue](https://github.com/kubernetes-csi/external-snapshotter/issues/1271) where the `restoreSize` field is not set for individual VolumeSnapshotContents and VolumeSnapshots if CSI driver does not implement the ListSnapshots RPC call.
We evaluated various options [here](https://docs.google.com/document/d/1LLBSHcnlLTaP6ZKjugtSGQHH2LGZPndyfnNqR1YvzS4/edit?tab=t.0) and decided to make this change releasing a new beta for the API.
--&gt;
&lt;h2 id=&#34;beta-2-的新内容&#34;&gt;Beta 2 的新内容&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#beta-2-%e7%9a%84%e6%96%b0%e5%86%85%e5%ae%b9&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;在测试 Beta 版本时，我们遇到了一个问题：如果 CSI 驱动未实现 ListSnapshots RPC 调用，
则对于单独的 VolumeSnapshotContent 和 VolumeSnapshot 来说，&lt;code&gt;restoreSize&lt;/code&gt; 字段不会被设置。
我们在这里评估了不同的选项&lt;a href=&#34;https://docs.google.com/document/d/1LLBSHcnlLTaP6ZKjugtSGQHH2LGZPndyfnNqR1YvzS4/edit?tab=t.0&#34;&gt;此处&lt;/a&gt;，
并决定为此发布一个新的 Beta 版本 API。&lt;/p&gt;
&lt;!--
Specifically, a VolumeSnapshotInfo struct is added in v1beta2, it contains information for an individual volume snapshot that is a member of a volume group snapshot.
VolumeSnapshotInfoList, a list of VolumeSnapshotInfo, is added to VolumeGroupSnapshotContentStatus, replacing VolumeSnapshotHandlePairList.
VolumeSnapshotInfoList is a list of snapshot information returned by the CSI driver to identify snapshots on the storage system.
VolumeSnapshotInfoList is populated by the csi-snapshotter sidecar based on the CSI CreateVolumeGroupSnapshotResponse returned by the CSI driver&#39;s CreateVolumeGroupSnapshot call.

The existing v1beta1 API objects will be converted to the new v1beta2 API objects by a conversion webhook.
--&gt;
&lt;p&gt;具体来说，在 v1beta2 中添加了一个 VolumeSnapshotInfo 结构，它包含了属于卷组快照成员的单个卷快照的信息。&lt;/p&gt;
&lt;p&gt;VolumeSnapshotInfoList，即 VolumeSnapshotInfo 的列表，被添加到 VolumeGroupSnapshotContentStatus
中，取代了 VolumeSnapshotHandlePairList。&lt;/p&gt;
&lt;p&gt;VolumeSnapshotInfoList 是 CSI 驱动通过 ListSnapshots 调用返回的快照信息列表，用于识别存储系统上的快照。&lt;/p&gt;
&lt;p&gt;VolumeSnapshotInfoList 由 csi-snapshotter 边车根据 CSI 驱动的 CreateVolumeGroupSnapshot
调用返回的 CSI CreateVolumeGroupSnapshotResponse 填充。&lt;/p&gt;
&lt;p&gt;现有的 v1beta1 API 对象将通过转换 Webhook 转换为新的 v1beta2 API 对象。&lt;/p&gt;
&lt;!--
## What’s next?

Depending on feedback and adoption, the Kubernetes project plans to push the volume
group snapshot implementation to general availability (GA) in a future release.
--&gt;
&lt;h2 id=&#34;接下来&#34;&gt;接下来？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%8e%a5%e4%b8%8b%e6%9d%a5&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;根据反馈和采用情况，Kubernetes 项目计划在未来的版本中将卷组快照实现推进到正式发布版本（GA）。&lt;/p&gt;
&lt;!--
## How can I learn more?

- The [design spec](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3476-volume-group-snapshot)
  for the volume group snapshot feature.
- The [code repository](https://github.com/kubernetes-csi/external-snapshotter) for volume group
  snapshot APIs and controller.
- CSI [documentation](https://kubernetes-csi.github.io/docs/) on the group snapshot feature.
--&gt;
&lt;h2 id=&#34;如何了解更多&#34;&gt;如何了解更多？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e4%ba%86%e8%a7%a3%e6%9b%b4%e5%a4%9a&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;卷组快照特性的&lt;a href=&#34;https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/3476-volume-group-snapshot&#34;&gt;设计规范&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;卷组快照 API 和控制器的&lt;a href=&#34;https://github.com/kubernetes-csi/external-snapshotter&#34;&gt;代码仓库&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;CSI 关于组快照特性的&lt;a href=&#34;https://kubernetes-csi.github.io/docs/&#34;&gt;文档&lt;/a&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## How do I get involved?

This project, like all of Kubernetes, is the result of hard work by many contributors
from diverse backgrounds working together. On behalf of SIG Storage, I would like to
offer a huge thank you to the contributors who stepped up these last few quarters
to help the project reach beta:
--&gt;
&lt;h2 id=&#34;如何参与&#34;&gt;如何参与？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e5%a6%82%e4%bd%95%e5%8f%82%e4%b8%8e&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;这个项目，如同所有的 Kubernetes 项目一样，是许多来自不同背景的贡献者共同努力的结果。
代表 SIG Storage，我想对过去几个季度中挺身而出帮助项目达到 Beta 阶段的贡献者们表示巨大的感谢：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ben Swartzlander (&lt;a href=&#34;https://github.com/bswartz&#34;&gt;bswartz&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Hemant Kumar (&lt;a href=&#34;https://github.com/gnufied&#34;&gt;gnufied&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Jan Šafránek (&lt;a href=&#34;https://github.com/jsafrane&#34;&gt;jsafrane&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Madhu Rajanna (&lt;a href=&#34;https://github.com/Madhu-1&#34;&gt;Madhu-1&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Michelle Au (&lt;a href=&#34;https://github.com/msau42&#34;&gt;msau42&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Niels de Vos (&lt;a href=&#34;https://github.com/nixpanic&#34;&gt;nixpanic&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Leonardo Cecchi (&lt;a href=&#34;https://github.com/leonardoce&#34;&gt;leonardoce&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Saad Ali (&lt;a href=&#34;https://github.com/saad-ali&#34;&gt;saad-ali&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Xing Yang (&lt;a href=&#34;https://github.com/xing-yang&#34;&gt;xing-yang&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Yati Padia (&lt;a href=&#34;https://github.com/yati1998&#34;&gt;yati1998&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
For those interested in getting involved with the design and development of CSI or
any part of the Kubernetes Storage system, join the
[Kubernetes Storage Special Interest Group](https://github.com/kubernetes/community/tree/master/sig-storage) (SIG).
We always welcome new contributors.

We also hold regular [Data Protection Working Group meetings](https://github.com/kubernetes/community/tree/master/wg-data-protection).
New attendees are welcome to join our discussions.
--&gt;
&lt;p&gt;对于那些有兴趣参与 CSI 或 Kubernetes 存储系统任何部分的设计和开发的人，可以加入
&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-storage&#34;&gt;Kubernetes 存储特别兴趣小组&lt;/a&gt;（SIG）。
我们始终欢迎新的贡献者。&lt;/p&gt;
&lt;p&gt;我们还定期举行&lt;a href=&#34;https://github.com/kubernetes/community/tree/master/wg-data-protection&#34;&gt;数据保护工作组会议&lt;/a&gt;。
新参会者可以加入我们的讨论。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.34：可变 CSI 节点可分配数进阶至 Beta</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/11/kubernetes-v1-34-mutable-csi-node-allocatable-count/</link>
      <pubDate>Thu, 11 Sep 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/11/kubernetes-v1-34-mutable-csi-node-allocatable-count/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.34: Mutable CSI Node Allocatable Graduates to Beta&#34;
date: 2025-09-11T10:30:00-08:00
slug: kubernetes-v1-34-mutable-csi-node-allocatable-count
author: Eddie Torres (Amazon Web Services)
--&gt;
&lt;!--
The [functionality for CSI drivers to update information about attachable volume count on the nodes](https://kep.k8s.io/4876), first introduced as Alpha in Kubernetes v1.33, has graduated to **Beta** in the Kubernetes v1.34 release! This marks a significant milestone in enhancing the accuracy of stateful pod scheduling by reducing failures due to outdated attachable volume capacity information.
--&gt;
&lt;p&gt;&lt;a href=&#34;https://kep.k8s.io/4876&#34;&gt;CSI 驱动更新节点上可挂接卷数量信息的这一功能&lt;/a&gt;在 Kubernetes v1.33
中首次以 Alpha 引入，如今在 Kubernetes v1.34 中进阶为 &lt;strong&gt;Beta&lt;/strong&gt;！
这是提升有状态 Pod 调度准确性的重要里程碑，可减少因可挂接卷容量信息过时所导致的调度失败问题。&lt;/p&gt;
&lt;!--
## Background

Traditionally, Kubernetes [CSI drivers](https://kubernetes-csi.github.io/docs/introduction.html) report a static maximum volume attachment limit when initializing. However, actual attachment capacities can change during a node&#39;s lifecycle for various reasons, such as:
--&gt;
&lt;h2 id=&#34;background&#34;&gt;背景&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#background&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;传统上，Kubernetes 的
&lt;a href=&#34;https://kubernetes-csi.github.io/docs/introduction.html&#34;&gt;CSI 驱动&lt;/a&gt;在初始化时会报告一个静态的最大卷挂接限制。
然而，在节点的生命周期中，实际的挂接数量可能因各种原因发生变化，例如：&lt;/p&gt;
&lt;!--
- Manual or external operations attaching/detaching volumes outside of Kubernetes control.
- Dynamically attached network interfaces or specialized hardware (GPUs, NICs, etc.) consuming available slots.
- Multi-driver scenarios, where one CSI driver’s operations affect available capacity reported by another.

Static reporting can cause Kubernetes to schedule pods onto nodes that appear to have capacity but don&#39;t, leading to pods stuck in a `ContainerCreating` state.
--&gt;
&lt;ul&gt;
&lt;li&gt;在 Kubernetes 控制之外的手动或外部卷挂接/解除挂接操作。&lt;/li&gt;
&lt;li&gt;动态挂接的网络接口或专用硬件（GPU、NIC 等）消耗可用的插槽。&lt;/li&gt;
&lt;li&gt;在多驱动场景中，一个 CSI 驱动的操作影响另一个驱动所报告的可用容量。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;静态报告可能导致 Kubernetes 将 Pod 调度到看似有容量但实际上没有容量的节点上，
从而导致 Pod 卡在 &lt;code&gt;ContainerCreating&lt;/code&gt; 状态。&lt;/p&gt;
&lt;!--
## Dynamically adapting CSI volume limits

With this new feature, Kubernetes enables CSI drivers to dynamically adjust and report node attachment capacities at runtime. This ensures that the scheduler, as well as other components relying on this information, have the most accurate, up-to-date view of node capacity.
--&gt;
&lt;h2 id=&#34;dynamically-adapting-csi-volume-limits&#34;&gt;动态调整 CSI 卷限制&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#dynamically-adapting-csi-volume-limits&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;借助这一新特性，Kubernetes 允许 CSI 驱动在运行时动态调整并报告节点的卷挂接数量。
这一特性可确保调度器以及依赖此信息的其他组件能够获得最准确、最新的节点容量信息。&lt;/p&gt;
&lt;!--
### How it works

Kubernetes supports two mechanisms for updating the reported node volume limits:

- **Periodic Updates:** CSI drivers specify an interval to periodically refresh the node&#39;s allocatable capacity.
- **Reactive Updates:** An immediate update triggered when a volume attachment fails due to exhausted resources (`ResourceExhausted` error).
--&gt;
&lt;h3 id=&#34;how-it-works&#34;&gt;工作原理&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-it-works&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Kubernetes 支持两种机制来更新所报告的节点卷限制：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;周期性更新：&lt;/strong&gt; CSI 驱动指定一个时间间隔，定期刷新节点的可分配容量。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;触发式更新：&lt;/strong&gt; 当卷挂接因资源耗尽（&lt;code&gt;ResourceExhausted&lt;/code&gt; 错误）而失败时触发立即更新。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Enabling the feature

To use this beta feature, the `MutableCSINodeAllocatableCount` feature gate must be enabled in these components:
--&gt;
&lt;h3 id=&#34;enabling-the-feature&#34;&gt;启用特性&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#enabling-the-feature&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;要使用此 Beta 特性，必须在以下组件中启用 &lt;code&gt;MutableCSINodeAllocatableCount&lt;/code&gt; 特性门控：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kube-apiserver&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubelet&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
### Example CSI driver configuration

Below is an example of configuring a CSI driver to enable periodic updates every 60 seconds:
--&gt;
&lt;h3 id=&#34;示例-csi-驱动配置&#34;&gt;示例 CSI 驱动配置&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e7%a4%ba%e4%be%8b-csi-%e9%a9%b1%e5%8a%a8%e9%85%8d%e7%bd%ae&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;以下是配置 CSI 驱动以启用每 60 秒周期性更新一次的示例：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;storage.k8s.io/v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;CSIDriver&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;metadata&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;example.csi.k8s.io&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;nodeAllocatableUpdatePeriodSeconds&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#666&#34;&gt;60&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
This configuration directs kubelet to periodically call the CSI driver&#39;s `NodeGetInfo` method every 60 seconds, updating the node’s allocatable volume count. Kubernetes enforces a minimum update interval of 10 seconds to balance accuracy and resource usage.

### Immediate updates on attachment failures

When a volume attachment operation fails due to a `ResourceExhausted` error (gRPC code `8`), Kubernetes immediately updates the allocatable count instead of waiting for the next periodic update. The Kubelet then marks the affected pods as Failed, enabling their controllers to recreate them. This prevents pods from getting permanently stuck in the `ContainerCreating` state.
--&gt;
&lt;p&gt;此配置指示 kubelet 每隔 60 秒调用一次 CSI 驱动的 &lt;code&gt;NodeGetInfo&lt;/code&gt; 方法，以更新节点的可分配卷数。
Kubernetes 强制要求更新时间间隔最小为 10 秒，目的是在准确性与资源消耗间达成平衡。&lt;/p&gt;
&lt;h3 id=&#34;挂接失败时立即更新&#34;&gt;挂接失败时立即更新&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#%e6%8c%82%e6%8e%a5%e5%a4%b1%e8%b4%a5%e6%97%b6%e7%ab%8b%e5%8d%b3%e6%9b%b4%e6%96%b0&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;当卷挂接操作因 &lt;code&gt;ResourceExhausted&lt;/code&gt; 错误（gRPC 代码 &lt;code&gt;8&lt;/code&gt;）而失败时，Kubernetes 会立即更新可分配数量，
而不是等待下一次周期性更新。随后 kubelet 会将受影响的 Pod 标记为 Failed，使其控制器能够重新创建这些 Pod。
这样可以防止 Pod 永久卡在 &lt;code&gt;ContainerCreating&lt;/code&gt; 状态。&lt;/p&gt;
&lt;!--
## Getting started

To enable this feature in your Kubernetes v1.34 cluster:

1. Enable the feature gate `MutableCSINodeAllocatableCount` on the `kube-apiserver` and `kubelet` components.
2. Update your CSI driver configuration by setting `nodeAllocatableUpdatePeriodSeconds`.
3. Monitor and observe improvements in scheduling accuracy and pod placement reliability.
--&gt;
&lt;h2 id=&#34;getting-started&#34;&gt;快速入门&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#getting-started&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;要在 Kubernetes v1.34 集群中启用此特性：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;在 &lt;code&gt;kube-apiserver&lt;/code&gt; 和 &lt;code&gt;kubelet&lt;/code&gt; 组件上启用特性门控 &lt;code&gt;MutableCSINodeAllocatableCount&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;通过设置 &lt;code&gt;nodeAllocatableUpdatePeriodSeconds&lt;/code&gt;，更新你的 CSI 驱动配置。&lt;/li&gt;
&lt;li&gt;监控并观察调度准确性和 Pod 调度可靠性的提升。&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
## Next steps

This feature is currently in beta and the Kubernetes community welcomes your feedback. Test it, share your experiences, and help guide its evolution to GA stability.

Join discussions in the [Kubernetes Storage Special Interest Group (SIG-Storage)](https://github.com/kubernetes/community/tree/master/sig-storage) to shape the future of Kubernetes storage capabilities.
--&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;下一步&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#next-steps&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;此特性目前处于 Beta，Kubernetes 社区欢迎你的反馈。请测试、分享你的经验，并帮助推动其发展至 GA（正式发布）稳定版。&lt;/p&gt;
&lt;p&gt;欢迎加入 &lt;a href=&#34;https://github.com/kubernetes/community/tree/master/sig-storage&#34;&gt;Kubernetes SIG-Storage&lt;/a&gt;
参与讨论，共同塑造 Kubernetes 存储能力的未来。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.34: 使用 Init 容器定义应用环境变量</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/10/kubernetes-v1-34-env-files/</link>
      <pubDate>Wed, 10 Sep 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/10/kubernetes-v1-34-env-files/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;Kubernetes v1.34: Use An Init Container To Define App Environment Variables&#34;
date: 2025-09-10T10:30:00-08:00
draft: true
slug: kubernetes-v1-34-env-files
author: &gt;
  HirazawaUi
--&gt;
&lt;!--
Kubernetes typically uses ConfigMaps and Secrets to set environment variables,
which introduces additional API calls and complexity,
For example, you need to separately manage the Pods of your workloads 
and their configurations, while ensuring orderly 
updates for both the configurations and the workload Pods.

Alternatively, you might be using a vendor-supplied container 
that requires environment variables (such as a license key or a one-time token),
but you don’t want to hard-code them or mount volumes just to get the job done.
--&gt;
&lt;p&gt;Kubernetes 通常使用 ConfigMap 和 Secret 来设置环境变量，
这会引入额外的 API 调用和复杂性。例如，你需要分别管理工作负载的 Pod 和它们的配置，
同时还要确保配置和工作负载 Pod 的有序更新。&lt;/p&gt;
&lt;p&gt;另外，你可能在使用一个供应商提供的、需要环境变量（例如许可证密钥或一次性令牌）的容器，
但你又不想对这些变量进行硬编码，或者仅仅为了完成工作而挂载卷。&lt;/p&gt;
&lt;!--
If that&#39;s the situation you are in, you now have a new (alpha) way to
achieve that. Provided you have the `EnvFiles`
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
enabled across your cluster, you can tell the kubelet to load a container&#39;s
environment variables from a volume (the volume must be part of the Pod that
the container belongs to).
this feature gate allows you to load environment variables directly from a file in an emptyDir volume
without actually mounting that file into the container.
It’s a simple yet elegant solution to some surprisingly common problems.
--&gt;
&lt;p&gt;如果你正面对这种情况，现在有一种新的（Alpha）方式来实现。只要你在集群中启用了 &lt;code&gt;EnvFiles&lt;/code&gt;
&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/command-line-tools-reference/feature-gates/&#34;&gt;特性门控&lt;/a&gt;，
你就可以告诉 kubelet 从一个卷中加载容器的环境变量（此卷必须是容器所属的 Pod）。
这个特性门控允许你直接从 &lt;code&gt;emptyDir&lt;/code&gt; 卷中的文件加载环境变量，而不需要将该文件实际挂载到容器中。
这是一个简单而优雅的解决方案，可以应对一些出乎意料的常见问题。&lt;/p&gt;
&lt;!--
## What’s this all about?
At its core, this feature allows you to point your container to a file,
one generated by an `initContainer`,
and have Kubernetes parse that file to set your environment variables.
The file lives in an `emptyDir` volume (a temporary storage space that lasts as long as the pod does),
Your main container doesn’t need to mount the volume.
The kubelet will read the file and inject these variables when the container starts.
--&gt;
&lt;h2 id=&#34;what-s-this-all-about&#34;&gt;特性概述 &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#what-s-this-all-about&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;从核心上来说，这个特性允许你将容器指向一个文件，该文件由 &lt;code&gt;initContainer&lt;/code&gt; 生成，
然后让 Kubernetes 解析该文件以设置你的环境变量。此文件位于一个 &lt;code&gt;emptyDir&lt;/code&gt;
卷中（这是一种临时存储空间，只要 Pod 存在就会保留），你的主容器不需要挂载此卷。
kubelet 会在容器启动时读取文件并注入这些变量。&lt;/p&gt;
&lt;!--
## How It Works
Here&#39;s a simple example:
--&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;工作原理 &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-it-works&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;这里有一个简单的例子：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;apiVersion&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;v1&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;kind&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Pod&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;spec&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;initContainers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;generate-config&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;busybox&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;command&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;[&lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;sh&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;-c&amp;#39;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#b44&#34;&gt;&amp;#39;echo &amp;#34;CONFIG_VAR=HELLO&amp;#34; &amp;gt; /config/config.env&amp;#39;&lt;/span&gt;]&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;volumeMounts&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;config-volume&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;mountPath&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;/config&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;containers&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;app-container&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;image&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;gcr.io/distroless/static&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;env&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;CONFIG_VAR&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;valueFrom&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;fileKeyRef&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;path&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;config.env&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;volumeName&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;config-volume&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;key&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;CONFIG_VAR&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;volumes&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;name&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;config-volume&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#008000;font-weight:bold&#34;&gt;emptyDir&lt;/span&gt;:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{}&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;!--
Using this approach is a breeze.
You define your environment variables in the pod spec using the `fileKeyRef` field,
which tells Kubernetes where to find the file and which key to pull.
The file itself resembles the standard for .env syntax (think KEY=VALUE),
and (for this alpha stage at least) you must ensure that it is written into
an `emptyDir` volume. Other volume types aren&#39;t supported for this feature.
At least one init container must mount that `emptyDir` volume (to write the file),
but the main container doesn’t need to—it just gets the variables handed to it at startup.
--&gt;
&lt;p&gt;使用这种方法非常简单。你在 Pod 规约中使用 &lt;code&gt;fileKeyRef&lt;/code&gt; 字段定义环境变量，
此字段告诉 Kubernetes 去哪里找到文件以及要提取哪个键。
此文件本身类似于 &lt;code&gt;.env&lt;/code&gt; 语法的标准格式（即 &lt;code&gt;KEY=VALUE&lt;/code&gt;），
并且（至少在这个 Alpha 阶段）你必须确保它被写入到一个 &lt;code&gt;emptyDir&lt;/code&gt; 卷中。
其他类型的卷在此特性中不受支持。至少有一个 Init 容器必须挂载该 &lt;code&gt;emptyDir&lt;/code&gt; 卷（以写入文件），
但主容器不需要挂载它——它在启动时就能直接获取这些变量。&lt;/p&gt;
&lt;!--
## A word on security
While this feature supports handling sensitive data such as keys or tokens, 
note that its implementation relies on `emptyDir` volumes mounted into pod.
Operators with node filesystem access could therefore 
easily retrieve this sensitive data through pod directory paths.

If storing sensitive data like keys or tokens using this feature,
ensure your cluster security policies effectively protect nodes
against unauthorized access to prevent exposure of confidential information.
--&gt;
&lt;h2 id=&#34;a-word-on-security&#34;&gt;关于安全性 &lt;a class=&#34;td-heading-self-link&#34; href=&#34;#a-word-on-security&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;虽然此特性支持处理密钥或令牌等敏感数据，但需要注意它的实现依赖于挂载到 Pod 的 &lt;code&gt;emptyDir&lt;/code&gt; 卷。
具有节点文件系统访问权限的操作人员因此可以通过 Pod 目录路径轻易获取这些敏感数据。&lt;/p&gt;
&lt;p&gt;如果使用此特性存储密钥或令牌等敏感数据，确保你的集群安全策略能够有效保护节点免受未经授权的访问，
以防止机密信息泄露。&lt;/p&gt;
&lt;!--
## Summary
This feature will eliminate a number of complex workarounds used today, simplifying
apps authoring, and opening doors for more use cases. Kubernetes stays flexible and
open for feedback. Tell us how you use this feature or what is missing.
--&gt;
&lt;h2 id=&#34;summary&#34;&gt;总结&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#summary&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;此特性将消除如今使用的许多复杂变通方法，简化应用编写，并为更多使用场景打开大门。
Kubernetes 保持灵活性，欢迎反馈。请告诉我们你是如何使用这个特性的，或者此特性还缺少什么。&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Kubernetes v1.34: Kubernetes 中的 PSI 指标进入 Beta 阶段</title>
      <link>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/04/kubernetes-v1-34-introducing-psi-metrics-beta/</link>
      <pubDate>Thu, 04 Sep 2025 10:30:00 -0800</pubDate>
      
      <guid>https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/04/kubernetes-v1-34-introducing-psi-metrics-beta/</guid>
      <description>
        
        
        &lt;!--
layout: blog
title: &#34;PSI Metrics for Kubernetes Graduates to Beta&#34;
date: 2025-09-04T10:30:00-08:00
slug: kubernetes-v1-34-introducing-psi-metrics-beta
author: &#34;Haowei Cai (Google)&#34;
--&gt;
&lt;!--
As Kubernetes clusters grow in size and complexity, understanding the health and performance of individual nodes becomes increasingly critical. We are excited to announce that as of Kubernetes v1.34, **Pressure Stall Information (PSI) Metrics** has graduated to Beta.
--&gt;
&lt;p&gt;随着 Kubernetes 集群规模和复杂性的增长，了解各个节点的健康状况和性能变得越来越关键。
我们很高兴地宣布，从 Kubernetes v1.34 开始，&lt;strong&gt;压力停滞信息 (PSI) 指标&lt;/strong&gt;已升级到 Beta 版本。&lt;/p&gt;
&lt;!--
## What is Pressure Stall Information (PSI)?
--&gt;
&lt;h2 id=&#34;what-is-pressure-stall-information-psi&#34;&gt;什么是压力停滞信息 (PSI)？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#what-is-pressure-stall-information-psi&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
[Pressure Stall Information (PSI)](https://docs.kernel.org/accounting/psi.html) is a feature of the Linux kernel (version 4.20 and later)
that provides a canonical way to quantify pressure on infrastructure resources,
in terms of whether demand for a resource exceeds current supply.
It moves beyond simple resource utilization metrics and instead
measures the amount of time that tasks are stalled due to resource contention.
This is a powerful way to identify and diagnose resource bottlenecks that can impact application performance.
--&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.kernel.org/accounting/psi.html&#34;&gt;压力停滞信息 (PSI)&lt;/a&gt; 是 Linux 内核（4.20 及更高版本）的一项功能，
它提供了一种规范化的方式来量化基础设施资源的压力，
即资源需求是否超过当前供应。
它超越了简单的资源利用率指标，而是测量任务因资源竞争而停滞的时间。
这是识别和诊断可能影响应用程序性能的资源瓶颈的强大方法。&lt;/p&gt;
&lt;!--
PSI exposes metrics for CPU, memory, and I/O, categorized as either `some` or `full` pressure:
--&gt;
&lt;p&gt;PSI 暴露了 CPU、内存和 I/O 的指标，分为 &lt;code&gt;some&lt;/code&gt; 或 &lt;code&gt;full&lt;/code&gt; 压力：&lt;/p&gt;
&lt;!--
`some`
: The percentage of time that **at least one** task is stalled on a resource. This indicates some level of resource contention.
--&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;some&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;strong&gt;至少一个&lt;/strong&gt;任务在资源上停滞的时间百分比。这表明存在某种程度的资源竞争。&lt;/dd&gt;
&lt;/dl&gt;
&lt;!--
`full`
: The percentage of time that **all** non-idle tasks are stalled on a resource simultaneously. This indicates a more severe resource bottleneck.


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/04/kubernetes-v1-34-introducing-psi-metrics-beta/psi-metrics-some-vs-full.svg&#34;
         alt=&#34;Diagram illustrating the difference between &amp;#39;some&amp;#39; and &amp;#39;full&amp;#39; PSI pressure.&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;PSI: &amp;#39;Some&amp;#39; vs. &amp;#39;Full&amp;#39; Pressure&lt;/h4&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;
--&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;full&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;strong&gt;所有&lt;/strong&gt;非空闲任务同时在资源上停滞的时间百分比。这表明存在更严重的资源瓶颈。


&lt;figure&gt;
    &lt;img src=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/blog/2025/09/04/kubernetes-v1-34-introducing-psi-metrics-beta/psi-metrics-some-vs-full.svg&#34;
         alt=&#34;展示 &amp;#39;some&amp;#39; 与 &amp;#39;full&amp;#39; PSI 压力差异的示意图。&#34;/&gt; &lt;figcaption&gt;
            &lt;h4&gt;PSI：&amp;#39;Some&amp;#39; 与 &amp;#39;Full&amp;#39; 压力对比&lt;/h4&gt;
        &lt;/figcaption&gt;
&lt;/figure&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;!--
These metrics are aggregated over 10-second, 1-minute, and 5-minute rolling windows, providing a comprehensive view of resource pressure over time.
--&gt;
&lt;p&gt;这些指标在 10 秒、1 分钟和 5 分钟的滚动窗口上进行聚合，提供了随时间变化的资源压力的全面视图。&lt;/p&gt;
&lt;!--
## PSI metrics in Kubernetes
--&gt;
&lt;h2 id=&#34;psi-metrics-in-kubernetes&#34;&gt;Kubernetes 中的 PSI 指标&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#psi-metrics-in-kubernetes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
With the `KubeletPSI` feature gate enabled, the kubelet can now collect PSI metrics from the Linux kernel and expose them through two channels: the [Summary API](/docs/reference/instrumentation/node-metrics#summary-api-source) and the `/metrics/cadvisor` Prometheus endpoint. This allows you to monitor and alert on resource pressure at the node, pod, and container level.
--&gt;
&lt;p&gt;启用 &lt;code&gt;KubeletPSI&lt;/code&gt; 特性门控后，kubelet 现在可以从 Linux 内核收集 PSI 指标，
并通过两个渠道暴露它们：&lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/zh-cn/docs/reference/instrumentation/node-metrics/#summary-api-source&#34;&gt;Summary API&lt;/a&gt;
和 &lt;code&gt;/metrics/cadvisor&lt;/code&gt; Prometheus 端点。这允许你在节点、Pod 和容器级别监控和告警资源压力。&lt;/p&gt;
&lt;!--
The following new metrics are available in Prometheus exposition format via `/metrics/cadvisor`:
--&gt;
&lt;p&gt;以下新指标可通过 &lt;code&gt;/metrics/cadvisor&lt;/code&gt; 以 Prometheus 暴露格式获得：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;container_pressure_cpu_stalled_seconds_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container_pressure_cpu_waiting_seconds_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container_pressure_memory_stalled_seconds_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container_pressure_memory_waiting_seconds_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container_pressure_io_stalled_seconds_total&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;container_pressure_io_waiting_seconds_total&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
These metrics, along with the data from the Summary API, provide a granular view of resource pressure, enabling you to pinpoint the source of performance issues and take corrective action. For example, you can use these metrics to:
--&gt;
&lt;p&gt;这些指标与 Summary API 的数据一起，提供了资源压力的细粒度视图，
使你能够精确定位性能问题的根源并采取纠正措施。
例如，你可以使用这些指标来：&lt;/p&gt;
&lt;!--
*   **Identify memory leaks:** A steadily increasing `some` pressure for memory can indicate a memory leak in an application.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;识别内存泄漏：&lt;/strong&gt; 内存的 &lt;code&gt;some&lt;/code&gt; 压力持续增加可能表明应用程序中存在内存泄漏。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
*   **Optimize resource requests and limits:** By understanding the resource pressure of your workloads, you can more accurately tune their resource requests and limits.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;优化资源请求和限制：&lt;/strong&gt; 通过了解你的工作负载的资源压力，你可以更准确地调整其资源请求和限制。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
*   **Autoscale workloads:** You can use PSI metrics to trigger autoscaling events, ensuring that your workloads have the resources they need to perform optimally.
--&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;自动扩缩容工作负载：&lt;/strong&gt; 你可以使用 PSI 指标触发自动扩缩容事件，确保你的工作负载拥有最佳性能所需的资源。&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
## How to enable PSI metrics
--&gt;
&lt;h2 id=&#34;how-to-enable-psi-metrics&#34;&gt;如何启用 PSI 指标&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-to-enable-psi-metrics&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
To enable PSI metrics in your Kubernetes cluster, you need to:
--&gt;
&lt;p&gt;要在你的 Kubernetes 集群中启用 PSI 指标，你需要：&lt;/p&gt;
&lt;!--
1.  **Ensure your nodes are running a Linux kernel version 4.20 or later and are using cgroup v2.**
--&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;确保你的节点运行 Linux 内核版本 4.20 或更高版本，并使用 cgroup v2。&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
2.  **Enable the `KubeletPSI` feature gate on the kubelet.**
--&gt;
&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;&lt;strong&gt;在 kubelet 上启用 &lt;code&gt;KubeletPSI&lt;/code&gt; 特性门控。&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;!--
Once enabled, you can start scraping the `/metrics/cadvisor` endpoint with your Prometheus-compatible monitoring solution or query the Summary API to collect and visualize the new PSI metrics. Note that PSI is a Linux-kernel feature, so these metrics are not available on Windows nodes. Your cluster can contain a mix of Linux and Windows nodes, and on the Windows nodes the kubelet does not expose PSI metrics.
--&gt;
&lt;p&gt;启用后，你可以开始使用 Prometheus 兼容的监控解决方案抓取 &lt;code&gt;/metrics/cadvisor&lt;/code&gt; 端点，
或查询 Summary API 来收集和可视化新的 PSI 指标。
请注意，PSI 是 Linux 内核功能，因此这些指标在 Windows 节点上不可用。
你的集群可以包含 Linux 和 Windows 节点的混合，在 Windows 节点上，kubelet 不会暴露 PSI 指标。&lt;/p&gt;
&lt;!--
## What&#39;s next?
--&gt;
&lt;h2 id=&#34;whats-next&#34;&gt;接下来是什么？&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#whats-next&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;!--
We are excited to bring PSI metrics to the Kubernetes community and look forward to your feedback. As a beta feature, we are actively working on improving and extending this functionality towards a stable GA release. We encourage you to try it out and share your experiences with us.
--&gt;
&lt;p&gt;我们很高兴为 Kubernetes 社区带来 PSI 指标，并期待你的反馈。
作为 Beta 功能，我们正在积极改进和扩展此功能，以实现稳定的 GA 发布。
我们鼓励你试用并与我们分享你的经验。&lt;/p&gt;
&lt;!--
To learn more about PSI metrics, check out the official [Kubernetes documentation](/docs/reference/instrumentation/understand-psi-metrics/). You can also get involved in the conversation on the [#sig-node](https://kubernetes.slack.com/messages/sig-node) Slack channel.
--&gt;
&lt;p&gt;要了解有关 PSI 指标的更多信息，请查看官方 &lt;a href=&#34;https://deploy-preview-55957--kubernetes-io-main-staging.netlify.app/docs/reference/instrumentation/understand-psi-metrics/&#34;&gt;Kubernetes 文档&lt;/a&gt;。
你还可以参与 &lt;a href=&#34;https://kubernetes.slack.com/messages/sig-node&#34;&gt;#sig-node&lt;/a&gt; Slack 频道的对话。&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
