gpt4 book ai didi

ubuntu - Ubuntu 22.04 上的 k3s 网络问题 : failed to get Kubernetes server version: Get \"https://10.43.0.1:443/version?timeout=32s\": i/o timeout

转载 作者:行者123 更新时间:2023-12-04 18:29:26 25 4
gpt4 key购买 nike

从 Ubuntu 20.04 LTS 升级到 Ubuntu 22.04 LTS 后,我目前遇到了我的 k3s 集群的问题。
例如,local-path-provisioner 的日志荚:

$ kubectl logs -n kube-system local-path-provisioner-6c79684f77-l4cqp
time="2022-04-28T03:27:00Z" level=fatal msg="Error starting daemon: Cannot start Provisioner: failed to get Kubernetes server version: Get \"https://10.43.0.1:443/version?timeout=32s\": dial tcp 10.43.0.1:443: i/o timeout"
我尝试了以下操作:
  • 禁用 ipv6,如 here 所述
  • 禁用 ufw防火墙
  • 使用旧版 iptables
  • 将内部流量规则添加到 iptables,如下所示:

  • $ sudo iptables -A INPUT -s 10.42.0.0/16 -d <host_ip> -j ACCEPT
    尽管如此, coredns , local-path-provisionermetrics-server部署不会开始。列出 pod 时,输出如下:
    $ kubectl get pods -n kube-system                                    
    NAME READY STATUS RESTARTS AGE
    cilium-64r4c 1/1 Running 2 (18m ago) 174m
    cilium-d8grw 1/1 Running 2 (18m ago) 174m
    cilium-g4gmf 1/1 Running 2 (18m ago) 174m
    cilium-h5j4h 1/1 Running 2 (18m ago) 174m
    cilium-n62nv 1/1 Running 2 (18m ago) 174m
    cilium-operator-76cff99967-6fgkv 1/1 Running 2 (18m ago) 174m
    cilium-operator-76cff99967-pbr4l 1/1 Running 2 (18m ago) 174m
    cilium-w4n6d 1/1 Running 2 (18m ago) 174m
    cilium-wgm7l 1/1 Running 2 (18m ago) 174m
    cilium-zqb6w 1/1 Running 2 (18m ago) 174m
    coredns-d76bd69b-bhgnl 0/1 CrashLoopBackOff 44 (3m27s ago) 177m
    hubble-relay-67f64789c7-cjzz9 0/1 CrashLoopBackOff 63 (4m15s ago) 174m
    hubble-ui-794cd44b77-9vgbl 3/3 Running 6 (18m ago) 174m
    local-path-provisioner-6c79684f77-l4cqp 0/1 CrashLoopBackOff 35 (3m53s ago) 177m
    metrics-server-7cd5fcb6b7-v74rc 0/1 CrashLoopBackOff 42 (3m35s ago) 177m

    任何帮助表示赞赏!谢谢

    最佳答案

    由于您使用的是 Cilium,我想您可能会遇到这个问题:https://github.com/cilium/cilium/issues/10645
    解决方法是确保 net.ipv4.conf.lxc*.rp_filter设置为 0:

    echo 'net.ipv4.conf.lxc*.rp_filter = 0' | sudo tee -a /etc/sysctl.d/90-override.conf
    sudo systemctl start systemd-sysctl

    关于ubuntu - Ubuntu 22.04 上的 k3s 网络问题 : failed to get Kubernetes server version: Get \"https://10.43.0.1:443/version?timeout=32s\": i/o timeout,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72037747/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com