【问题标题】:What should be used for sharing the volume of StatefulSet between its pods: NFS ou etcd?应该使用什么来在其 pod 之间共享 StatefulSet 的卷:NFS 或 etcd?
【发布时间】:2017-10-05 05:57:31
【问题描述】:

我想部署一个高性能(多节点)数据库。为此,将使用 StatefulSet。 那么,StatefulSet 应用程序的 pod 之间应该使用什么来共享数据库的内容呢? NFS 可以完成这项工作吗?或etcd

谢谢,

【问题讨论】:

    标签: kubernetes nfs etcd statefulset


    【解决方案1】:

    您想使用什么数据库? etcd 不一定适合,因为它是一个 key\value 存储服务。 如果你想使用像 mongoDB 这样的东西,那么 NFS 应该适合。另请查看持久卷类型列表 - https://kubernetes.io/docs/concepts/storage/persistent-volumes/#types-of-persistent-volumes

    【讨论】:

    • 这个 repo mappedinn/kubernetes-wordpress-with-nfs-volume-on-gke 有问题,即使它使用 nfs。奇怪吗?
    • 您能说得更具体些吗?正如我所见,问题与 NFS 无关,而是与容器有关:Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "wordpress" with CrashLoopBackOff: "Back-off 2m40s restarting failed container=wordpress pod=wp01-wordpress-2362719074-bv53t_default(44ba1226-306d-11e7-a0d1-42010a8e0084)" 我在 cinder 卷上设置了 postgres statefull 时遇到了同样的问题。
    • 你是如何解决你的 postgres statefulset on cinder volume 的问题的??
    • 只需删除 pod 并让 kubernetes 重新创建它。在我的系统上,当 docker 容器崩溃或 cinder 不可用时,有时会出现此问题。老实说,我没有调查它发生的原因,但它绝对与 NFS 无关。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-04-04
    • 2021-03-20
    • 1970-01-01
    • 1970-01-01
    • 2015-07-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多