我有一个kubernetes集群(托管在大学中,而不是在gcloud中),并且我试图将Jenkins与jenksci / kubernetes插件一起使用来启动从属服务器。但是,无论我做什么,他们似乎都无法向大师注册。(k8s 1.2,jenkins 2.19.2,kub-plugin 0.9)
这是我使用的配置:
如果我设置tty:true,容器将启动,但永远无法连接到主服务器。日志不可读,我无法连接到从站以检查正在发生的情况:
$ kubectl logs jnpl-slave-ec16b9ae7bbd --namespace=jenkins
Error from server: Unrecognized input header
$ kubectl attach -ti jnpl-slave-ec16b9ae7bbd --namespace=jenkins
error: pod jnpl-slave-ec16b9ae7bbd is not running and cannot be attached to; current phase is Succeeded
Run Code Online (Sandbox Code Playgroud)如果我设置tty:false,那么容器将启动并正确执行入口点/ usr / local / bin / jenkins-slave,但是似乎未传递secret和slaveName命令行arg,因为该进程死于询问它们:
$ kubectl logs jnpl-slave-ecfd3a6cbaba --namespace=jenkins
Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior
two arguments required, but got []
...
Run Code Online (Sandbox Code Playgroud)如果我手动将参数(种子和从属名称)设置为假值,它将正确启动,但随后因抱怨/ home / jenkins不可写而死:
Warning: JnlpProtocol3 is …Run Code Online (Sandbox Code Playgroud)