Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
docker flannel子网问题_Docker_Coreos_Flannel - Fatal编程技术网

docker flannel子网问题

docker flannel子网问题,docker,coreos,flannel,Docker,Coreos,Flannel,码头工人没有捡到法兰绒。任何帮助都将是巨大的。我是 使用coreos作为我的容器Linux和docker版本是1.12.6 我的docker启动文件如下所示。 法兰绒正在按预期工作 检查/run/flannel/flannel\u docker\u opts.env是否存在及其内容。 我的/run/flannel/subnet.env看起来像: 法兰绒_网络=10.252.0.0/16 法兰绒_子网=10.252.127.1/24 法兰绒_MTU=1450 法兰绒_IPMASQ=假 将--bip

码头工人没有捡到法兰绒。任何帮助都将是巨大的。我是 使用coreos作为我的容器Linux和docker版本是1.12.6 我的docker启动文件如下所示。 法兰绒正在按预期工作

  • 检查
    /run/flannel/flannel\u docker\u opts.env
    是否存在及其内容。 我的
    /run/flannel/subnet.env
    看起来像:

    法兰绒_网络=10.252.0.0/16

    法兰绒_子网=10.252.127.1/24

    法兰绒_MTU=1450

    法兰绒_IPMASQ=假

  • --bip=${FLANNEL\u SUBNET}--mtu=${FLANNEL\u mtu}
    添加到dockerd参数

  • 如果这无法工作,
    rm-rf/var/lib/docker/overlay2/*
    并重新启动docker.service
  • [Unit]
     Description=Docker Application Container Engine
     Documentation=http://docs.docker.com
     After=containerd.service docker.socket network.target
     Requires=containerd.service docker.socket
     [Service]
     Type=notify
     EnvironmentFile=-/run/flannel/flannel_docker_opts.env
     # the default is not to use systemd for cgroups because the delegate issues 
     still
     # exists and systemd currently does not support the cgroup feature set 
     required
     # for containers run by docker
     ExecStart=/usr/lib/coreos/dockerd --host=fd:// --
     containerd=/var/run/docker/libcontainerd/docker-containerd.sock 
     $DOCKER_OPTS $DOCKER_CGROUPS $
     ExecReload=/bin/kill -s HUP $MAINPID
     LimitNOFILE=1048576
     # Having non-zero Limit*s causes performance problems due to accounting 
     overhead
     # in the kernel. We recommend using cgroups to do container-local 
     accounting.
     LimitNPROC=infinity
     LimitCORE=infinity
     # Uncomment TasksMax if your systemd version supports it.
     # Only systemd 226 and above support this version.
     TasksMax=infinity
     TimeoutStartSec=0
     # set delegate yes so that systemd does not reset the cgroups of docker 
     containers
     Delegate=yes
     [Install]
     WantedBy=multi-user.target
    # /etc/systemd/system/docker.service.d/40-flannel.conf
    [Unit]
    Requires=flanneld.service
    After=flanneld.service
    [Service]
    EnvironmentFile=/etc/kubernetes/cni/docker_opts_cni.env
    # /etc/systemd/system/docker.service.d/40-storage.conf
    [Service]
    ExecStart=
    ExecStart=/usr/bin/dockerd --host=fd:// --graph="/abc/docker" $DOCKER_OPTS 
    $DOCKER_CGROUPS $DOCKER_OPT_BIP $DOCKER_OPT_MTU $DOCKER_OPT_IPMASQ
    # /etc/systemd/system/docker.service.d/50-insecure-registry.conf
    [Service]
    Environment=DOCKER_OPTS='--insecure-registry="10.x.x.x:5000"'
    # /etc/systemd/system/docker.service.d/50-require-flannel.conf
    [Unit]
    Requires=flanneld.service
    After=flanneld.service