1

Apologies if this question has been asked before.

We have a daemonset which contains a container x listening on a port y. Any container in the same daemonset pod can directly access the container x using localhost.

The networking we need is that : a given pod on the same node should be able to talk to the container x on the daemonset pod scheduled only on that node. If for some reason, the container is down for sometime, the call should error out and not get routed to another instance on a different node.

With my limited understanding, I tired using LoadBalancer with externalTrafficPolicy being local but that didn’t work for my requirements.

Another solution I have in mind is to fetch the information about all pods running on the node and figure out the pod IP of the daemonset pod and use that to communicate.

Kiran Ramesh
  • 345
  • 3
  • 15
  • 1
    In the linked question, the DaemonSet defines a `hostPort:`. Then Pods can use the "downward API" to find their Node's IP address, and connect to that known port. That will always be on the local system and doesn't use a Service. – David Maze Mar 04 '23 at 11:56

0 Answers0