请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

flannel

错误显示CrashLoopBackOff
kube-flannel-ds-fk225 0/1 CrashLoopBackOff 10 30m
flannel日志是这个错误
t not work. E0208 03:22:49.542263 1 main.go:226] Failed to create SubnetManager: error retrieving pod spec for ‘kube-flannel/kube-flannel-ds-zmq8b’: Get “https://10.1.0.1:443/api/v1/namespaces/kube-flannel/pods/kube-flannel-ds-zmq8b”: dial tcp 10.1.0.1:443: connect: network is unreachable

正在回答 回答被采纳积分+3

1回答

清风 2024-02-08 22:57:24

执行 

kubectl apply -f https://github.com/flannel-io/flannel/blob/629cd70d816e56853aac967f92ed3dade7275baf/Documentation/kube-flannel.yml


0 回复 有任何疑惑可以回复我~
  • 提问者 慕婉清0473784 #1
    执行之后还是报错[root@master ~]# kubectl apply -f https://github.com/flannel-io/flannel/blob/629cd70d816e56853aac967f92ed3dade7275baf/Documentation/kube-flannel.yml
    error: error parsing https://github.com/flannel-io/flannel/blob/629cd70d816e56853aac967f92ed3dade7275baf/Documentation/kube-flannel.yml: error converting YAML to JSON: yaml: line 203: mapping values are not allowed in this context
    回复 有任何疑惑可以回复我~ 2024-02-18 09:30:55
  • 提问者 慕婉清0473784 #2
    使用wegt下载之后还是出错,
    [root@master kubernetes]# kubectl logs kube-flannel-ds-4b65g  -n kube-flannel
    I0218 03:16:02.366408       1 main.go:209] CLI flags config: {etcdEndpoints:http://127.0.0.1:4001,http://127.0.0.1:2379 etcdPrefix:/coreos.com/network etcdKeyfile: etcdCertfile: etcdCAFile: etcdUsername: etcdPassword: version:false kubeSubnetMgr:true kubeApiUrl: kubeAnnotationPrefix:flannel.alpha.coreos.com kubeConfigFile: iface:[] ifaceRegex:[] ipMasq:true ifaceCanReach: subnetFile:/run/flannel/subnet.env publicIP: publicIPv6: subnetLeaseRenewMargin:60 healthzIP:0.0.0.0 healthzPort:0 iptablesResyncSeconds:5 iptablesForwardRules:true netConfPath:/etc/kube-flannel/net-conf.json setNodeNetworkUnavailable:true}
    W0218 03:16:02.367153       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
    E0218 03:16:02.369966       1 main.go:226] Failed to create SubnetManager: error retrieving pod spec for 'kube-flannel/kube-flannel-ds-4b65g': Get "https://10.1.0.1:443/api/v1/namespaces/kube-flannel/pods/kube-flannel-ds-4b65g": dial tcp 10.1.0.1:443: connect: network is unreachable
    回复 有任何疑惑可以回复我~ 2024-02-18 11:24:07
  • 提问者 慕婉清0473784 #3
    root@master kubernetes]# kubectl get pod -A
    NAMESPACE      NAME                             READY   STATUS             RESTARTS   AGE
    kube-flannel   kube-flannel-ds-4b65g            0/1     CrashLoopBackOff   7          15m
    kube-flannel   kube-flannel-ds-lgksl            1/1     Running            0          15m
    kube-system    coredns-6d56c8448f-kp8zx         1/1     Running            36         12d
    kube-system    coredns-6d56c8448f-wlv8f         1/1     Running            37         12d
    kube-system    etcd-master                      1/1     Running            6          12d
    kube-system    kube-apiserver-master            1/1     Running            7          12d
    kube-system    kube-controller-manager-master   1/1     Running            7          12d
    kube-system    kube-proxy-26ggb                 1/1     Running            3          12d
    kube-system    kube-proxy-hr2jt                 1/1     Running            6          12d
    kube-system    kube-scheduler-master            1/1     Running            7          12d
    回复 有任何疑惑可以回复我~ 2024-02-18 11:25:51
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信