Kind: Kind fails to creates pods when IPV6 is disabled in the host

Created on 18 Jun 2019  路  3Comments  路  Source: kubernetes-sigs/kind

What happened:

Kind fails to creates pods when IPV6 is disabled in the UBUNTU 18.04 kernel of the host system.

GRUB_CMDLINE_LINUX="ipv6.disable=1"

kubectl -n kube-system describe pod/coredns-... reports the following event.

 Warning  FailedCreatePodSandBox  53m                 kubelet, kind-control-plane  Failed create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "4353e3f9fddbe3c1ac60d98576157e037560cb14dc99c76e6458ed9882ebb96f": failed to add route '{:: 00000000000000000000000000000000} via <nil> dev eth0': operation not supported

HACK Removing the {"dst": "::/0"} route request in the /etc/cni/net.d/10-kindnet.conflist file solves the issue.

...
        "routes": [
          {"dst": "0.0.0.0/0"},
          {"dst": "::/0"}
        ],
...

What you expected to happen

When IPV6 is not available in the host system, then kind create cluster should manage CNI configuration accordingly.

Actually the CNI configuration is hardcoded in kind/pkg/build/node/cni.go file.

How to reproduce it (as minimally and precisely as possible):

Disable IPV6 support before to create a cluster.

Anything else we need to know?:

WORKAROUND: After the cluster is created connect into the docker worker node with the following command

docker exec -it kind-control-plane bash

and fix the /etc/cni/net.d/10-kindnet.conflist as explained previously.

Environment:

  • kind version: v.0.3.0

  • Kubernetes version:
    Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.3", GitCommit:"5e53fd6bc17c0dec8434817e69b04a25d8ae0ff0", GitTreeState:"clean", BuildDate:"2019-06-06T01:44:30Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-17T00:58:35Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

  • Docker version:
    Containers: 1
    Running: 1
    Paused: 0
    Stopped: 0
    Images: 2
    Server Version: 18.09.6
    Storage Driver: overlay2
    Backing Filesystem: extfs
    Supports d_type: true
    Native Overlay Diff: true
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
    Plugins:
    Volume: local
    Network: bridge host macvlan null overlay
    Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
    Swarm: inactive
    Runtimes: runc
    Default Runtime: runc
    Init Binary: docker-init
    containerd version: bb71b10fd8f58240ca47fbb579b9d1028eea7c84
    runc version: 2b18fe1d885ee5083ef9f0838fee39b62d653e30
    init version: fec3683
    Security Options:
    apparmor
    seccomp
    Profile: default
    Kernel Version: 4.15.0-51-generic
    Operating System: Ubuntu 18.04.2 LTS
    OSType: linux
    Architecture: x86_64
    CPUs: 8
    Total Memory: 23.21GiB
    Name: sarah
    ID: BKXJ:7PP4:KY33:TJT6:CUA4:SUO5:6UXT:YWMA:WUZQ:HKX5:TWJ5:VQ2J
    Docker Root Dir: /var/lib/docker
    Debug Mode (client): false
    Debug Mode (server): false
    HTTP Proxy: http://xxxxx:[email protected]:3128
    Registry: https://index.docker.io/v1/
    Labels:
    Experimental: false
    Insecure Registries:
    127.0.0.0/8
    Live Restore Enabled: false
    Product License: Community Engine

  • OS (e.g. from /etc/os-release):
    NAME="Ubuntu"
    VERSION="18.04.2 LTS (Bionic Beaver)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 18.04.2 LTS"
    VERSION_ID="18.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=bionic
    UBUNTU_CODENAME=bionic

kinbug lifecyclactive prioritimportant-soon

Most helpful comment

/assign
The other work around is to use a kind config file and disable the built-in CNI, but it absolutely should work in this case. We'll fix this.

All 3 comments

/assign
The other work around is to use a kind config file and disable the built-in CNI, but it absolutely should work in this case. We'll fix this.

/assign @aojea

633 is now in, 0.4 releasing ~later today will contain image(s) with this fix.

Was this page helpful?
0 / 5 - 0 ratings