K3S Rancher – Debian based docker images not resolving dns properly

I am facing strange problem.

What I’ve done:

I deployed Rancher K3S cluster and there is a problem in dns resolving with debian based images. Domains are not resolved properly – it adds suffix to it with one of ours domain.

What I’ve found:

Debian based image adds suffix with domain to the end. e.g. I ping google.com and its pinging google.com.example.com. (example.com is one of our domains – not specifing it because it is not important imo)

The same for curl google.com makes request to ip address of example.com . Even tried pure debian image and it is still doing the same issue.

Alpine based images works fine (ping to google.com pings google.com, nslookup shows right ip address).

Host server where k3s is installed also works fine (redhat os). Ping to google.com pings google.com.

Some additional data that can maybe help you:

CoreDNS configmap
kubectl -n kube-system get configmap coredns -o go-template={{.data.Corefile}}

.:53 {
    errors
    health
    ready
    kubernetes cluster.local in-addr.arpa ip6.arpa {
      pods insecure
      upstream
      fallthrough in-addr.arpa ip6.arpa
    }
    hosts /etc/coredns/NodeHosts {
      reload 1s
      fallthrough
    }
    prometheus :9153
    forward . 8.8.8.8
    cache 30
    loop
    reload
    loadbalance
}

Does anyone faced the same or similar problem?
Do you have some points to push me towards solving?

Thanks,
David

Source: StackOverflow