Skip to content

Commit 86ce889

Browse files
committed
[zh] Update filename and dates for recent several blogs
1 parent 801cb82 commit 86ce889

File tree

4 files changed

+54
-61
lines changed

4 files changed

+54
-61
lines changed

content/zh-cn/blog/_posts/2025-02-03-introducing-jobset/index.md renamed to content/zh-cn/blog/_posts/2025-03-23-introducing-jobset/index.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
layout: blog
33
title: "JobSet 介绍"
4-
date: 2025-02-03
4+
date: 2025-03-23
55
slug: introducing-jobset
6-
draft: true
76
author: >
87
Daniel Vega-Myhre (Google),
98
Abdullah Gharaibeh (Google),
@@ -14,9 +13,8 @@ translator: >
1413
<!--
1514
layout: blog
1615
title: "Introducing JobSet"
17-
date: 2025-02-03
16+
date: 2025-03-23
1817
slug: introducing-jobset
19-
draft: true
2018
2119
**Authors**: Daniel Vega-Myhre (Google), Abdullah Gharaibeh (Google), Kevin Hannon (Red Hat)
2220
-->
@@ -40,12 +38,12 @@ Large ML models (particularly LLMs) which cannot fit into the memory of the GPU
4038
single host are often distributed across tens of thousands of accelerator chips, which in turn may
4139
span thousands of hosts.
4240
-->
43-
## 为什么需要 JobSet?
41+
## 为什么需要 JobSet? {#why-jobset}
4442

4543
Kubernetes 社区近期对 Kubernetes 批处理生态系统的增强,吸引了许多机器学习工程师,
4644
他们发现这非常符合运行分布式训练工作负载的需求。
4745

48-
单个主机上的 GPU 或 TPU 芯片通常无法满足大型机器学习模型(尤其是大语言模型,LLMs)的内存需求,
46+
单个主机上的 GPU 或 TPU 芯片通常无法满足大型机器学习模型(尤其是大语言模型,LLM)的内存需求,
4947
因此往往会被分布到成千上万的加速器芯片上,而这些芯片可能跨越数千个主机。
5048

5149
<!--
@@ -57,14 +55,14 @@ hosts.
5755
5856
These workload characteristics make Kubernetes a great fit for this type of workload, as efficiently
5957
scheduling and managing the lifecycle of containerized applications across a cluster of compute
60-
resources is an area where it shines.
58+
resources is an area where it shines.
6159
-->
6260
因此,模型训练代码通常会被容器化,并在所有这些主机上同时执行,进行分布式计算。
6361
这些计算通常会将模型参数和/或训练数据集拆分到目标加速器芯片上,并使用如
6462
all-gather 和 all-reduce 等通信集合原语来进行分布式计算以及在主机之间同步梯度。
6563

6664
这些工作负载的特性使得 Kubernetes 非常适合此类任务,
67-
因为高效地调度和管理跨计算资源集群的容器化应用程序生命周期是 Kubernetes 的强项。
65+
因为高效地调度和管理跨计算资源集群的容器化应用生命周期是 Kubernetes 的强项。
6866

6967
<!--
7068
It is also very extensible, allowing developers to define their own Kubernetes APIs, objects, and
@@ -108,11 +106,11 @@ Pods are part of the same workload, but they need to run a different container,
108106
resources or have different failure policies. A common example is the driver-worker pattern.
109107
-->
110108
另一方面,Job API 弥补了运行批处理工作负载的许多空白,包括带索引的完成模式(Indexed Completion Mode)、
111-
更高的可扩展性、Pod 失败策略和 Pod 回退策略等,这些都是最近的一些重要增强功能。然而,使用上游
109+
更高的可扩展性、Pod 失效策略和 Pod 回退策略等,这些都是最近的一些重要增强功能。然而,使用上游
112110
Job API 运行机器学习训练和高性能计算(HPC)工作负载时,需要额外的编排来填补以下空白:
113111

114112
- 多模板 Pod:大多数 HPC 或机器学习训练任务包含多种类型的 Pod。这些不同的 Pod 属于同一工作负载,
115-
但它们需要运行不同的容器、请求不同的资源或具有不同的失败策略
113+
但它们需要运行不同的容器、请求不同的资源或具有不同的失效策略
116114
一个常见的例子是驱动器-工作节点(driver-worker)模式。
117115

118116
<!--
@@ -141,7 +139,7 @@ JobSet aims to address those gaps using the Job API as a building block to build
141139
large-scale distributed HPC and ML use cases.
142140
-->
143141
- 启动顺序:某些任务需要特定的 Pod 启动顺序;有时需要驱动(driver)首先启动(例如 Ray 或 Spark),
144-
而有时,人们期望工作节点(workers)在驱动启动之前就绪(例如 MPI)。
142+
而有时,人们期望多个工作节点(worker)在驱动启动之前就绪(例如 MPI)。
145143

146144
JobSet 旨在以 Job API 为基础,填补这些空白,构建一个更丰富的 API,
147145
以支持大规模分布式 HPC 和 ML 使用场景。
@@ -158,7 +156,7 @@ declarative way to easily create identical child-jobs to run on different island
158156
without resorting to scripting or Helm charts to generate many versions of the same job but with
159157
different names.
160158
-->
161-
## JobSet 的工作原理
159+
## JobSet 的工作原理 {#how-jobset-works}
162160

163161
JobSet 将分布式批处理工作负载建模为一组 Kubernetes Job。
164162
这使得用户可以轻松为不同的 Pod 组(例如领导者 Pod、工作节点 Pod、参数服务器 Pod 等)
@@ -219,9 +217,9 @@ specify a maximum number of times the JobSet should be restarted in the event of
219217
job is marked failed, the entire JobSet will be recreated, allowing the workload to resume from the
220218
last checkpoint. When no failure policy is specified, if any job fails, the JobSet simply fails.
221219
-->
222-
- **可配置的失败策略**:JobSet 提供了可配置的失败策略,允许用户指定在发生故障时
220+
- **可配置的失效策略**:JobSet 提供了可配置的失效策略,允许用户指定在发生故障时
223221
JobSet 应重启的最大次数。如果任何任务被标记为失败,整个 JobSet 将会被重新创建,
224-
从而使工作负载可以从最后一个检查点恢复。当未指定失败策略时,如果任何任务失败,
222+
从而使工作负载可以从最后一个检查点恢复。当未指定失效策略时,如果任何任务失败,
225223
JobSet 会直接标记为失败。
226224

