<p>I recently deployed the jaeger agent as a daemonset on my k8s cluster alongside a collector. When trying to send spans to the agent using:</p>
<pre><code>- name: JAEGER_AGENT_HOST
  valueFrom:
    fieldRef:
      fieldPath: status.hostIP
</code></pre>
<p>When looking at the application logs I see:</p>
<pre><code>failed to flush Jaeger spans to server: write udp &lt;Pod-Ip&gt;:42531-&gt;&lt;Node-Ip&gt;:6831: write: connection refused
</code></pre>
<p>All nodes can access each other as the security group does not block ports between them, when using a sidecar agent the spans are sent without issue.</p>
<p>Replicate:</p>
<p>Deploy agent using:</p>
<pre><code>apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: jaeger-agent
  labels:
    app: jaeger
    app.kubernetes.io/name: jaeger
    app.kubernetes.io/component: agent
  namespace: observability
spec:
  selector:
    matchLabels:
      app: jaeger
      app.kubernetes.io/name: jaeger
      app.kubernetes.io/component: agent
  template:
    metadata:
      labels:
        app: jaeger
        app.kubernetes.io/name: jaeger
        app.kubernetes.io/component: agent
    spec:
      containers:
      - name: jaeger-agent
        image: jaegertracing/jaeger-agent:1.18.0
        args: [&quot;--reporter.grpc.host-port=&lt;collector-name&gt;:14250&quot;]
        ports:
          - containerPort: 5775
            protocol: UDP
          - containerPort: 6831
            protocol: UDP
          - containerPort: 6832
            protocol: UDP
          - containerPort: 5778
            protocol: TCP
</code></pre>
<p>Then deploy hotrod application:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: hotrod
  labels:
    app: hotrod
    version: v1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hotrod
  template:
    metadata:
      labels:
        app: hotrod
    spec:
      containers:
      - name: hotrod
        image: jaegertracing/example-hotrod:latest
        imagePullPolicy: Always
        env:
          - name: JAEGER_AGENT_HOST
            valueFrom:
              fieldRef:
                fieldPath: status.hostIP
        ports:
          - containerPort: 8080
</code></pre>

Maor Goldberg
<p>Looks like your DaemonSet misses the <code>hostNetwork</code> property, to be able to listen on the node IP.
You can check that article for further info: <a href="https://medium.com/@masroor.hasan/tracing-infrastructure-with-jaeger-on-kubernetes-6800132a677" rel="nofollow noreferrer">https://medium.com/@masroor.hasan/tracing-infrastructure-with-jaeger-on-kubernetes-6800132a677</a></p>
