Skip to content

CoreDNS deployment to be mounted with /etc/resolv.conf file from the host #3214

@FSociety07

Description

@FSociety07

Currently, CoreDNS deployment is not mounted with the host's /etc/resolv.conf file. This prevents the CoreDNS from referring to the host's nameserver for DNS queries it cant resolve.

The corefile as defined in the coredns CM contains
forward . UPSTREAMNAMESERVER { max_concurrent 1000 }
https://github.com/coredns/deployment/blob/master/kubernetes/coredns.yaml.sed

The "UPSTREAMNAMESERVER " placeholder typically gets converted to /etc/resolv.conf during kubeadm init. But, it is no use since the file is empty and not mounted from the host file.

Would be better if the resolv.conf file could be mounted to the pod from the host via hostPath volume mount.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions