ubuntu - 在 Kubernetes 中部署 GlusterFS 时要求 "There must be at least three nodes."是什么意思

标签 ubuntu kubernetes virtualbox glusterfs

我目前正在使用 VirtualBox Ubuntu VM 测试 Kubernetes+GlusterFS+Elastic 设置。我有两个,一个主节点和一个节点。 GlusterFS 指南 here说:

“必须至少有三个节点”

我不确定那是什么意思。详细说明我不明白的内容:

  • 我们是在谈论在更大范围内运行 GlusterFS 的三个 Kubernetes pod
    Kubernetes 集群,或 GlusterFS 中的三个 GlusterFS 节点
    作为单个 pod 存在于 Kubernetes 集群中的集群?
  • 我目前的设置可以满足这个要求吗?我正在考虑将 1 个原始磁盘附加到具有大小的节点 VM,比如说 90GB。然后我会将原始空间拆分为三个/dev/sda2、/dev/sda3、/dev/sda4,每个 30GB,不进行格式化。现在这个 Virtualbox VM 节点也是一个 Kubernetes 节点。我假设 Kubernetes 会在虚拟世界中自动挂载这三个原始空间。然后,如果我们谈论三个 Kubernetes pod,每个都有自己的虚拟 pod IP。因此,我可以在 topology file mentioned in the guide 中声明 IP-/dev/sda# 对。分别在存储和设备领域。就我而言,每个存储 IP 只有一台设备。我的逻辑有意义吗?
  • 最佳答案

    Are we talking about three Kubernetes pods running GlusterFS within the greater Kubernetes cluster, or three GlusterFS nodes within the GlusterFS cluster that exists within the Kubernetes cluster as a single pod?



    这些要求与 GlusterFS 的集群仲裁有关。这些要求意味着高可用性 GlusterFS 的不同节点。如果您有一个具有不同节点的真正 Kubernetes 集群,您将在每个节点中部署 GlusterFS,以便在所有节点之间安全地复制数据,并且在丢失一个节点的情况下您将是安全的。

    Here you have the GlusterFS reference ,希望它有用。

    Can this requirement be met by my current setup? I was thinking of attaching 1 raw disk to the node VM with size, let's say 90GB. Then I would split that raw space to three /dev/sda2, /dev/sda3, /dev/sda4, each one 30GB, without formatting them. Now this Virtualbox VM node is also a Kubernetes node. I am assuming that Kubernetes will auto-mount those three raw spaces in the virtual world. Then, if we are talking about three Kubernetes pods, each one will have it's own virtual pod IP. As a result, I would be able to declare IP-/dev/sda# pairs in the topology file mentioned in the guide in the storage and device field respectively. In my case I will have only one device per storage IP. Does my logic make sense?



    我认为你将无法做到这一点。如果您仔细查看 GlusterFS 的部署 list :
    ---
    kind: DaemonSet
    apiVersion: extensions/v1beta1
    metadata:
      name: glusterfs
      labels:
        glusterfs: daemonset
      annotations:
        description: GlusterFS DaemonSet
        tags: glusterfs
    spec:
    

    Ref .

    可以看到 GlusterFS 的部署方式是一个 Daemonset,也就是说每个节点会有一个 pod。
    无论如何,查看我在上面分享的 GlusterFS 引用的最佳实践部分,它说您可以部署具有两个节点的 GlusterFS 集群。您将没有用于灾难恢复的第三个节点,但您将能够对其进行测试。

    希望这能澄清你的事情:)

    关于ubuntu - 在 Kubernetes 中部署 GlusterFS 时要求 "There must be at least three nodes."是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54502728/

    相关文章:

    ubuntu - Cypress 无法在 Ubuntu/Linux 上启动

    linux - 如何找到现在启动的 linux Image 名称

    kubernetes - InitContainer 或 Helm Hook 数据库迁移回滚

    sql-server - 无法从 Virtualbox 连接到 SQL Server

    ubuntu - Flymake pdflatex ubuntu 12.04 emacs 23.3.1 配置错误

    ubuntu - 我可以使用 `podman` 无根运行 bash 吗?

    kubernetes - 如何在 pod IP 上使用 kube-dns 启用反向 DNS 查找?

    kubernetes - 将证书从 certmanager.k8s.io/v1alpha1 迁移到 cert-manager.io/v1

    Android 模拟器——DDMS "emulator control"在运行基于 buildroid/virtualbox 的模拟器时被禁用

    virtualbox - 安装 VirtualBox 4.3.6 时无法卸载 kext