As mentioned in #317, we should document how to override coreDNS configurations.
Two ways to do it:
Override the main corefile. e.g. the coredns CM in kube-system
Override the imported configuration file. coredns-conf-custom CM in kube-system
A few points about CoreDNS I should make clear:
CoreDNS file allows you to import files matching a pattern.
By default, CoreDNS installation only mounts the corefile key within coredns CM.
Taken together, what we need to do to allow our default customization and possible further customization:
Update the coredns CM to use the import plugin, then make it look for files matching /etc/coredns-configs/*.conf
Populate /etc/coredns-configs/ with two files (sourced from CMs):
One that contains our default configuration. That is to resolve the name given by the host flag and all subdomains to the internal ingress address.
One that is empty. This is to allow for other packages to update this file for further DNS configurations. In the absence of this file, other packages must update the coredns deployment.
Update the coredns deployment to mount the two CMs.
As mentioned in #317, we should document how to override coreDNS configurations.
Two ways to do it:
A few points about CoreDNS I should make clear:
Taken together, what we need to do to allow our default customization and possible further customization:
/etc/coredns-configs/*.conf
/etc/coredns-configs/
with two files (sourced from CMs):