![]() Automatic merge from submit-queue (batch tested with PRs 41826, 42405) Add stubDomains and upstreamNameservers configuration to kube-dns ```release-note Updates the dnsmasq cache/mux layer to be managed by dnsmasq-nanny. dnsmasq-nanny manages dnsmasq based on values from the kube-system:kube-dns configmap: "stubDomains": { "acme.local": ["1.2.3.4"] }, is a map of domain to list of nameservers for the domain. This is used to inject private DNS domains into the kube-dns namespace. In the above example, any DNS requests for *.acme.local will be served by the nameserver 1.2.3.4. "upstreamNameservers": ["8.8.8.8", "8.8.4.4"] is a list of upstreamNameservers to use, overriding the configuration specified in /etc/resolv.conf. ``` |
||
---|---|---|
.. | ||
kubedns-controller.yaml.base | ||
kubedns-controller.yaml.in | ||
kubedns-controller.yaml.sed | ||
kubedns-sa.yaml | ||
kubedns-svc.yaml.base | ||
kubedns-svc.yaml.in | ||
kubedns-svc.yaml.sed | ||
Makefile | ||
OWNERS | ||
README.md | ||
transforms2salt.sed | ||
transforms2sed.sed |
kube-dns
kube-dns
schedules DNS Pods and Service on the cluster, other pods in cluster
can use the DNS Service’s IP to resolve DNS names.
Manually scale kube-dns Deployment
kube-dns creates only one DNS Pod by default. If dns-horizontal-autoscaler is not enabled, you may need to manually scale kube-dns Deployment.
Please use below kubectl scale
command to scale:
kubectl --namespace=kube-system scale deployment kube-dns --replicas=<NUM_YOU_WANT>
Do not use kubectl edit
to modify kube-dns Deployment object if it is
controlled by Addon Manager. Otherwise the modifications
will be clobbered, in addition the replicas count for kube-dns Deployment will
be reset to 1. See Cluster add-ons README and
#36411 for reference.
kube-dns Deployment and Service templates
This directory contains the base UNDERSCORE templates that can be used to generate the kubedns-controller.yaml.in and kubedns.controller.yaml.in needed in Salt format.
Due to a varied preference in templating language choices, the transform Makefile in this directory should be enhanced to generate all required formats from the base underscore templates.
N.B.: When you add a parameter you should also update the various scripts that supply values for your new parameter. Here is one way you might find those scripts:
cd kubernetes && git grep 'kubedns-controller.yaml'
Base Template files
These are the authoritative base templates. Run 'make' to generate the Salt and Sed yaml templates from these.
kubedns-controller.yaml.base
kubedns-svc.yaml.base
Generated Salt files
kubedns-controller.yaml.in
kubedns-svc.yaml.in
Generated Sed files
kubedns-controller.yaml.sed
kubedns-svc.yaml.sed