<p>I want to deploy many Pods in Google Kubernetes Engine and then establish a TCP connection to each specific Pod by Subdomain like pod-name-or-label.mydomain.com or path routing like protocol://mydomain.com:7878/pod-name-or-label.</p>

<p>I have looked in different directions like Istio or nginx-ingress, but that seems to me to be too complicated. </p>

<p>Is not there a simple solution for that?</p>

micha
<p>For <strong>Istio</strong>, You can use <a href="https://istio.io/docs/concepts/traffic-management/#virtual-services" rel="nofollow noreferrer">VirtualService</a> to control the <strong>routing rules</strong> to the target <strong>subset</strong> with defining by <a href="https://istio.io/docs/concepts/traffic-management/#destination-rules" rel="nofollow noreferrer">DestinationRules</a>. </p>

<p>The <strong>DestinationRule</strong> will route to the target <strong>Pods</strong> by the <strong>specified label</strong> pods.</p>

<p>The request flow will like to:</p>

<pre><code>+--------------------+
|                    |
|    Istio Gateway   |
|                    |
|                    |
+---------+----------+
          |traffic incoming
          |
+---------v----------+
|                    |
|   VirtualService   |
|                    |
|                    |
+---------+----------+
          |route to subset by the routing rules
          v

+--------------------+
|                    |
|  DestinationRules  |
|                    |
|                    |
+---------+----------+
          |route traffic to target pods
          v

+--------------------+
|                    |
|                    |
|       Pods         |
|                    |
+--------------------+
</code></pre>

<p>so as @ericstaples said you should create different <strong>Deployments</strong> with different <strong>pod labels</strong> to achieve separating <strong>traffic</strong> to <strong>the target pods</strong>, Example:</p>

<ol>
<li>create a deployment with pod label: t1</li>
<li>create a subset in <em>DestinationRule</em>: select t1 label pod as subset s1</li>
<li>control your traffic in <strong>VirtualService</strong> that route to <code>s1</code> subset</li>
<li><code>s1</code> route to the target pods</li>
</ol>

<p>also for expose <strong>Gateway</strong>, you can use <strong>ClusterIP</strong> or <strong>NodePort</strong> like ** Kubernetes** other service did, see more of <a href="https://istio.io/docs/tasks/traffic-management/ingress/#determining-the-ingress-ip-and-ports" rel="nofollow noreferrer">Istio Traffic</a>.</p>

<p>There are some references maybe it's helpful:</p>

<p><a href="https://istio.io/docs/concepts/traffic-management/" rel="nofollow noreferrer">https://istio.io/docs/concepts/traffic-management/</a></p>

<p><a href="https://istio.io/docs/tasks/traffic-management/request-routing/" rel="nofollow noreferrer">https://istio.io/docs/tasks/traffic-management/request-routing/</a></p>
