i am using jenkins kubernetes plugin.Configure it and testing a sample pipeline code as below:
podTemplate(containers: [
containerTemplate(name: 'ssh-client', image: 'kroniak/ssh-client:3.6', ttyEnabled: true, command: 'cat')
]) {
node(POD_LABEL) {
stage('container log') {
container('ssh-client') {
sshagent (credentials: ['ContainerExecDecoratorPipelineTest-sshagent']) {
sh 'env'
sh 'ssh-add -L'
sh 'ssh -vT -o "StrictHostKeyChecking=no" git@github.com'
}
}
}
}
}
while this is building i can check my kubernetes cluster and noticed that pods are creating but terminating also after few seconds. It keeps happening infinitely. I even checked with all other sample pipelines. The console output in Jenkins shows :
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Created Pod: ns-jenkins/tests-14-zm889-hxd6p-j19bl
[Normal][ns-jenkins/tests-14-zm889-hxd6p-j19bl][Scheduled] Successfully assigned ns-jenkins/tests-14-zm889-hxd6p-j19bl to docker-desktop
[Normal][ns-jenkins/tests-14-zm889-hxd6p-j19bl][Pulling] Pulling image "kroniak/ssh-client:3.6"
Still waiting to schedule task
‘tests-14-zm889-hxd6p-j19bl’ is offline
[Normal][ns-jenkins/tests-14-zm889-hxd6p-j19bl][Pulled] Successfully pulled image "kroniak/ssh-client:3.6"
[Normal][ns-jenkins/tests-14-zm889-hxd6p-j19bl][Created] Created container ssh-client
[Normal][ns-jenkins/tests-14-zm889-hxd6p-j19bl][Started] Started container ssh-client
[Normal][ns-jenkins/tests-14-zm889-hxd6p-j19bl][Pulled] Container image "jenkins/inbound-agent:4.3-4" already present on machine
[Normal][ns-jenkins/tests-14-zm889-hxd6p-j19bl][Created] Created container jnlp
[Normal][ns-jenkins/tests-14-zm889-hxd6p-j19bl][Started] Started container jnlp
Created Pod: ns-jenkins/tests-14-zm889-hxd6p-23hwk
[Normal][ns-jenkins/tests-14-zm889-hxd6p-23hwk][Scheduled] Successfully assigned ns-jenkins/tests-14-zm889-hxd6p-23hwk to docker-desktop
[Normal][ns-jenkins/tests-14-zm889-hxd6p-23hwk][Pulled] Container image "kroniak/ssh-client:3.6" already present on machine
[Normal][ns-jenkins/tests-14-zm889-hxd6p-23hwk][Created] Created container ssh-client
[Normal][ns-jenkins/tests-14-zm889-hxd6p-23hwk][Started] Started container ssh-client
[Normal][ns-jenkins/tests-14-zm889-hxd6p-23hwk][Pulled] Container image "jenkins/inbound-agent:4.3-4" already present on machine
[Normal][ns-jenkins/tests-14-zm889-hxd6p-23hwk][Created] Created container jnlp
[Normal][ns-jenkins/tests-14-zm889-hxd6p-23hwk][Started] Started container jnlp
Created Pod: ns-jenkins/tests-14-zm889-hxd6p-wnxr9
[Normal][ns-jenkins/tests-14-zm889-hxd6p-wnxr9][Scheduled] Successfully assigned ns-jenkins/tests-14-zm889-hxd6p-wnxr9 to docker-desktop
[Normal][ns-jenkins/tests-14-zm889-hxd6p-wnxr9][Pulled] Container image "kroniak/ssh-client:3.6" already present on machine
[Normal][ns-jenkins/tests-14-zm889-hxd6p-wnxr9][Created] Created container ssh-client
[Normal][ns-jenkins/tests-14-zm889-hxd6p-wnxr9][Started] Started container ssh-client
[Normal][ns-jenkins/tests-14-zm889-hxd6p-wnxr9][Pulled] Container image "jenkins/inbound-agent:4.3-4" already present on machine
[Normal][ns-jenkins/tests-14-zm889-hxd6p-wnxr9][Created] Created container jnlp
[Normal][ns-jenkins/tests-14-zm889-hxd6p-wnxr9][Started] Started container jnlp