離線v4.1.2+k8s 1.28.0
我想使用自己的image來當作agent,發現一直會有一個jnlp起來,在jenkins-casc-config中他的image位置都正確,
在Pipeline被叫起來的卻是另一個位置導致pod一直起不來,
請問如何改善才可以不用每次都進去Pod改?
pipeline {
agent {
kubernetes {
label 'agent'
defaultContainer 'agent'
yaml '''apiVersion: v1
kind: Pod
spec:
containers:
- name: agent
image: harbor.me.com/library/agent:tag'''
}
}
stages {
stage('stage-a08zf') {
agent none
steps {
echo 'hahahahahahahahaha'
}
}
}
}
log
Started by user admin
[Pipeline] Start of Pipeline
[Pipeline] echo
[WARNING] label option is deprecated. To use a static pod template, use the 'inheritFrom' option.
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Created Pod: kubernetes kubesphere-devops-worker/agent-0t2dv-d1mhz
[Normal][kubesphere-devops-worker/agent-0t2dv-d1mhz][Scheduled] Successfully assigned kubesphere-devops-worker/agent-0t2dv-d1mhz to kubesphere-poc-ms
[Normal][kubesphere-devops-worker/agent-0t2dv-d1mhz][Pulled] Container image "ficms-ms-cns.myfiinet.com/library/fiica:1604_230324" already present on machine
[Normal][kubesphere-devops-worker/agent-0t2dv-d1mhz][Created] Created container agent
[Normal][kubesphere-devops-worker/agent-0t2dv-d1mhz][Started] Started container agent
[Normal][kubesphere-devops-worker/agent-0t2dv-d1mhz][Pulling] Pulling image "jenkins/inbound-agent:4.11-1-jdk11"
Still waiting to schedule task
‘agent-0t2dv-d1mhz’ is offline
[Warning][kubesphere-devops-worker/agent-0t2dv-d1mhz][Failed] Failed to pull image "jenkins/inbound-agent:4.11-1-jdk11": failed to pull and unpack image "docker.io/jenkins/inbound-agent:4.11-1-jdk11": failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/45/453442cf4ff309ab88a55b2e14cacc9137f34f9ef4adb377cff052d8897b4319/data?expires=1742290315&signature=R8F6M43497pfVK7WQpbQxYedSuM%3D&version=2": net/http: TLS handshake timeout
[Warning][kubesphere-devops-worker/agent-0t2dv-d1mhz][Failed] Error: ErrImagePull
[Normal][kubesphere-devops-worker/agent-0t2dv-d1mhz][BackOff] Back-off pulling image "jenkins/inbound-agent:4.11-1-jdk11"
[Warning][kubesphere-devops-worker/agent-0t2dv-d1mhz][Failed] Error: ImagePullBackOff
kubesphere-devops-worker/agent-0t2dv-d1mhz Container agent was terminated (Exit Code: 1, Reason: Error)
Created Pod: kubernetes kubesphere-devops-worker/agent-0t2dv-z1x3x
[Normal][kubesphere-devops-worker/agent-0t2dv-z1x3x][Scheduled] Successfully assigned kubesphere-devops-worker/agent-0t2dv-z1x3x to kubesphere-poc-ms
[Normal][kubesphere-devops-worker/agent-0t2dv-z1x3x][Pulled] Container image "ficms-ms-cns.myfiinet.com/library/fiica:1604_230324" already present on machine
[Normal][kubesphere-devops-worker/agent-0t2dv-z1x3x][Created] Created container agent
[Normal][kubesphere-devops-worker/agent-0t2dv-z1x3x][Started] Started container agent
[Normal][kubesphere-devops-worker/agent-0t2dv-z1x3x][Pulling] Pulling image "jenkins/inbound-agent:4.11-1-jdk11"
Aborted by admin
[Pipeline] // node
[Pipeline] }
[Pipeline] // podTemplate
[Pipeline] End of Pipeline
Finished: ABORTED