sealos装k8s特殊网卡报错-->Unable to auto-detect an IPv4 address using interface regexes [bond.*|eth.*|en.*]

问题

使用sealos快速安装时发现calico-system的pod一直crash起不来,查看pod的log

[WARNING][9] startup/autodetection_methods.go 113: Unable to auto-detect an IPv4 address using interface regexes [bond.*|eth.*|en.*]: no valid host interfaces found

检查发现集群中没有对应的网卡,只能使用p4p2

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: em1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether e8:61:1f:53:36:e1 brd ff:ff:ff:ff:ff:ff
3: em2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether e8:61:1f:53:36:e2 brd ff:ff:ff:ff:ff:ff
4: p4p1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether f8:f2:1e:b0:87:8c brd ff:ff:ff:ff:ff:ff
5: p4p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether f8:f2:1e:b0:87:8d brd ff:ff:ff:ff:ff:ff
    inet 10.8.104.54/24 brd 10.8.104.255 scope global noprefixroute p4p2
       valid_lft forever preferred_lft forever
    inet6 fe80::d5e8:eb8e:708:49dd/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:a5:5a:c7:1a brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
8: kube-ipvs0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether 8a:64:b5:bb:1e:89 brd ff:ff:ff:ff:ff:ff
    inet 10.96.0.1/32 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.96.0.10/32 scope global kube-ipvs0
       valid_lft forever preferred_lft forever
    inet 10.96.3.33/32 scope global kube-ipvs0
       valid_lft forever preferred_lft forever

解决方法

在未安装的情况下,修改clusterfile的网卡指定

在已安装的情况下

1.kubectl edit installation default
2.nodeAddressAutodetectionV4: 后面增加需要的网卡

之后重启没起来的pod,查看是否成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值