我以为很简单,就是用公网ip代替内网ip,让机器可以互相看到,但事实并非如此。
这是我的cloud-config文件,非常基础。
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/<token>
# use $public_ipv4 if your datacenter of choice does not support private networking
addr: $public_ipv4:4001
peer-addr: $public_ipv4:7001
fleet:
public-ip: $public_ipv4 # used for fleetctl ssh command
units:
- name: etcd.service
command: start
- name: fleet.service
command: start要让群集跨越多个数据中心,我需要做些什么?例如,我使用Digital Ocean并在新加坡、纽约和阿姆斯特丹分别配置了一台机器。
我的第二个问题是,由于我很难找到对此用例的支持,我想知道这是否不是使用CoreOS的推荐方式,如果不是,您能否告诉我在多个数据中心分发服务的首选方式是什么?
发布于 2015-05-22 01:00:42
您可以这样做,但这需要调优您的etcd集群。您正在讨论的距离相当大,因此希望使用一些较长的超时。更多文档请点击此处:https://coreos.com/etcd/docs/2.0.8/tuning.html
https://stackoverflow.com/questions/30367778
复制相似问题