title: Is there a way to add arbitrary records to kube-dns?
body: <p>I will use a very specific way to explain my problem, but I think this is better to be specific than explain in an abstract way...</p>
  
  <p>Say, there is a MongoDB replica set outside of a Kubernetes cluster but in a network. The ip addresses of all members of the replica set were resolved by /etc/hosts in app servers and db servers.</p>
  
  <p>In an experiment/transition phase, I need to access those mongo db servers from kubernetes pods.
  However, kubernetes doesn't seem to allow adding custom entries to /etc/hosts in pods/containers.</p>
  
  <p>The MongoDB replica sets are already working with large data set, creating a new replica set in the cluster is not an option.</p>
  
  <p>Because I use GKE, changing any of resources in kube-dns namespace should be avoided I suppose. Configuring or replace kube-dns to be suitable for my need are last thing to try.</p>
  
  <p>Is there a way to resolve ip address of custom hostnames in a Kubernetes cluster?</p>
  
  <p>It is just an idea, but if kube2sky can read some entries of configmap and use them as dns records, it colud be great.
  e.g. <code>repl1.mongo.local: 192.168.10.100</code>.</p>
  
  <p>EDIT: I referenced this question from <a href="https://github.com/kubernetes/kubernetes/issues/12337" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/12337</a></p>