<p>I have a jenkins and most jobs do some ansible work and need 300mb of ram tops with 50m cpu, but I'v got few massive integration testing jobs that take 14000m cpu(14vcpus) or more, i know there is there a way to have 2 node pools (one with small instances 4gb, and one with the massive 30vcpu machines), and if I had 2 microserwices I could make them use NodeSelector, but jenkins is one microserwice, can I make it somehow spawn different job agents in different node pools? </p>

<p>You should be able to spawn Jenkins agents using another node pool, as <code>NodeSelector</code> is one of the parameter that could be defined.</p>

<p>Based on <a href="https://github.com/jenkinsci/kubernetes-plugin" rel="nofollow noreferrer">kubernetes-plugin GitHub Repo</a>, <code>NodeSelector</code> can be defined as anything you want to match the second node pool.</p>

<p>Example could be found on <a href="https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/test/resources/org/csanchez/jenkins/plugins/kubernetes/pipeline/basicWindows.groovy" rel="nofollow noreferrer">sample file</a> of the repo:</p>

<pre><code>podTemplate(yaml: '''
apiVersion: v1
kind: Pod
spec:
  containers:
  - name: jnlp
    image: jenkins/jnlp-agent:latest-windows
  nodeSelector:
    beta.kubernetes.io/os: windows
'''
) {
    node(POD_LABEL) {
        bat 'dir'
        powershell 'Get-ChildItem Env: | Sort Name'
    }
}
</code></pre>
