<p>I have access to a cluster with a lot of nodes. I am running my Nextflow workflow using this command:</p>
<pre><code>./nextflow kuberun user/repo -c nextflow.config -profile kubernetes -v my_pvc:/mounted_path -with-report _report.html -with-trace _trace
</code></pre>
<p>I would like to run my nextflow workflow on a specific set of nodes. I have have already labeled my nodes of interest:</p>
<pre><code>kubectl label nodes node1 disktype=my_experiment
kubectl label nodes node2 disktype=my_experiment
kubectl label nodes node3 disktype=my_experiment
</code></pre>
<p>I am not understanding from Nextflow and Kubernete documentation how to is it possible to schedule my workflow, with the processes splitted between my nodes of interest.</p>
<p>I understand how to do with kubernete only: <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/</a></p>
<p>But not how to the <code>nextflow kuberun</code> command.</p>
<p>Any help is very appreciated, thank you!</p>

Nine
<p>Use one or more <a href="https://www.nextflow.io/docs/latest/config.html#process-selectors" rel="nofollow noreferrer">process selectors</a> and the <a href="https://www.nextflow.io/docs/latest/process.html#pod" rel="nofollow noreferrer">pod directive</a> to select the nodes using a pod label. For example, the following could be added to your 'kubernetes' profile:</p>
<pre><code>process {

    withName: my_process {
        pod {
            nodeSelector = 'disktype=my_experiment'
         }
     }
    ...
}
</code></pre>
