Today is Christmas, but I spent the whole day trying to get this to work :) This is what I did:
# 1 FLANNEL
As already mentioned, I installed the etcd flannel on master with:
etcdctl mk /coreos.com/network/config '{"Network":"172.17.0.0/16"}'
but I got this error when trying to run a flannel on a minion:
Failed to retrieve network config: 100: Key not found (/atomic.io)
So, I edited the file /etc/sysconfig/flanneld in the minion:
# Flanneld configuration options
i.e. key changed FLANNEL_ETCD.
After that, systemctl start flanneld worked.
# 2 DOCKER
I did not find a way to make the version installed as a dependency on kubernetes, so I uninstalled it and executed docker docs for CentOS, the docker engine installed, and manually created the docker.service file for systemctl.
cd /usr/lib/systemd/system
and the contents of docker.service:
[Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network.target docker.socket Requires=docker.socket Requires=flanneld.service After=flanneld.service [Service] EnvironmentFile=/etc/sysconfig/flanneld ExecStart=/usr/bin/docker daemon -H fd:// --bip=${FLANNEL_SUBNET} Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target
then start and enable the daemon using systemctl, and also request the status.
systemctl restart docker systemctl enable docker systemctl status docker
Jonathan
source share