SharedVolume - 一种 Kubernetes 操作器,用于在各个 Pod 之间同步 Git/S3/HTTP/SSH 卷。

3作者: bilgehannal3 个月前原帖
嗨,HN, 我开发了一个名为 SharedVolume 的开源 Kubernetes 操作器,旨在简化不同 Pod 和工作负载之间的数据共享。 问题: 在 Kubernetes 中,从 Git、S3、SSH 或 HTTP 同步数据通常需要初始化容器、侧车或自定义作业。 每个工作负载往往会存储同一数据集的多个副本 → 浪费空间。 卷在不同命名空间之间不能轻易共享。 保持数据更新(新的 Git 提交、S3 更改等)通常意味着需要定时作业或管道。 解决方案(SharedVolume): 定义一个 SharedVolume(命名空间范围)或 ClusterSharedVolume(集群范围)。 操作器会自动拉取数据并与源保持同步。 集群中只存储一份数据副本。 Pods 只需通过添加简单的注释来附加卷。 文档和示例: [https://sharedvolume.github.io](https://sharedvolume.github.io) 目前仍处于测试阶段,因此我非常欢迎反馈、问题和改进建议。 如果你觉得这个项目有用并想支持它,在 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!