I created 3 coreos machines at digitalocean using this cloud-config.yml: https://gist.github.com/socketwiz/d6fe23d19180a1ad8b5a where token was replaced with the one I retrieved from:
$ curl -w "\n" "https://discovery.etcd.io/new?size=3"
Up to this point everything works well. I can see the other machines, I can
$ curl -L http://<machine_ip>:2379/v2/keys/
on each one of them and get back valid data so I suspect my firewall settings are OK (but maybe not). My problem begins when I setup a docker container. First I get the IP address for docker0:
$ ifconfig docker0
Then I setup the docker container:
$ docker run -it alpine ash
Once that boots up I run:
$ apk update && apk add curl
Then I try to access etcd using the ip address I got from ifconfig:
$ curl -L http://172.17.42.1:2379/v2/keys/
But the curl command just hangs and eventually times out. I suspect I have something misconfigured in my cloud-config.yml either in the etcd2 section or in the iptables configuration, but I'm still kind of new to all of this and I've been tweaking around on it all day and just can't get past this problem. Any ideas would be much appreciated.