title: Kubernetes: access "public" urls from within a pod
body: <p>First of all, I am not very expert of K8s, I understand some of the concepts and made already my hands dirty in the configurations.</p>
  
  <p>I correctly set up the cluster configured by my company but I have this issue</p>
  
  <p>I am working on a cluster with 2 pods, ingress rules are correctly configured for <code>www.my-app.com</code> and <code>dashboard.my-app.com</code>. 
  Both pods runs on the same VM.</p>
  
  <p>If I enter in the <code>dashboard</code> pod (<code>kubectl exec -it $POD bash</code>) and try to <code>curl http://www.my-app.com</code> I land on the <code>dashboard</code> pod again (the same happens all the way around, from <code>www</code> to <code>dashboard</code>).
  I have to use <code>http://www-svc.default.svc.cluster.local</code> and <code>http://dashboard-svc.default.svc.cluster.local</code> to land on the correct pods but this is a problem (links generated by the other app will contain internal k8s host, instead of the "public url"). </p>
  
  <p>Is there a way to configure routing so I can access pods with their "public" hostnames, from the pods themselves?</p>