Kubernetes on Oxide:客户需求如何塑造我们的集成
Kubernetes on Oxide: How customer needs shaped our integrations

原始链接: https://oxide.computer/blog/kubernetes-on-oxide

为了管理有状态工作负载,Oxide 需要一个容器存储接口(CSI)驱动程序来处理持久化存储的生命周期。最初,用户可以部署 Longhorn 等第三方解决方案;然而,在 Oxide 原生分布式存储之上叠加 Longhorn 的复制机制,会导致低效的写放大问题。虽然 Oxide 的“本地磁盘”通过消除冗余复制提供了一种临时变通方案,但它们缺乏 Oxide 分布式磁盘的持久性。 随后,团队开发了一个原生 CSI 插件(RFD 595),旨在允许 Kubernetes 直接管理 Oxide 分布式磁盘。该方案遇到了一个技术障碍:Oxide 的架构以往要求实例在挂载或卸载卷时必须处于停止状态,这与 Kubernetes 对无缝运行时存储管理的预期不符。 为解决这一问题,团队目前正在整个 Oxide 堆栈(从虚拟机管理程序到 API)中设计“磁盘热插拔”功能。尽管这一原生解决方案尚在积极开发中,客户目前仍可通过使用结合本地磁盘的 Longhorn 来高效地配置存储。一旦完成,原生 CSI 插件将实现无缝、高性能的持久化存储,并充分利用 Oxide 内置的分布式复制功能。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 在 Oxide 上运行 Kubernetes:客户需求如何塑造了我们的集成 (oxide.computer) 8 分,由 stevehipwell 在 35 分钟前发布 | 隐藏 | 过往 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

With clusters provisioned, reconciled with Oxide, and reachable from outside their VPCs, storage for stateful workloads became the next layer to address. Kubernetes users request persistent storage through PersistentVolumeClaim objects and expect a Container Storage Interface (CSI) driver to create, attach, and mount the underlying volumes. Oxide had disks, but Kubernetes had no native way to manage their lifecycle.

Without an Oxide CSI driver, customers could deploy a third-party Kubernetes storage system such as Longhorn. Longhorn provides its own CSI driver and replicates data across disks attached to Kubernetes workers. However, using Longhorn meant backing its replicas with Oxide distributed disks, which already store three replicas on distinct sleds.

Layering one replicated storage system on another can create substantial write fan-out. When a three-replica Longhorn volume is backed by three-way-replicated Oxide distributed disks, one application write can fan out to as many as nine disk writes. The exact physical write amplification depends on the workload and configuration, but customers wanted to avoid that duplicated replication.

The introduction of Oxide local disks provided a way to remove the second layer of replication. Local disks have no built-in replication and remain tied to their sled, making them well suited to systems such as Longhorn that replicate data across Kubernetes nodes. Our Rancher showcase uses this approach today. It avoids stacking two replicated storage systems, though Longhorn still manages the storage lifecycle rather than a native Oxide integration.

For a native integration, my teammate Luiz wrote RFD 595 Oxide CSI Plugin. The workflow seemed straightforward on paper. When a user creates a PersistentVolumeClaim, the CSI controller creates an Oxide distributed disk. After Kubernetes schedules the pod, the controller attaches that disk to the selected Oxide instance, and the CSI node plugin formats and mounts it for the pod. If the pod is rescheduled onto another node, the controller detaches the disk and reattaches it to the new node.

Prototyping that workflow immediately exposed a blocker. Oxide requires an instance to be stopped before attaching or detaching a disk. Kubernetes, however, expects a CSI driver to attach storage to a running worker after scheduling a pod. Stopping the worker would disrupt every other workload on the node and could trigger cascading scheduling and attachment operations.

Before we can release our CSI plugin, we need to add support for disk hot-plug throughout the Oxide stack, from the hypervisor all the way up to the API. What began as a Kubernetes integration has turned into a project spanning multiple layers of the Oxide software stack.

Disk hot-plug and the Oxide CSI plugin remain under active development as of this writing. In the meantime, customers can use software such as Longhorn with Oxide local disks for dynamically provisioned persistent storage without stacking two layers of replication. When the native CSI plugin ships, customers will be able to use familiar Kubernetes storage APIs backed directly by Oxide distributed disks with replication and durability built in.

联系我们 contact @ memedata.com