01 / THE SIGNAL

我们发现了什么

Show HN: K7d – Fork live Kubernetes clusters in GRPO-train AI on infra. I have two goals here: 1) enable large scale GRPO/RL training of AI on Kubernetes infra, which IMO is a great playgrou

  • 来源:Hacker News(发现于 2026-08-19)
  • 证据等级:D · 发现产品或需求信号,暂未获得可核验的商业证据。
  • 商业模式:API / Usage-based
  • 主题:独立产品
  • 初筛评分:18.4/100 · 收录 1 次
#独立开发#待验证#产品发现
02 / SOURCE & EVIDENCE

证据,比故事更重要。

发现产品或需求信号,暂未获得可核验的商业证据。

规则清洗与初筛,未经人工商业核验。原文语境、实际客户和付费情况仍需自行验证。

引用与数字披露

来源类型(原作者自述/第三方测算/媒体转引)需采集端标注,本版尚未落字段。

短句引用
作者
未标注
抓取日期
来源类型
未标注
数字口径
币种
未标注
口径
未标注
披露主体
未标注
披露日期
未标注

中文辅助译文(全文)

Hey HN,我是 Gary。今天我想向大家介绍 k7d,它是一个 Apache 2.0 协议的、精简的 Rust VMM + shim,实现了此前无法做到的事情:对实时运行的多节点 k8s 集群进行快速 fork,并且保活正在进行的连接。一个 3 节点的 K8s 集群 fork 仅需 105ms,在配备 64GB 内存的机器上,对一个 3 节点集群进行 50 倍 fork 仅需 4.1s。我有两个目标:1) 在 Kubernetes 基础设施上实现 AI 的大规模 GRPO/RL 训练,在我看来,这是推理训练的理想试验场,除此之外还能训练一种真正有用的能力。这不仅需要快速回合重置(因为在 RL 后训练中你需要数万次多轮运行),还需要极大的快速 fork 能力,以便在 RL 训练过程中执行并行分支探索、回滚和剪枝。忠实的 fork 还能为 GRPO 中的 G 提供字节级一致的起点,从而降低组内方差。2) 为我的另一个项目 K7 提供 Docker-in-VM 沙箱的 <3s VM 快照暂停/恢复/fork 能力,K7 通过用户友好的 CLI/API/Python SDK 提供大规模 VM 沙箱的自托管基础设施,并且原生支持 Kubernetes。除此之外,k7d 还具备以下能力:- 树形资源管理 API:你可以想象,即使采用优化的 CoW 页面共享,在 fork 时你仍需要妥善管理你的资源(内存+磁盘),因此你需要知道如何在运行时进行驱逐。

所以我设计了树形逻辑来追踪子节点与父节点之间如何共享页面,并让你的 AI agent 可以保护有潜力的树分支、驱逐无潜力的分支,或在资源紧张时让 LRU 风格的逻辑自动驱逐。这种基于树的逻辑既适用于单 VM 沙箱,也适用于运行在各自 Linux 网桥上的多 VM 集群。- 形式化验证:当然并非全部,但 k7d 中选定的关键子部分经过了形式化验证:我使用 Kani 来验证 unsafe 路径中的内存算术,并使用 Aeneas(搭配 Lean 后端)形式化证明上述基于树的逻辑,以确保驱逐操作永远不会释放被存活后代节点引用的页面。- 延迟即 CI:我严格追踪大多数重要操作的延迟,并通过一套集成测试进行检查和强制执行。我曾尽力避免自己实现 VMM,最初先为 K7 构建了除我最初的 "kfd"(基于 LVM thin-pool 的 Kata + Firecracker + Devmapper-snapshotter)之外的另一个后端,我称之为 "kql"(Kata + Qemu + Longhorn)。如果你了解这套技术栈,你会立刻想到:Longhorn 非常适合跨节点复制,因此我用它让快照在节点之间复制,从而使 "snapshot resume" 始终可用/具备高可用性。这里使用 Qemu 是因为 Longhorn 的块存储需求与 Firecracker 不兼容——Firecracker 需要 Devmapper-snapshotter,而我不想为该后端自行构建跨节点复制逻辑。

但这个 "kql" 后端由于 Longhorn 的架构原因,fork 需要 45s,对那些要求为 K7 实现快速 fork 的用户来说太慢了。因此这促使我转向 k7d,即 "k7's daemon",它是 K7 原生的 VMM 和 shim,同时取代了 Firecracker/Qemu 和 Kata。这让 K7 中的 VM 沙箱 fork 耗时低于 2-3s,而其中大部分延迟来自 kubelet,因为在 VMM 层面,热 fork 实际上仅需 5ms。一个安全权衡:该守护进程必须在同一棵树的不同分支间共享:这是设计使然。因此你失去了 Firecracker 那种每个 VM 一个 Jailer 的隔离能力。但我可以重新构建一个类似的、每棵树一个的 Jailer,当一棵树不在租户间共享时(例如在 RL 训练中使用分支时),这就足够了。这只是为不同于 Firecracker 的目标做了优化。代码库刻意精简到足以被审计(VMM + shim 不到 30k LOC),我在 README 顶部链接了一个深入的系列博文。希望大家喜欢,也欢迎贡献者和批评指正。谢谢!

