Flannel running in a pod is getting the wrong subnet and networking is just not happy, the symptom is flannel is being assigned /24's from the it should be assigning /26's from Thanks for any help.

here are the details:

/usr/bin/kubeadm init \
--kubernetes-version v1.7.5 \
--pod-network-cidr \
--service-cidr \

kube-flannel-rbac.yml is loaded after kube-flannel.yml only modified bit(SubenetLen and Network) from kube-flannel.yml:

  "Network": "",
  "SubnetLen": 26,
  "Backend": {
    "Type": "vxlan"

DNS is set in the systemd file to:


Using Ubuntu 16.04 LTS and stock kernel

here is the docker daemon.json file:

    "experimental": true,
"registry-mirrors": [
"insecure-registries": [
"tls": true,
"tlsverify": true,

all kuberentes components are 1.7.5 installed from ubuntu k8s repos

here is the log of the kube-flannel container:

I0926 03:29:10.214198      89 main.go:446] Determining IP address of default interface
I0926 03:29:10.216166      89 main.go:459] Using interface with name eth0 and address
I0926 03:29:10.216261      89 main.go:476] Defaulting external address to interface address (
I0926 03:29:10.242216      89 kube.go:283] Starting kube subnet manager
I0926 03:29:10.242055      89 kube.go:130] Waiting 10m0s for node controller to sync
I0926 03:29:11.242864      89 kube.go:137] Node controller sync successful
I0926 03:29:11.242957      89 main.go:226] Created subnet manager: Kubernetes Subnet Manager - kube-m2.XXXXX.com
I0926 03:29:11.242969      89 main.go:229] Installing signal handlers
I0926 03:29:11.243984      89 main.go:330] Found network config - Backend type: vxlan
I0926 03:29:11.288902      89 ipmasq.go:51] Adding iptables rule: -s -d -j RETURN
I0926 03:29:11.306692      89 ipmasq.go:51] Adding iptables rule: -s ! -d -j MASQUERADE
I0926 03:29:11.314413      89 ipmasq.go:51] Adding iptables rule: ! -s -d -j RETURN
I0926 03:29:11.323229      89 ipmasq.go:51] Adding iptables rule: ! -s -d -j MASQUERADE
I0926 03:29:11.329676      89 main.go:279] Wrote subnet file to /run/flannel/subnet.env
I0926 03:29:11.329746      89 main.go:284] Finished starting backend.
I0926 03:29:11.329829      89 vxlan_network.go:56] Watching for L3 misses
I0926 03:29:11.329903      89 vxlan_network.go:64] Watching for new subnet leases

1 Answer 1


You have either a bad understanding or misconception about how a cidr works. is just one address in the range -
So either your cidr bits are not the one you're expecting, would be a valid network definition but that's a /26 subnet within the, or you're not using the proper network definition.

You can check those division on this very helping site (the link already use your networks above.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.