flannel
flannel copied to clipboard
About etcd version
Current Behavior
flannel can not working well with etcd 3
Possible Solution
- Whether to plan to support
etcd 3
as dataStore? - If no plan, please make clear for only support
etcd 2
now
Your Environment
- Flannel version: 0.5.3+git
- Etcd version: 3.5
Set the parameter --enable-v2 to true in etcd, etcd supports flannel access.
Thanks for reminding us of this. Currently, I have also came across this problem.
When I set the network for etcd 3 to connect docker network between hosts as this command,
etcdctl put /coreos.com/network/config '{"Network":"172.16.0.0/12", "Backend":{"Type":"vxlan"}}'
I came across the following problem after input "flanneld":
I1028 17:10:54.868704 79569 main.go:514] Determining IP address of default interface
I1028 17:10:54.869922 79569 main.go:527] Using interface with name enp59s0f0 and address 10.10.2.41
I1028 17:10:54.869942 79569 main.go:544] Defaulting external address to interface address (10.10.2.41)
I1028 17:10:54.870460 79569 main.go:244] Created subnet manager: Etcd Local Manager with Previous Subnet: None
I1028 17:10:54.870487 79569 main.go:247] Installing signal handlers
E1028 17:10:54.872134 79569 main.go:382] Couldn't fetch network config: client: response is invalid json. The endpoint is probably not valid etcd cluster endpoint.
timed out
E1028 17:10:55.872961 79569 main.go:382] Couldn't fetch network config: client: response is invalid json. The endpoint is probably not valid etcd cluster endpoint.
timed out
@zkzhu0110 I have encountered the problem too. Couldn't fetch network config: client: response is invalid json. The endpoint is probably not valid etcd cluster endpoint,
How did you solve it, Version: Flannel: 0.12 etcd: V3.4.9
works for etcd 3.4.10:
etcd server: add --enable-v2
etcd client: ETCDCTL_API=2 etcdctl set /coreos.com/network/config '{ "Network": "10.5.0.0/16", "Backend": {"Type": "vxlan"}}'
Environment
- etcd 3.5.0 run on docker
- flannerl 0.14.0
Cause of this problem
- Since etcd 3.4 introduced api v3 as default.
- flannel 0.14.0 or lower version just support etcd v2 api.
Solution
Running etcd
docker run -d --restart=always --name etcd-server \
--publish 2379:2379 \
--publish 2380:2380 \
--env ALLOW_NONE_AUTHENTICATION=yes \
--env ETCD_ADVERTISE_CLIENT_URLS=http://<etcd-server-ip>:2379 \
bitnami/etcd:3.5.0 "/opt/bitnami/scripts/etcd/run.sh" --enable-v2
Add flannel network information to etcd
-
cat /root/flannel-config.json
{ "Network": "10.2.0.0/16", "SubnetLen": 24, "Backend": { "Type": "vxlan" } }
-
add to etcd
docker exec -i -e ETCDCTL_API=2 etcd-server etcdctl --endpoints=http://<etcd-server-ip>:2379 set /docker-test/network/config < /root/flannel-config.json
Hi team, since etcd 3.6 start to deprecate V2 API, probably removed in 3.7 or later, the workaround will not work, do we have any schedule to support V3 API?
@luthermonson @manuelbuil May I know any plan for v3 support?
@luthermonson @manuelbuil May I know any plan for v3 support?
Not from my side :(. I hope somebody jumps in and contributes with a PR to fix the problem
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.