title: kubernetes get host dns name to container for kafka advertise host
body: <p>I want to deploy kafka on kubernetes.</p>
  
  <p>Because I will be streaming with high bandwidth from the internet to kafka I want to use the hostport and advertise the hosts "dnsName:hostPort" to zookeeper so that all traffic goes directly to the kafka broker (as opposed to using nodeport and a loadbalancer where traffic hits some random node which redirects it creating unnecessary traffic).</p>
  
  <p>I have setup my kubernetes cluster on amazon. With <code>kubectl describe node ${nodeId}</code> I get the internalIp, externalIp, internal and external Dns name of the node. </p>
  
  <p>I want to pass the externalDns name to the kafka broker so that it can use it as advertise host.</p>
  
  <p>How can I pass that information to the container? Ideally I could do this from the deployment yaml but I'm also open to other solutions.</p>