etcd ETCD_ADVERTISE_CLIENT_URLS flag
Asked Answered
C

1

7

I don't understand what the ETCD_ADVERTISE_CLIENT_URLS flag does despite reading the documentation:

https://coreos.com/etcd/docs/latest/op-guide/configuration.html

The description states:

List of this member's client URLs to advertise to the rest of the cluster. These URLs can contain domain names.

I only want a single cluster setup can I leave this flag out of my conf file?

Also if i let the default flag for :

ETCD_LISTEN_CLIENT_URLS="http://localhost:2379"

Will etcd only open the service up to the localhost? How can i ensure that any clients outside localhost don't connect to port 2379?

Chinese answered 15/12, 2016 at 6:52 Comment(0)
P
0

Both --listen-client-urls and --advertise-client-urls are (put together) optional and default to port 2379. However, if you specify the --listen-client-urls flag (irrespective of the port), then it is mandatory to specify the --advertise-client-urls flag too. If you want to use any other port, then both of these flags need to be specified.

etcd will bind to port 2379 and if it sees traffic, irrespective of whether its originating from localhost or outside, it will respond to it. If you want to prevent traffic from outside localhost, then you need to block access to the port.

Hope this helps!

Portray answered 7/6, 2022 at 17:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.