GoogleCloudPlatform / continuous-deployment-on-kubernetes

Get up and running with Jenkins on Google Kubernetes Engine
Apache License 2.0
1.6k stars 890 forks source link

jenkins-slave is offline #111

Closed nickleefly closed 6 years ago

nickleefly commented 6 years ago

jenkins-slave is offline (suspend) from jenkins webpage.

My environment: I have jenkins running on a debian server, created a k8s cluster in gcp. installed kubernetes-plugin, configed k8s in jenkins cloud section,(using admin/k8s password.),

Then created a test pipeline job using the following script

podTemplate(label: 'pod-golang', 
    containers: [
        containerTemplate(
            name: 'golang',
            image: 'golang',
            ttyEnabled: true,
            command: 'cat'
        )
    ]
) {
    node ('pod-golang') {

        stage 'Switch to Utility Container'
        container('golang') {

          sh ("go version")

        }
    }
}

from kubectl get pods I can see the pod is created, but on jenkins webpage, jenkins-slave is alwasy showing offline Any ideas

Thanks

qinqin-wang commented 6 years ago

Hello nickleefly, Have you resolved this issue? My Jenkins pipeline showing: Still waiting to schedule task jenkins-slave-5n7nd-0jj7b is offline.
The pod is always restarting like below: kubectl get -a pods --watch NAME READY STATUS RESTARTS AGE jenkins-slave-gljw5-3r8s3 0/1 Pending 0 0s jenkins-slave-gljw5-3r8s3 0/1 Pending 0 1s jenkins-slave-gljw5-3r8s3 0/1 ContainerCreating 0 1s jenkins-slave-gljw5-3r8s3 1/1 Running 0 2s jenkins-slave-gljw5-3r8s3 0/1 Error 0 1m jenkins-slave-gljw5-3r8s3 0/1 Terminating 0 1m jenkins-slave-gljw5-3r8s3 0/1 Terminating 0 1m jenkins-slave-gljw5-thkrp 0/1 Pending 0 0s jenkins-slave-gljw5-thkrp 0/1 Pending 0 1s jenkins-slave-gljw5-thkrp 0/1 ContainerCreating 0 1s jenkins-slave-gljw5-thkrp 1/1 Running 0 3s

Do you have any idea? Thanks in advance.

altitdb commented 5 years ago

@later123 I have the same problem. Do you fix it?

andrimuhyidin commented 4 years ago

Same problem with me... any idea?

ksanchez15 commented 4 years ago

Having this issue here. running kubectl get pods returns the the state of the pod is 'pending' @nickleefly @altitdb @andrimuhyidin did any of you guys found a solution?