- 已编辑
k8s v1.24.9, kuybeSphere 3.3.2
集群内部网络访问外网域名会超时,用busybox也不通,重启coredns也不行,宿主机nslookup全都正常,请问有没有思路怎么查下去?
.:53{
errors
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
hosts {
192.168.1.140 ldap.ruiji.local
192.168.1.140 apisix.ruiji.local
192.168.1.140 gitlab.ruiji.local
192.168.1.140 harbor.ruiji.local
192.168.1.140 jenkins.ruiji.local
192.168.1.140 skywalking.ruiji.local
192.168.1.140 nexus.ruiji.local
192.168.1.140 kas.ruiji.local
192.168.1.140 minio.ruiji.local
192.168.1.140 registry.ruiji.local
fallthrough
}
prometheus :9153
forward . /etc/resolv.conf {
max_concurrent 1000
}
cache 30
loop
reload
loadbalance
}
宿主机
[root@master1 ~]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 119.29.29.29
nameserver 180.76.76.76
[root@master1 ~]# nslookup baidu.com 119.29.29.29
Server: 119.29.29.29
Address: 119.29.29.29#53
Non-authoritative answer:
Name: baidu.com
Address: 110.242.68.66
Name: baidu.com
Address: 39.156.66.10
busybox
bash-5.1# nslookup postgre-postgresql-ha-postgresql-0.postgre-postgresql-ha-postgresql-headless.postgres-system.svc.cluster.local
Server: 169.254.25.10
Address: 169.254.25.10:53
Name: postgre-postgresql-ha-postgresql-0.postgre-postgresql-ha-postgresql-headless.postgres-system.svc.cluster.local
Address: 10.233.97.179
*** Can’t find postgre-postgresql-ha-postgresql-0.postgre-postgresql-ha-postgresql-headless.postgres-system.svc.cluster.local: No answer
bash-5.1# nslookup baidu.com
;; connection timed out; no servers could be reached
bash-5.1# nslookup baidu.com 180.76.76.76
Server: 180.76.76.76
Address: 180.76.76.76:53
Non-authoritative answer:
Name: baidu.com
Address: 110.242.68.66
Name: baidu.com
Address: 39.156.66.10
Non-authoritative answer:
*** Can’t find baidu.com: No answer