<p>I have non deckerised application that needs to connect to dockerised application running inside kubernetes pod.</p>

<p>Given that pods may died and came again with different ip address, how my application can detect this? any way to assign a hostname that redirect to whatever existing pods?</p>

Suleiman Abualrob
<p>You will have to use kubernetes service.  Service gives you a way to talk to your pods with static Ip and dns (if you're client app is inside the cluster). </p>

<p><a href="https://kubernetes.io/docs/concepts/services-networking/service/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/</a></p>

<p>You can do it in several ways:</p>

<ol>
<li>Easiest: Use kubernetes service with type: NodePort.  Then you can access the pod using <a href="http://[nodehost]:[nodeport]" rel="nofollow noreferrer">http://[nodehost]:[nodeport]</a></li>
<li>Use kubernetes ingress. See this link for more details (<a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/</a>)</li>
<li>If you are running in the cloud like aws, azure or gce, you can use kubernetes service type LoadBalancer.</li>
</ol>
