<p><strong>I m using Minikube for kubernetes deployment and Operating system i m using is Ubuntu 18.04</strong></p>
<p><em>I have a Deployment of my application with 3 replicas. So when i deploy 3 pods gets deployed .
when i increase the number of http request all the request are forwarded to the a single pod while there are no logs recorded in the other two replicas.</em></p>
<p>Any ideas on how the load get distributed across all the pods.</p>
<p>i have the deployment.yaml and respective service.yaml file below</p>
<pre><code>    deployment.yaml


    apiVersion: apps/v1
    kind: Deployment
    metadata:
          name: master
      labels:
       app: master-container
    spec:
     selector:
       matchLabels:
         app: master-container
     replicas: 3
     template:
       metadata:
         labels:
           app: master-container
       spec:
         volumes:
         - name: logs-dir
           hostPath:
            path: /data/logs/
            type: DirectoryOrCreate
         containers:
          - name: master-container
            image: image:1
            volumeMounts:
            - mountPath: /data/workspace/logs/
              name: logs-dir

    service.yaml
    
apiVersion: v1
kind: Service
metadata:
  name: master-container
  labels:
    app: master-container
spec:
  selector:
    app: master-container
  ports:
  - port: 2000
    protocol: TCP
    targetPort: 2000
    name: can-port
    nodePort: 32000
  - port: 2002
    protocol: TCP
    targetPort: 2002
    name: can-ajp-port
    nodePort: 32002
  - port: 2003
    protocol: TCP
    targetPort: 2003
    name: cas-port
    nodePort: 32003
  - port: 2005
    protocol: TCP
    targetPort: 2005
    name: cas-ajp-port
    nodePort: 32005
  - port: 31900
    protocol: TCP
    targetPort: 31900
    name: cas-master-port
    nodePort: 31900
  type: NodePort
</code></pre>
<p>Have a look at the below image this is the output of the command</p>
<p>kubectl describe svc canmastercontainer</p>
<p>We can see that service is up and all the ports are accessible . The only issue i m facing is that the load distribution is not happening across the pods</p>
<p><a href="https://i.stack.imgur.com/BF6yn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BF6yn.png" alt="enter image description here" /></a></p>
<p>i have tried giving type as NodePort , LoadBalancer and ClusterIp all the three didnt work out .
All the http request are getting transferred to the single pod .</p>
<p>Any solutions would be appriciated thank you</p>

<p>If you are using port forwarding then the load will not be distributed across all pods (endpoints).</p>
<p>Please refer to this <a href="https://stackoverflow.com/questions/64925781/load-distribution-all-http-requests-are-getting-redirected-to-a-single-pod-in-a/64927127#64927127">link</a> for more information.</p>