227225
<!--
@@ -263,7 +261,7 @@ The following example is a JobSet spec for running a TPU Multislice workload on
263261
TPU concepts and terminology, please refer to these
264262
[docs](https://cloud.google.com/tpu/docs/system-architecture-tpu-vm).
265263
-->
266-
## 示例用例
264+
## 示例用例 {#example-use-case}
267265

268266
### 使用 Jax 在多个 TPU 切片上进行分布式 ML 训练
269267

@@ -393,7 +391,7 @@ found in the [JobSet roadmap](https://github.com/kubernetes-sigs/jobset?tab=read
393391
Please feel free to reach out with feedback of any kind. We’re also open to additional contributors,
394392
whether it is to fix or report bugs, or help add new features or write documentation.
395393
-->
396-
## 未来工作与参与方式
394+
## 未来工作与参与方式 {#furture-work-and-getting-involved}
397395
398396
我们今年的 JobSet 路线图中计划开发多项功能,具体内容可以在
399397
[JobSet 路线图](https://github.com/kubernetes-sigs/jobset?tab=readme-ov-file#roadmap)中找到。
File renamed without changes.

content/zh-cn/blog/_posts/2025-04-11-multicontainer-patterns/index.md renamed to content/zh-cn/blog/_posts/2025-04-22-multicontainer-patterns/index.md

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
---
22
layout: blog
33
title: "Kubernetes 多容器 Pod:概述"
4-
date: 2025-04-15
5-
draft: true
4+
date: 2025-04-22
5+
draft: false
66
slug: multi-container-pods-overview
77
author: Agata Skorupka (The Scale Factory)
88
translator: Xin Li (Daocloud)
99
---
10-
1110
<!--
1211
layout: blog
1312
title: "Kubernetes Multicontainer Pods: An Overview"
14-
date: 2025-04-15
15-
draft: true
13+
date: 2025-04-22
14+
draft: false
1615
slug: multi-container-pods-overview
1716
author: Agata Skorupka (The Scale Factory)
1817
-->
@@ -22,15 +21,15 @@ As cloud-native architectures continue to evolve, Kubernetes has become the go-t
2221
-->
2322
随着云原生架构的不断演进,Kubernetes 已成为部署复杂分布式系统的首选平台。
2423
在这个生态系统中,最强大却又微妙的设计模式之一是边车(Sidecar)
25-
模式 —— 一种允许开发者扩展应用程序功能而不深入源代码的技术
24+
模式 —— 一种允许开发者扩展应用功能而不深入源代码的技术
2625

2726
<!--
2827
## The origins of the sidecar pattern
2928
3029
Think of a sidecar like a trusty companion motorcycle attachment. Historically, IT infrastructures have always used auxiliary services to handle critical tasks. Before containers, we relied on background processes and helper daemons to manage logging, monitoring, and networking. The microservices revolution transformed this approach, making sidecars a structured and intentional architectural choice.
3130
With the rise of microservices, the sidecar pattern became more clearly defined, allowing developers to offload specific responsibilities from the main service without altering its code. Service meshes like Istio and Linkerd have popularized sidecar proxies, demonstrating how these companion containers can elegantly handle observability, security, and traffic management in distributed systems.
3231
-->
33-
## 边车模式的起源
32+
## 边车模式的起源 {#the-origins-of-the-sidecar-pattern}
3433

3534
想象一下边车就像一个可靠的伴侣摩托车附件。历史上,IT 基础设施总是使用辅助服务来处理关键任务。
3635
在容器出现之前,我们依赖后台进程和辅助守护程序来管理日志记录、监控和网络。
@@ -50,11 +49,10 @@ native support for sidecars.
5049
Sidecar containers can now be defined within a Pod manifest using the `spec.initContainers` field. What makes
5150
it a sidecar container is that you specify it with `restartPolicy: Always`. You can see an example of this below, which is a partial snippet of the full Kubernetes manifest:
5251
-->
53-
## Kubernetes 实现
52+
## Kubernetes 实现 {#kubernetes-implementation}
5453

55-
在 Kubernetes 中,[边车容器](/zh-cn/docs/concepts/workloads/pods/sidecar-containers/)
56-
与主应用程序位于同一个 Pod 内,实现通信和资源共享。
57-
这听起来就像是在 Pod 内一起定义多个容器一样?实际上确实如此,
54+
在 Kubernetes 中,[边车容器](/zh-cn/docs/concepts/workloads/pods/sidecar-containers/)与主应用位于同一个
55+
Pod 内,实现通信和资源共享。这听起来就像是在 Pod 内一起定义多个容器一样?实际上确实如此,
5856
这也是在 Kubernetes v1.29.0 引入对边车的本地支持之前实现边车容器的唯一方式。
5957
现在,边车容器可以使用 `spec.initContainers` 字段在 Pod 清单中定义。
6058
所指定容器之所以变成了边车容器,是因为你在规约中设置了 `restartPolicy: Always`
@@ -74,19 +72,19 @@ initContainers:
7472
<!--
7573
That field name, `spec.initContainers` may sound confusing. How come when you want to define a sidecar container, you have to put an entry in the `spec.initContainers` array? `spec.initContainers` are run to completion just before main application starts, so they’re one-off, whereas sidecars often run in parallel to the main app container. It’s the `spec.initContainers` with `restartPolicy:Always` which differs classic [init containers](/docs/concepts/workloads/pods/init-containers/) from Kubernetes-native sidecar containers and ensures they are always up.
7674
-->
77-
该字段名称 `spec.initContainers` 可能听起来令人困惑。为何在定义
78-
边车容器时,必须在 `spec.initContainers` 数组中添加条目?
79-
`spec.initContainers` 在主应用程序启动前运行至完成,因此它们是一次性的,
80-
边车容器通常与主应用容器并行运行。正是通过带有 `restartPolicy:Always`
81-
的 `spec.initContainers` 区分了经典的 [Init 容器](/zh-cn/docs/concepts/workloads/pods/init-containers/)和
75+
该字段名称 `spec.initContainers` 可能听起来令人困惑。为何在定义边车容器时,必须在
76+
`spec.initContainers` 数组中添加条目?`spec.initContainers`
77+
在主应用启动前运行至完成,因此它们是一次性的,而边车容器通常与主应用容器并行运行。
78+
正是通过带有 `restartPolicy:Always` 的 `spec.initContainers` 区分了经典的
79+
[Init 容器](/zh-cn/docs/concepts/workloads/pods/init-containers/)和
8280
Kubernetes 原生的边车容器,并确保它们始终保持运行。
8381

8482
<!--
8583
## When to embrace (or avoid) sidecars
8684

8785
While the sidecar pattern can be useful in many cases, it is generally not the preferred approach unless the use case justifies it. Adding a sidecar increases complexity, resource consumption, and potential network latency. Instead, simpler alternatives such as built-in libraries or shared infrastructure should be considered first.
8886
-->
89-
## 何时采用(或避免使用)边车
87+
## 何时采用(或避免使用)边车 {#when-to-embrace-or-avoid-sidecars}
9088

9189
虽然边车模式在许多情况下非常有用,但除非使用场景证明其合理性,
9290
否则通常不推荐优先采用这种方法。添加边车会增加复杂性、
@@ -103,7 +101,7 @@ While the sidecar pattern can be useful in many cases, it is generally not the p
103101
-->
104102
**在以下情况部署边车:**
105103

106-
1. 你需要扩展应用程序功能,而无需修改原始代码
104+
1. 你需要扩展应用功能,而无需修改原始代码
107105
1. 实现日志记录、监控或安全等跨领域关注点
108106
1. 处理需要现代网络功能的遗留应用
109107
1. 设计需要独立扩展和更新的微服务
@@ -130,12 +128,12 @@ While the sidecar pattern can be useful in many cases, it is generally not the p
130128

131129
The **Init container** pattern is used to execute (often critical) setup tasks before the main application container starts. Unlike regular containers, init containers run to completion and then terminate, ensuring that preconditions for the main application are met.
132130
-->
133-
## 四个基本的多容器模式
131+
## 四个基本的多容器模式 {#four-essential-multi-container-patterns}
134132

135-
### Init 容器模式
133+
### Init 容器模式 {#init-container-pattern}
136134

137-
**Init 容器**模式用于在主应用程序容器启动之前执行(通常是关键的)设置任务。
138-
与常规容器不同,初始化容器会运行至完成然后终止,确保满足主应用程序的前提条件
135+
**Init 容器**模式用于在主应用容器启动之前执行(通常是关键的)设置任务。
136+
与常规容器不同,Init 容器会运行至完成然后终止,确保满足主应用的前提条件
139137

140138
<!--
141139
**Ideal for:**
@@ -154,15 +152,15 @@ The init container ensures your application starts in a predictable, controlled
154152
1. 验证依赖项的可用性
155153
1. 运行数据库迁移
156154

157-
初始化容器确保你的应用程序在一个可预测、受控的环境中启动,而无需修改代码。
155+
Init 容器确保你的应用在一个可预测、受控的环境中启动,而无需修改代码。
158156

159157
<!--
160158
### Ambassador pattern
161159

162160
An ambassador container provides Pod-local helper services that expose a simple way to access a network service. Commonly, ambassador containers send network requests on behalf of a an application container and
163161
take care of challenges such as service discovery, peer identity verification, or encryption in transit.
164162
-->
165-
### Ambassador 模式
163+
### Ambassador 模式 {#ambassador-pattern}
166164

167165
一个大使(Ambassador)容器提供了 Pod 本地的辅助服务,这些服务暴露了一种访问网络服务的简单方式。
168166
通常,Ambassador 容器代表应用容器发送网络请求,并处理诸如服务发现、对等身份验证或传输中加密等挑战。
@@ -188,11 +186,11 @@ take care of challenges such as service discovery, peer identity verification, o
188186
A _configuration helper_ sidecar provides configuration updates to an application dynamically, ensuring it always has access to the latest settings without disrupting the service. Often the helper needs to provide an initial
189187
configuration before the application would be able to start successfully.
190188
-->
191-
### 配置助手
189+
### 配置助手 {#configuration-helper}
192190

193-
一个**配置助手**边车容器动态地向应用程序提供配置更新
191+
一个**配置助手**边车容器动态地向应用提供配置更新
194192
确保它始终可以访问最新的设置而不会中断服务。
195-
通常,助手需要在应用程序能够成功启动之前提供初始配置
193+
通常,助手需要在应用能够成功启动之前提供初始配置
196194

197195
<!--
198196
**Use cases:**
@@ -205,16 +203,16 @@ configuration before the application would be able to start successfully.
205203

206204
1. 获取环境变量和密钥
207205
1. 轮询配置更改
208-
1. 将配置管理与应用程序逻辑解耦
206+
1. 将配置管理与应用逻辑解耦
209207

210208
<!--
211209
### Adapter pattern
212210

213211
An _adapter_ (or sometimes _façade_) container enables interoperability between the main application container and external services. It does this by translating data formats, protocols, or APIs.
214212
-->
215-
### 适配器模式
213+
### 适配器模式 {#adapter-pattern}
216214

217-
一个**适配器(adapter)**(有时也称为**切面(façade)**)容器使主应用程序容器与外部服务之间能够互操作
215+
一个**适配器(adapter)**(有时也称为**切面(façade)**)容器使主应用容器与外部服务之间能够互操作
218216
它通过转换数据格式、协议或 API 来实现这一点。
219217

220218
<!--
@@ -237,7 +235,7 @@ While sidecar patterns offer tremendous flexibility, they're not a silver bullet
237235
The key is strategic implementation: use sidecars as precision tools to solve specific architectural challenges, not as a default approach. When used correctly, they can improve security, networking, and configuration management in containerized environments.
238236
Choose wisely, implement carefully, and let your sidecars elevate your container ecosystem.
239237
-->
240-
## 总结
238+
## 总结 {#wrap-up}
241239

242240
尽管边车模式提供了巨大的灵活性,但它不是万能的。所添加的每个边车容器都会引入复杂性、
243241
消耗资源,并可能增加操作负担。始终首先评估更简单的替代方案。

0 commit comments

Comments
 (0)