failed to retrieve network config: 100: Key not found (/kube-centos)

9/8/2019

I am start flanneld:

/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

and the output:

 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]

this is my config:

# 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"

what should I do to fix the problem?I am trying to add kube-system config using this command:

etcdctl put /kube-centos/network/config ‘{ “Network”: “10.1.0.0/16” }’

but I don't know what should add to key kube-centos.

[root@iZuf63refzweg1d9dh94t8Z ~]# etcdctl get /kube-centos
/kube-centos
{"Network":"172.17.0.0/16"}
-- Dolphin
kubernetes

0 Answers