contiv / install

Contiv Installer
https://contiv.github.io
Other
114 stars 56 forks source link

Does contiv support multi-etcd for high availability? #319

Closed KeithTt closed 6 years ago

KeithTt commented 6 years ago

I have a external etcd cluster, and can I use 3 IP like this:

data:
  cluster_store: "etcd://192.168.5.84:6666,etcd://192.168.5.85:6666,etcd://192.168.2.77:6666"

And how to use 3 instances when deploy with the install.sh script?

tiewei commented 6 years ago

unfortunately multi etcd endpoints are not supported in netplugin at the moment, if your etcd cluster allowed peering, you can take a look at https://github.com/contiv/install/blob/master/install/k8s/configs/etcd.yaml#L70-L99 to add a etcd-proxy daemonset, which will proxying the request to your external etcd cluster, and you can configure the ETCD_INITIAL_CLUSTER with multi nodes like below: contiv0=http://192.168.5.84:6667,contiv1=http://192.168.5.85:6667,contiv2=http://192.168.2.77:6667 then you just need to configure your contiv components to consume from localhost

KeithTt commented 6 years ago

I think the example proxy daemonset need a corresponding service and use node-selector to ensure the pods are only running on netmaster nodes, am I right?

KeithTt commented 6 years ago

BTW, does contiv support etcd v3? it was v2.3.8 in kubernetes.

dseevr commented 6 years ago

etcd 3 is API-compatible with etcd 2 clients (there is a REST/JSON gateway). We are working on upgrading Contiv to use the etcd 3 client API now.

KeithTt commented 6 years ago

@dseevr Got it, thanks.

tiewei commented 6 years ago

Yes, that corresponding etcd service is the etcd pods running on master nodes, in your case though you can point it to external etcd servers you had

KeithTt commented 6 years ago

@tiewei If I use a external etcd cluster, can I use etcd v3 instead of v2?

tiewei commented 6 years ago

yes, as long as the client is connecting it with v2 API, the etcd v3 will behaves as v2

KeithTt commented 6 years ago

@tiewei Thanks a lot!!!