在阿里云ECS安装flannel,安装过程可以在网上找文章,这样的文章很多。我这里讲一下启动flannel遇到的两个问题的解决方法。
1,
network.go:102] failed to retrieve network config: 100: Key not found第一步:etcdctl mk
/flannel/network/config '{"Network":"172.17.0.0/16"}'或etcdctl set
/flannel/network/config '{"Network":"172.17.0.0/16"}'第二步:vim /etc/sysconfig/flanneld
2,network.go:102] failed to retrieve network config: 104: Not a directory
vim /etc/sysconfig/flanneld,修改配置为
FLANNEL_ETCD_ENDPOINTS="http://127.0.0.1:2379"
FLANNEL_ETCD_PREFIX="/flannel/network"
切记配置
etcdctl set
/flannel/network/config '{"Network":"172.17.0.0/16"}',否则会报Not a directory (/flannel/network),因为flannel启动程序只认带“config”的key