I have created kubernetes cluster in GCP and top of it i have configured jenkins in kubernetes using the below url https://cloud.google.com/solutions/jenkins-on-kubernetes-engine-tutorial
I am able to run jenkins build with normal commands and it is creating a pod and the build is getting successful. When i am trying to change the image for maven build or golang build, i am unable to complete it. When i try to change it the pod is keep on terminating and recreating.
We can add pod template in Jenkins pipeline script to pull our custom image and to run as a slave pod. Use this below format: