title: Kubernetes: How to map service to a local port inside pod
body: <p>Is it possible to map Kubernetes service to a specific port for a group of pods (deployement)?
  E.g. I have service (just as an example)</p>
  
  <pre><code>kind: Service
  apiVersion: v1
  metadata:
    name: my-service
  spec:
    selector:
      app: MyApp
    ports:
    - protocol: TCP
      port: 8081
      targetPort: 8081
  </code></pre>
  
  <p>And I want this service be available as <a href="http://localhost:8081/" rel="nofollow noreferrer">http://localhost:8081/</a> in my pods from some specific deployment. </p>
  
  <p>It seems to me that I saw this in K8S docs several days ago, but I can not find this right now. </p>