请注意:这是一个非常相似的问题as this one,但是我断言这不是骗子!另一个问题显然是基于(较旧的)基于Python的Docker注册表,而不是用GoLang编写的最新注册表,而且看起来有很大不同!
我花了几个小时阅读setting up a private Docker Registry的文档,并使其在具有以下特征的远程VM上运行:
到现在为止还挺好。但是现在我想将其设置为HA,并且文档似乎没有提及它而感到震惊。在old Python docs中,有一整节专门介绍HA,但是我不愿意关注它们,因为更新的(基于GoLang的)注册表似乎根本没有提到HA。
所以我的担心:
最佳答案
实际上是在“Deploying a registry server - Load Balancing Considerations”中引用的
One may want to use a load balancer to distribute load, terminate TLS or provide high availability. While a full load balancing setup is outside the scope of this document, there are a few considerations that can make the process smoother.
The most important aspect is that a load balanced cluster of registries must share the same resources. For the current version of the registry, this means the following must be the same:
- Storage Driver
- HTTP Secret
- Redis Cache (if configured)
这意味着实际的高可用性功能被认为是Docker分发项目的范围之外,但仍可以通过添加负载平衡器来实现。
关于docker - 使Docker Registry HA,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32678158/