Kubernetes added support for configurable private DNS zones (often called “stub domains”) and external upstream DNS nameservers in the 1.6 release. This can be accomplished in Tectonic by creating a ConfigMap for kube-dns within the kube-system namespace.
First create a file called stubDomains
with contents similar to below:
{"example.corp.local": ["13.56.19.37"] }
Then create a secret from this file called kube-dns
in the kube-system
namespace:
kubectl -n kube-system create configmap kube-dns --from-file=./stubDomains
Finally, roll the existing kube-dns pod:
kubectl -n kube-system get pod | grep dns
kube-dns-2425598031-lg5qx
kubectl -n kube-system delete pod kube-dns-2425598031-lg5qx
You can then test the stub domain is reachable from a pod:
kubectl run debug -ti --image=fedora:latest --restart=Never -- /bin/bash -c 'dig example.corp.local'
http://blog.kubernetes.io/2017/04/configuring-private-dns-zones-upstream-nameservers-kubernetes.html
https://www.quora.com/What-is-stub-zone-in-DNS
Comments
0 comments
Please sign in to leave a comment.