I have following question related to traffic routing to POD when i use node port to send traffic to POD.
I send traffic to a node-ip:node-port and no POD is running on that node
I send traffic to a node-ip:node-port and one POD running on that node. will that POD receive the traffic always ?
I send traffic to a node-ip:node-port and more than one POD running on that node. how the traffic distributed between the PODs running on the same node ?
What rules kubernetes follow to route the traffic to POD in the above scenarios ?
I have following question related to traffic routing to POD when i use node port to send traffic to POD.
I send traffic to a node-ip:node-port and no POD is running on that node
If the service DOES NOT specify externalTrafficPolicy: Local, then something (iptables, ebpf) on the node will pick a pod on a different node.
If the service DOES specify externalTrafficPolicy: Local, then traffic will be dropped
I send traffic to a node-ip:node-port and one POD running on that node. will that POD receive the traffic always ?
If the service DOES NOT specify externalTrafficPolicy: Local, then something (iptables, ebpf) on the node will pick a pod, maybe on this node, maybe not.
If the service DOES specify externalTrafficPolicy: Local, then traffic will always be routed to a pod on this node
I send traffic to a node-ip:node-port and more than one POD running on that node. how the traffic distributed between the PODs running on the same node ?
If the service DOES NOT specify externalTrafficPolicy: Local, then something (iptables, ebpf) on the node will pick a pod, maybe on this node, maybe not.
If the service DOES specify externalTrafficPolicy: Local, then traffic will always be routed to a pod on this node, randomly
When picking a pod from a set of eligible pods, the algorithm is random (equal-probability).