title: how to use Kubernetes DNS for pods?
body: <p>On GKE, <strong>kube-dns</strong> is running on my nodes, I can see the docker containers.</p>
  
  <p>I do have access to <strong>Services</strong> by name, which is great for all these applications where load balancing is a perfectly suitable solution, but <em>how would I use the DNS to access individual pods?</em> </p>
  
  <p>I know I can look up specific pods in the API, but I need to update the <code>hosts</code> file myself, and keep watching the pod list. DNS is supposed to do that for me so how is it meant to be used within a pod?</p>
  
  <p>The Kubernetes doc says the DNS info needs to be passed to the kubelet but I have no access to that on GKE that I know of, so is it just not setup that way on GKE or is there something to do to activate it? </p>
  
  <p>Some of my services (zookeeper in particular) is aware of other nodes on its own, and tries to connect to them by host name (that is pod name) and that fails unless I update the <code>hosts</code> file myself. I would like to use the integrated DNS service for that.</p>
  
  <p>Any guidance on how to do this would be appreciated.</p>
  
  <p>Thanks</p>