I have configured coreDNS to point to an external DNS server for all *.mydomain.com requests with this yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns-custom
namespace: kube-system
data:
test.server: |
mydomain.com:53 {
errors
cache 30
forward . 10.0.0.3 10.0.0.4
}
Now what I couldn't find is what the test.server part is for. I found that .server is important, but not how to properly name this part, let alone what to call this part.
ConfigMaps use key-value pairs to organize the data contained in them. Here is a good example of this format for the data section of a ConfigMap.
For this specifically, it looks like coreDNS in AKS will identify the proxy-related configuration as long as the key matches *.server.
So in your case, the data property called test.server contains configuration information regarding mydomain.com:53 among other nested configuration data. This format is specific to coreDNS configuration on AKS.
test.server is just the key from your ConfigMap containing the configuration properties for the server.
As the second example (on the AKS docs page you linked) says:
test.server: | # you may select any name here, but it must end with the .server file extension
Meaning Azure Kubernetes Service will probably search for keys ending in .server and use them accordingly. Naming could be anything from external.server, dns.server or coredns.server to just keeping test.server.