Jenkins Kubernetes plugin failing to provision jnlp-slave pods
I went to http://172.20.43.30:8080/configureSecurity/ and set "Agents:TCP port for JNLP agents" to "random"
I then got a "jnlp-slave-ttm5v (suspended)" that stays in the "Build Executor Status"
and the log said:
Container is waiting jnlp-slave-ttm5v [jnlp-slave]: ContainerStateWaiting(message=Error response from daemon: the working directory './.jenkins-agent' is invalid, it needs to be an absolute path, reason=CreateContainerError, additionalProperties={})
After setting "Working directory" to "/home/jenkins" I saw a pod actually get created on k8s:
# kubectl get pods --namespace=jenkins-slavesNAME READY STATUS RESTARTS AGEjnlp-slave-1ds27 2/2 Running 0 42s
and my job ran successfully!
Started by user BuildguyAgent jnlp-slave-1ds27 is provisioned from template Kubernetes Pod TemplateAgent specification [Kubernetes Pod Template] (jenkins-slaves): * [jnlp-slave] jenkins/jnlp-slave(resourceRequestCpu: , resourceRequestMemory: , resourceLimitCpu: , resourceLimitMemory: )Building remotely on jnlp-slave-1ds27 (jenkins-slaves) in workspace /home/jenkins/workspace/maven-parent-poms