我开始发绒:
/usr/bin/flanneld -etcd-endpoints=https://172.19.104.231:2379,https://172.19.104.230:2379,https://172.19.150.82:2379 -etcd-prefix=/kube-centos/network -etcd-cafile=/etc/kubernetes/ssl/ca.pem -etcd-certfile=/etc/kubernetes/ssl/kubernetes.pem -etcd-keyfile=/etc/kubernetes/ssl/kubernetes-key.pem
和输出:
2019-09-08 13:25:17.089760 I | warning: ignoring ServerName for user-provided CA for backwards compatibility is deprecated
I0908 13:25:17.091361 23743 main.go:132] Installing signal handlers
I0908 13:25:17.091464 23743 manager.go:136] Determining IP address of default interface
I0908 13:25:17.091778 23743 manager.go:149] Using interface with name eth0 and address 172.19.104.231
I0908 13:25:17.091794 23743 manager.go:166] Defaulting external address to interface address (172.19.104.231)
E0908 13:25:17.111110 23743 network.go:102] failed to retrieve network config: 100: Key not found (/kube-centos) [22]
E0908 13:25:18.120376 23743 network.go:102] failed to retrieve network config: 100: Key not found (/kube-centos) [22]
E0908 13:25:19.130908 23743 network.go:102] failed to retrieve network config: 100: Key not found (/kube-centos) [22]
E0908 13:25:20.140395 23743 network.go:102] failed to retrieve network config: 100: Key not found (/kube-centos) [22]
E0908 13:25:21.149898 23743 network.go:102] failed to retrieve network config: 100: Key not found (/kube-centos) [22]
E0908 13:25:22.159205 23743 network.go:102] failed to retrieve network config: 100: Key not found (/kube-centos) [22]
E0908 13:25:23.167726 23743 network.go:102] failed to retrieve network config: 100: Key not found (/kube-centos) [22]
E0908 13:25:24.176019 23743 network.go:102] failed to retrieve network config: 100: Key not found (/kube-centos) [22]
这是我的配置:
# Flanneld configuration options
#
# # etcd url location. Point this to the server where etcd runs
FLANNEL_ETCD_ENDPOINTS="https://172.19.104.231:2379,https://172.19.104.230:2379,https://172.19.150.82:2379"
#
# # etcd config key. This is the configuration key that flannel queries
# # For address range assignment
FLANNEL_ETCD_PREFIX="/kube-centos/network"
#
# # Any additional options that you want to pass
FLANNEL_OPTIONS="-etcd-cafile=/etc/kubernetes/ssl/ca.pem -etcd-certfile=/etc/kubernetes/ssl/kubernetes.pem -etcd-keyfile=/etc/kubernetes/ssl/kubernetes-key.pem"
该如何解决该问题?我正在尝试使用以下命令添加kube-system配置:
etcdctl put /kube-centos/network/config ‘{ “Network”: “10.1.0.0/16” }’
但是我不知道应该为密钥kube-centos
添加什么。
[root@iZuf63refzweg1d9dh94t8Z ~]# etcdctl get /kube-centos
/kube-centos
{"Network":"172.17.0.0/16"}