Configuring DNS Resolution without unbound.conf

I’ve recently ran into an issue where in I need to configure the DNS Resolution of a docker container.

Basically, the default configuration for the applications we’re trying to containerize needs some sort of unbound configuration for DNS Resolution. We have some limitations so we cannot configure kube-dns or unbound on the kubernetes cluster.

To keep it short, I need to be able to configure DNS Resolution for a specific container. Is it possible to configure the unbound configuration below (I’ve replaced the IPs for privacy reasons):

    local-zone: "" redirect
    local-data: " IN CNAME"
    local-zone: "" static
    local-data: " IN A”
    local-data: " IN A”
    local-data: " IN A”
    local-data: " IN A”

In such a way that I can just use the default docker container DNS? I have limited knowledge on network resolution/DNS so any tips or documentation to reference will be much appreciated. To emphasize, the containers are in kubernetes.



Source: StackOverflow