chenzw2

k8s 部署个多副本的服务,各个副本间数据是同步的吗?

  •  
  •   chenzw2 · Sep 5, 2024 · 2693 views
    This topic created in 789 days ago, the information mentioned may be changed or developed.

    假设我有一个 gitlab 的服务,副本数为 3 ,那么假设往这个 gitlab 上传个文件,副本间数据会同步吗?还是类似 gitlab 这种存储数据的不能开多副本呢?

    4 replies  •  2024-09-05 19:44:25 +08:00
    snipking
    snipking
    Sep 5, 2024
    1
    对于支持多副本的服务,存储如果挂载出来且多个副本挂载同一个存储,那数据就是同源的,不涉及同步问题;如果你的 gitlab 是一个容器里运行全部服务的话,那 postgresql 肯定也在容器里,多副本直接就坏了
    Fooooo0
    Fooooo0
    Sep 5, 2024
    2
    想学的话就好好去学一下 K8S 吧,这种问题也要用这种方式问,你永远学不好的。
    对于自身能力的提升,学习方法是挺重要的一点
    importmeta
    importmeta
    Sep 5, 2024
    3
    你先手动部署一下试试,肯定会用 PersitentVolume
    chenzw2
    chenzw2
    OP
    Sep 5, 2024
    4
    @snipking 感谢帮我解了疑惑
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3076 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:16 · PVG 20:16 · LAX 04:16 · JFK 07:16
    ♥ Do have faith in what you're doing.