【问题标题】:flannel restart very often法兰绒经常重启
【发布时间】:2019-09-14 18:02:08
【问题描述】:

节点上的 Flannel 总是重启。

日志如下:

root@debian:~# docker logs faa668852544
I0425 07:14:37.721766       1 main.go:514] Determining IP address of default interface
I0425 07:14:37.724855       1 main.go:527] Using interface with name eth0 and address 192.168.50.19
I0425 07:14:37.815135       1 main.go:544] Defaulting external address to interface address (192.168.50.19)
E0425 07:15:07.825910       1 main.go:241] Failed to create SubnetManager: error retrieving pod spec for 'kube-system/kube-flannel-ds-arm-bg9rn': Get https://10.96.0.1:443/api/v1/namespaces/kube-system/pods/kube-flannel-ds-arm-bg9rn: dial tcp 10.96.0.1:443: i/o timeout

主配置: ubuntu: 16.04

节点:

embedded system with debian rootfs(linux4.9).
kubernetes version:v1.14.1
docker version:18.09
flannel version:v0.11.0

希望 flannel 在节点上运行正常。

【问题讨论】:

  • 你能分享kubectl cluster-info --v=9命令的输出吗

标签: kubernetes flannel kube-apiserver


【解决方案1】:

首先,要让 flannel 正常工作,您必须将 --pod-network-cidr=10.244.0.0/16 传递给 kubeadm init。

kubeadm init --pod-network-cidr=10.244.0.0/16

通过运行将/proc/sys/net/bridge/bridge-nf-call-iptables设置为1

sysctl net.bridge.bridge-nf-call-iptables=1 

接下来是创建clusterrole和clusterrolebinding

如下:

kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml

【讨论】:

    猜你喜欢
    • 2016-03-30
    • 2019-01-16
    • 2021-06-24
    • 1970-01-01
    • 1970-01-01
    • 2019-02-05
    • 2017-01-15
    • 2020-03-22
    • 2016-09-01
    相关资源
    最近更新 更多