I am using Jenkins to deploy my Docker images to GKE by using the kubernetes plugin version 1.30.3. It works fine so far. But now I am trying to choose a defined node pool in GKE by adding a node selector but it doesn't work for me. This is the definition of the podTemplate in my Jenkins files:
podTemplate(label: '...', containers: [...],
volumes: [..],
nodeSelector: 'cloud.google.com/gke-nodepool: NAME OF THE NODE POOL'
)
Do you have any idea why this isn't working?
I already checked the resulting pod yaml
which doesn't include the defined nodeSelector
...