Let me try and explain this as best as i could:
- Using only 1 node (single node clustering)
- 3 Pods (Pod A, Pod B, Pod C) of same application in this node. These are vendor application which are not restful application. They are java application. Application in these pod will open TCP listener port 8888. So Pod A, Pod B, Pod C each has port 8888 open for listening. All these pods are labelled ABC.
- Created NodePort NP1 service:
Port: 2222
NodePort: 3333
TargetPort: 8888 --> this is targeting the above Pods listener
:
selector:
labels: ABC - Another application (APP1) connects to NP1 service (TCP) connecting to NodePort 3333 and send payload to those 3 Pods.
- Payload are coming in but it only goes to Pod A. It's not distributing to other 2 pods.
- I understand IP Tables is used for traffic distribution. I noticed when the protocol is HTTP then the payload gets distributed to all 3 pods. But when it's TCP it only distribute to 1 Pod all the time.
Any help or insight would be great.