<p>Lets say, you need to run a custom app listening on a fixed port on every worker node?, like a monitoring agent, here's my POC for the case:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: monitor
spec:
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
  template:
    metadata:
      labels:
        app: monitor-nginx
    spec:
      # nodeSelector:
      # app: node-monitor-nginx
      containers:
        - name: node-monitor-nginx-container
          image: nginx:alpine
          ports:
          - containerPort: 80
            hostPort: 31179
            protocol: TCP
</code></pre>

<p>Let's say that my agent reports node status on an nginx pod, so you can get the data on the TCP31179 on every node.</p>

<p>Why the pod it's not listening on that port on the worker nodes??</p>

<pre><code>root@ip-10-0-1-109:~# telnet 10.0.1.109 31179
Trying 10.0.1.109...
telnet: Unable to connect to remote host: Connection refused
</code></pre>

<p>There is an issue about hostPort when CNI is used, you can find informative discussion in this <a href="https://github.com/kubernetes/kubernetes/issues/23920" rel="nofollow noreferrer">GitHub issue</a>.</p>

<p>Other then that, you might also look into <code>hostNetwork: true</code> as a workaround.</p>