译文由上游机器翻译生成,可能有误;判断请以英文原文为准。

英文原文(来源本站未改写)

Hey HN, Gary here.Today I want to present k7d which is an Apache 2.0, tight Rust VMM + shim enabling something not possible before: fast forking of live running virtualized multi-node k8s clusters with surviving of in-flight connections.A 3-VM nodes K8s cluster gets forked in 105ms, and a 50x fork of a 3-VM cluster in 4.1s on a 64GB RAM box.I have two goals here: 1) enable large scale GRPO/RL training of AI on Kubernetes infra, which IMO is a great playground for reasoning training, besides training a capability that's actually useful.

And this requires not only fast episode reset (as you need tens of thousand of multi-turn runs during RL post-training) but also greatly benefits from fast forking so you can do parallel branch exploration, rollback, pruning during RL training.Faithful forks also give you byte-identical starts for the G of GRPO, which gives variance reduction across the group. 2) enable <3s VM snapshot pause/resume/fork of sandboxes with Docker-in-VM, for my other project K7 which provides self-hosted infra for VM sandboxes at scale, with a user-friendly CLI / API / Python SDK, and Kubernetes native.

Besides that, k7d is equipped with: - A Tree-shaped API for resource management: as you can guess when you fork, even with optimized CoW-page-sharing, you want to properly manage your resources (memory + disk) and hence you need to know how to evict while things run.So I have tree-shaped logic to keep track of how children share pages with parents, and let your AI agent protect a promising tree branch, evict an unpromising one, or let LRU-ish logic auto-evict when resources get tight.

This tree-based logic applies both to single VM sandboxes, and to multi-VM clusters on their own Linux bridge. - Formal verification: of course not all of it, but selected critical subparts of k7d are formally verified: I use Kani for memory arithmetics in the unsafe paths, and Aeneas (with Lean backend) to formally prove the tree-based logic explained above so that eviction never frees a page referenced by a live descendent. - Latencies as CI: I rigorously keep track of latency for most important operations which remain checked/enforced via a suite of integration tests.

I really tried hard not building my own VMM and first ended up building another backend for K7 than my initial "kfd" (Kata + Firecracker + Devmapper-snapshotter over LVM thin-pool), which I called "kql" for Kata + Qemu + Longhorn.If you know this stack you'll guess it right away: Longhorn is great for cross-node replication so I used it to have my snapshots replicated across nodes, so "snapshot resume" always works / HA.Qemu here is because Longhorn's block storage requirements was incompatible with Firecracker who wants Devmapper-snapshotter, a backend for which I would not want to build myself the cross-node replication logic.

But this "kql" backend yielded forks in 45s due to how Longhorn is built, which was too slow for the users who asked me to enable fast forking for K7.So this is what pushed me towards k7d, named as "k7's daemon", its own native VMM and shim, replacing both Firecracker/Qemu and Kata at once.This yields VM sandboxes in K7 which you can fork in under 2-3s, and most of this latency is kubelet overhead, as at the VMM level the warm-fork is actually 5ms.One security trade-off: the daemon has to be shared across branches of a same tree: that's by design.So you lose Firecracker's Jailer per VM.

But I could re-build a similar Jailer per tree, which would be sufficient when a tree isn't shared across tenants, such as when you use branching for RL training.That's just optimizing for something different than what Firecracker does.The codebase is intentionally tight enough to be audited (<30k LOC for VMM + shim) and I linked a deep-dive blogpost series at the top of the README.I hope you guys will enjoy it and I'd love contributors and critics.Thx!

出处https://github.com/katakate/k7d抓取日期 · 采集源 Hacker News

03 / EVIDENCE GAPS

这条还缺什么证据?

下面每条都由本条已有字段推出(等级、理由、商业模式、来源次数、是否演示), 本站不生成推测性结论;通用验证方法放在方法论页。

  • 可核验的收入或付费证据查官网定价页与付费口径;第三方数据源(如 GetLatka)只作旁证,需标注来源与时点。
  • 只有单一来源找一手站点或其他渠道是否重复出现同一产品;社区热帖数量不等于商业进展。

通用验证清单(谁有这个问题/谁愿意付费/一个人能交付哪一小步)见我们的筛选方法。

04 / SIGNAL HISTORY

发现时间线