0

I am running Centos 7 with Kubernetes, Docker, etcd and flanneld. Currently I am seeing a problem with Flanneld which I can't seem to figure out.

I have setup etcd and configured the network. Following curl provides me the right output:

curl http://127.0.0.1:4001/v2/keys/coreos.com/network/config
{"action":"get","node":{"key":"/coreos.com/network/config","value":"{ \"Network\": \"10.1.0.0/16\" }","modifiedIndex":1942,"createdIndex":1942}}

I have configured /etc/sysconfig/flanneld with the correct settings I believe:

FLANNEL_ETCD="http://127.0.0.1:4001"
FLANNEL_ETCD_KEY="/coreos.com/network"

I made sure flanneld starts at boot and starts without problems. However my flannel interface and docker interface get I believe wrong IP values:

4: flannel0: <POINTOPOINT,UP,LOWER_UP> mtu 1472 qdisc pfifo_fast state UNKNOWN qlen 500
    link/none
    inet 0.0.98.0/16 scope global flannel0
       valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 56:84:7a:fe:97:99 brd ff:ff:ff:ff:ff:ff
    inet 0.0.98.1/24 scope global docker0
       valid_lft forever preferred_lft forever
alexander.polomodov
  • 1,060
  • 3
  • 10
  • 14
Exsisto
  • 98
  • 2
  • 9

1 Answers1

0

are you sure you're starting flannel BEFORE docker? you should have something like

Requires=etcd2.service
Requires=flanneld.service
After=etcd2.service
After=flanneld.service

in your docker-tcp.socket Unit file

MrE
  • 408
  • 1
  • 5
  • 14