<p>I have a deployment that creates pods running a container on a specific port. I am looking to give each pod a unique port and exposing it outside the cluster on that unique port. I tried using a service, but this will create one port for all the pods and act as a load balancer.</p>
<p>deployment yaml:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: name-deployment
  labels:
    app: name
spec:
  replicas: 3
  selector:
    matchLabels:
      app: name
  template:
    metadata:
      labels:
        app: name
  spec:
    containers:
    - name: name
      image: image
      ports:
        - containerPort: 25566
</code></pre>

Ferskfisk
<p>It's not possible as all pods under one deployment will have same configuration including exposed ports. Creating different deployments and setting custom scaling logic would help you here.</p>
