首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >码头法兰绒子网问题

码头法兰绒子网问题
EN

Stack Overflow用户
提问于 2017-06-29 08:51:46
回答 1查看 362关注 0票数 0

码头工人不接法兰绒子网。任何帮助都会很好。我使用coreos作为容器Linux,而docker版本为1.12.6,我的docker启动文件如下所示。法兰绒正在按预期工作

代码语言:javascript
复制
[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  
EN

回答 1

Stack Overflow用户

发布于 2018-04-11 12:19:22

  1. 检查/run/flannel/flannel_docker_opts.env是否存在及其内容。我的/run/flannel/subnet.env看起来像: 法兰绒网络=10.252.0.0/16 法兰绒子网=10.252.127.1/24 FLANNEL_MTU=1450 FLANNEL_IPMASQ=false
  2. --bip=${FLANNEL_SUBNET} --mtu=${FLANNEL_MTU}添加到dockerd。
  3. 如果这不能工作,rm -rf /var/lib/docker/overlay2/*并重新启动docker.service
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44820454

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档