![Jenkins Kubernetes 插件:待处理标签的所有节点均处于离线状态](https://linux22.com/image/695430/Jenkins%20Kubernetes%20%E6%8F%92%E4%BB%B6%EF%BC%9A%E5%BE%85%E5%A4%84%E7%90%86%E6%A0%87%E7%AD%BE%E7%9A%84%E6%89%80%E6%9C%89%E8%8A%82%E7%82%B9%E5%9D%87%E5%A4%84%E4%BA%8E%E7%A6%BB%E7%BA%BF%E7%8A%B6%E6%80%81.png)
答案1
事实证明这是 jenkins kubernetes 插件错误。Kubernetes v1.5.1 在使用该插件时存在此问题:https://issues.jenkins-ci.org/browse/JENKINS-40503。
查看詹金斯日志给了我一个提示:
java.lang.NullPointerException
at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.addProvisionedSlave(KubernetesCloud.java:592)
at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.provision(KubernetesCloud.java:463)
at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:701)
at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:307)
at hudson.slaves.NodeProvisioner.access$000(NodeProvisioner.java:60)
at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:798)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:50)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)