How to fix jenkins to get k8s pod failure when installation istio

4/28/2019

I have setup Kubernetes system, and added different node with namespace. has setup jenkins web service in pod mode.

k8s plugin version: 1.14.2

kubernetes version: 1.13.2

Jenkins can get kube pod from kuberneter api, but after install istio 1.1.3 , user guide: https://istio.io/zh/docs/setup/kubernetes/install/kubernetes/

and redeploying Jenkins service, found that Jenkins can't get any kube pod to deal with task

  1. disable kubernetes API service, can't work.
$ kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
 name: "api-server"
spec:
 host: "kubernetes.default.svc.cluster.local"
 trafficPolicy:
   tls:
     mode: DISABLE
EOF
  1. uninstalling Istio service, after Jenkins redeploy, works again.

Logs:

Apr 28, 2019 5:28:53 AM FINE org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud
Connected to Kubernetes kube-C1 URL http://crm-kube-master-espoo.dynamic.nsn-net.net:8080/
Apr 28, 2019 5:28:53 AM WARNING org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provision
Failed to count the # of live instances on Kubernetes
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: http://crm-kube-master-espoo.dynamic.nsn-net.net:8080/api/v1/namespaces/atf/pods?labelSelector=jenkins%3Dslave.
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:478)
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:417)
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:381)
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:344)
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:328)
    at io.fabric8.kubernetes.client.dsl.base.BaseOperation.listRequestHelper(BaseOperation.java:165)
    at io.fabric8.kubernetes.client.dsl.base.BaseOperation.list(BaseOperation.java:607)
    at io.fabric8.kubernetes.client.dsl.base.BaseOperation.list(BaseOperation.java:67)
    at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.addProvisionedSlave(KubernetesCloud.java:507)
    at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.provision(KubernetesCloud.java:460)
    at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:715)
    at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:320)
    at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:62)
    at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:809)
    at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:72)
    at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Apr 28, 2019 5:28:53 AM FINE org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud
In provisioning : []
Apr 28, 2019 5:28:53 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provision
Excess workload after pending Kubernetes agents: 26
Apr 28, 2019 5:28:53 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provision

I would to fix jenkins can't get kube pod when istio install

-- activeman
istio
jenkins
jenkins-plugins
kubernetes

0 Answers