Hi,
Sorry for my English I’m French.
I’ve an issue with resolving/pinging external name/domain on pods (deploy/cronjob).
Sometime (but a lot of time) a pod can’t resolve or ping a name like www.google.fr. The result is the following:
ping: connect: Network is unreachable
nslookup is KO too.
But if I try some minutes after it’s OK.
I’ve a personal DNS installed on a server.
Coredns:
apiVersion: v1
data:
Corefile: |
.:53 { errors health { lameduck 5s } ready kubernetes cluster.local in-addr.arpa ip6.arpa { pods insecure fallthrough in-addr.arpa ip6.arpa ttl 30 } **prometheus** :9153 forward . /etc/resolv.conf 1.1.1.1 { max_concurrent 1000 } cache 30 { disable success cluster.local disable denial cluster.local } loop reload loadbalance } local.mydomain:53 { errors cache 30 forward . 192.168.1.180 }
All my deploy/cronjobs/jobs have “dnsPolicy: ClusterFirst”.
Thank’s for your help.
Cluster information:
Kubernetes version: v1.34.1
Cloud being used:
Installation method:
Host OS: Rocky Linux
CNI and version: flannel, v1.8.0
CRI and version: cri-dockerd, v0.3.20