共享卷 – 一个 Kubernetes 操作器,用于在 Pod 之间同步 Git/S3/HTTP/SSH 卷

3作者: bilgehannal9 个月前
Hi HN, 我构建了一个名为 SharedVolume 的开源 Kubernetes Operator,旨在让 Pod 和工作负载之间的数据共享变得更加容易。 问题: 在 Kubernetes 中,从 Git、S3、SSH 或 HTTP 同步数据通常需要 init 容器、sidecar 或自定义作业。 每个工作负载通常存储相同数据集的自己的副本 → 浪费空间。 卷无法轻松地在命名空间之间共享。 保持数据更新(新的 Git 提交、S3 更改等)通常意味着 cron 作业或管道。 解决方案 (SharedVolume): 定义一个 SharedVolume(命名空间范围)或 ClusterSharedVolume(集群范围)。 Operator 自动从源中提取数据并保持同步。 集群中仅存储一份数据副本。 Pod 只需添加一个简单的注解即可挂载卷。 文档和示例:https://sharedvolume.github.io 它仍处于 Beta 阶段,因此我非常欢迎反馈、问题和改进建议。 如果您觉得它有用并想支持该项目,在 GitHub 上点个 会很棒——这确实有助于开源项目被注意到!
查看原文
Hi HN,<p>I built an open-source Kubernetes operator called SharedVolume to make sharing data between pods and workloads much easier.<p>The problem: In Kubernetes, syncing data from Git, S3, SSH, or HTTP usually requires init containers, sidecars, or custom jobs. Each workload often stores its own copy of the same dataset → wasted space. Volumes can’t easily be shared across namespaces. Keeping data updated (new Git commits, S3 changes, etc.) usually means cron jobs or pipelines.<p>The solution (SharedVolume): Define a SharedVolume (namespace-scoped) or ClusterSharedVolume (cluster-wide). Operator automatically pulls and keeps the data in sync with the source. Only one copy of the data is stored in the cluster. Pods just attach the volume by adding a simple annotation.<p>Docs &amp; examples: https:&#x2F;&#x2F;sharedvolume.github.io<p>It’s still beta, so I’d love feedback, questions, and ideas for improvement If you find it useful and want to support the project, giving it a on GitHub would be amazing—it really helps open-source projects get noticed!