<p>I have two pods running in the same namespace.</p>
<p>One of then can be accessed trough the following multi-port service:</p>
<pre class="lang-yaml prettyprint-override"><code>kind: Service
apiVersion: v1
metadata:
  name: bacon-service
spec:
  selector:
    app: bacon-app
    restype: pod
  ports:
  - name: http
    port: 80
    targetPort: 8001
    protocol: TCP
  - name: http2
    port: 8787
    targetPort: 8787
    protocol: TCP
  type: ClusterIP
</code></pre>
<p>And the second needs to access the <code>http2 port</code> of the first pod to make gRPC transactions.</p>
<p>I've been using the port number to access it, which has been working just fine.</p>
<pre><code>http://bacon-app:8787
</code></pre>
<p>Yet I think a clever implementation would be to use the port name.
So if by any change someday someone decides to change the service port, the client pod would not be affected.</p>
<p>I've tried to achieve so with the following:</p>
<pre><code>http://bacon-app:http2
</code></pre>
<p>Which simply does not work, would it be possible to do it somehow?</p>

Rogerio Schmitt
<p>No, sorry, but it's not possible, as this is pure http routing and has nothing to do with Kubernetes. Browsers / http clients only understand <code>&lt;scheme&gt;://&lt;host&gt;[:port]</code></p>
