Hi Carlos,

could you provide more insight? Thanks very much.

Some update, I 
followed 
https://stackoverflow.com/questions/47870961/jenkins-kubernetes-plugin-not-working,
 
I need to disable https certificate check.

then the test connection is successful.

Then I created a test pipeline job using this 
one 
https://github.com/jenkinsci/kubernetes-plugin/blob/master/examples/multi-container.groovy

When I build the job, following the Debug section
I get the following result.

$ kubectl get -a pods --watch
NAME                        READY     STATUS        RESTARTS   AGE
jenkins-slave-qcc2v-f1g3w   0/3       Terminating   0          1m
jenkins-slave-zjqw0-ksd42   2/3       Terminating   0          59s
jenkins-slave-zjqw0-qr87f   0/3       Pending   0         0s
jenkins-slave-zjqw0-qr87f   0/3       Pending   0         0s
jenkins-slave-zjqw0-qr87f   0/3       ContainerCreating   0         0s
jenkins-slave-zjqw0-qr87f   3/3       Running   0         2s
jenkins-slave-qcc2v-f1g3w   0/3       Terminating   0         1m
jenkins-slave-qcc2v-f1g3w   0/3       Terminating   0         1m
jenkins-slave-zjqw0-qr87f   2/3       Error     0         4s
jenkins-slave-zjqw0-qr87f   2/3       Terminating   0         6s
jenkins-slave-zjqw0-ksd42   0/3       Terminating   0         1m
jenkins-slave-zjqw0-r5svf   0/3       Pending   0         0s
jenkins-slave-zjqw0-r5svf   0/3       Pending   0         0s
jenkins-slave-zjqw0-r5svf   0/3       ContainerCreating   0         0s
jenkins-slave-zjqw0-r5svf   3/3       Running   0         2s
jenkins-slave-zjqw0-r5svf   2/3       Error     0         4s
jenkins-slave-zjqw0-r5svf   2/3       Terminating   0         6s

in jenkins job, console output, I see

[image: In progress]Console Output

Started by user admin <https://35.231.45.198/user/admin>
Running in Durability level: MAX_SURVIVABILITY[Pipeline] podTemplate[Pipeline] 
{[Pipeline] node

Still waiting to schedule task
jenkins-slave-zjqw0-ksd42 is offline



On Tuesday, February 13, 2018 at 11:45:04 AM UTC+8, Nick Li wrote:
>
> Hi Carlos,
>
> How do I debug the connection issue? I was able to connect to k8s cluster 
> using the "Test Connection" Button. But now it just doesn't work.
>
>
> On Friday, February 9, 2018 at 11:20:00 PM UTC+8, Carlos Sanchez wrote:
>>
>> that means jenkins can't talk to my-kubernetes-cluster-ip and it 
>> wouldn't possibly launch a pod
>>
>> On Fri, Feb 9, 2018 at 11:17 AM, Nick Li <nickl...@gmail.com> wrote:
>>
>>> Hi Carlos,
>>>
>>> In my jenkins kubernetes cloud config section. I have a connection error 
>>> now.
>>> I confirmed the admin/k8s-password.
>>>
>>> Error testing connection http://my-kubernetes-cluster-ip: 
>>> java.net.SocketTimeoutException: 
>>> connect timed out
>>>
>>> Thanks
>>>
>>> On Friday, February 9, 2018 at 5:04:38 PM UTC+8, Carlos Sanchez wrote:
>>>>
>>>> you can check the steps in 
>>>> https://github.com/jenkinsci/kubernetes-plugin/#debugging to debug
>>>>
>>>> On Fri, Feb 9, 2018 at 7:09 AM, Nick Li <nickl...@gmail.com> wrote:
>>>>
>>>>> 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
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to jenkinsci-use...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/jenkinsci-users/b2350dfa-07fd-4935-9d49-42c5d9d35d5f%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/b2350dfa-07fd-4935-9d49-42c5d9d35d5f%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to jenkinsci-use...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/jenkinsci-users/60b1659d-68fd-4385-ab2f-c32f3d2a71d8%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/jenkinsci-users/60b1659d-68fd-4385-ab2f-c32f3d2a71d8%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8b50c86a-8a5f-4b68-9332-a2314b3e427d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to