<p>I have pod and its purpose is to take the incoming data and write it to the host volume. I'm running this pod in all the minions.</p>

<p>Now when i setup NodePort service to this pods, traffic will go to 1 pod at a time. </p>

<p>But how do i send request to all this pods in different minions? How to i bypass the load-balancing here? I want that data to be available in all the minions host volume.</p>

<p>Here's a method that works as long as you can send the requests from a container inside the k8s network (this may not match the OP's desire exactly, but I'm guessing this may work for someone googling this).</p>

<p>You have to look up the pods somehow. Here I'm finding all pods in the <code>staging</code> namespace with the label <code>app=hot-app</code>:</p>

<pre><code>kubectl get pods -l app=hot-app -n staging -o json | jq -r '.items[].status.podIP'
</code></pre>

<p>this example uses the awesome jq tool to parse the resulting json and grab the pod ips, but you can parse the json in other ways, including with kubectl itself.</p>

<p>this returns something like this:</p>

<pre><code>10.245.4.253
10.245.21.143
</code></pre>

<p>you can find the internal port like this (example has just one container, so one unique port):</p>

<pre><code>kubectl get pods -l app=hot-app -n staging -o json | jq -r '.items[].spec.containers[].ports[].containerPort' | sort | uniq
8080
</code></pre>

<p>then you get inside a container in your k8s cluster with curl, combine the ips and port from the previous commands, and hit the pods like this:</p>

<pre><code>curl 10.245.4.253:8080/hot-path
curl 10.245.21.143:8080/hot-path
</code></pre>
