Jenkins Slaves not created

Posted on

Hi,

I am working with a free openshift online and trying to run a Jenkins build following the next document: https://access.redhat.com/documentation/en-us/net_core/3.1/html/getting_started_guide/gs_dotnet_on_openshift#install_imagestreams

After complete all the steps and running a new build, the jenkins slaves are not being created and I am seeing the following stack trace in the jenkins pod:
WARNING org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch Error in provisioning; agent=KubernetesSlave name: maven-hbbjg, template=PodTemplate{inheritFrom='', name='maven', namespace='finpo-dev', hostNetwork=false, label='maven', serviceAccount='jenkins', nodeSelector='', nodeUsageMode=NORMAL, workspaceVolume=EmptyDirWorkspaceVolume [memory=false], containers=[ContainerTemplate{name='jnlp', image='image-registry.openshift-image-registry.svc:5000/openshift/jenkins-agent-maven:latest', alwaysPullImage=true, workingDir='/tmp', command='', args='${computer.jnlpmac} ${computer.name}', resourceRequestCpu='', resourceRequestMemory='', resourceLimitCpu='', resourceLimitMemory='', livenessProbe=org.csanchez.jenkins.plugins.kubernetes.ContainerLivenessProbe@901541}]}
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://172.30.0.1/api/v1/namespaces/finpo-dev/pods. Message: admission webhook "validate.user.pods" denied the request: Pod node selection is not permitted on this cluster. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=admission webhook "validate.user.pods" denied the request: Pod node selection is not permitted on this cluster, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=null, status=Failure, additionalProperties={}).
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:568)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:507)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:471)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:430)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleCreate(OperationSupport.java:251)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleCreate(BaseOperation.java:802)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:322)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.create(BaseOperation.java:318)
at org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher.launch(KubernetesLauncher.java:125)
at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:292)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate Terminating Kubernetes instance for agent maven-hbbjg
WARNING org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave deleteSlavePod Failed to delete pod for agent finpo-dev/maven-hbbjg: not found
ERROR: Failed to delete pod for agent finpo-dev/maven-hbbjg: not found
INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave _terminate Disconnected computer maven-hbbjg
Disconnected computer maven-hbbjg

Has anyone had the same problem before?
Thanks,
Regards.