我有一个kubernetes集群(在大学,而不是在gcloud托管),我试图用jenksci/kubernetes插件詹金斯发射奴隶。但是,无论我做什么,他们似乎都无法向主人注册。 (K8S 1.2,詹金斯2.19.2,KUB-插件0.9)kubernetes奴隶无法注册詹金斯大师
这是我的配置使用:
如果我设置TTY:真正的容器启动,但永远不能连接到主人。日志是不可读的,我可以不重视从检查所发生的事情:
$ 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
如果我设置TTY:假的容器启动和执行正确的入口点在/ usr/local/bin目录/詹金斯,奴隶,但似乎秘密和slaveName命令行参数都没有通过,因为进程死亡,要求他们:
$ 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 [] ...
如果我手动设置参数(种子和从属名称),以假值,它开始正确,但后来抱怨/ home/jenkins不可写:
Warning: JnlpProtocol3 is disabled by default, use JNLP_PROTOCOL_OPTS to alter the behavior hudson.remoting.jnlp.Main createEngine Setting up slave: http://10.254.151.87 hudson.remoting.jnlp.Main$CuiListener <init> INFO: Jenkins agent is running in headless mode. Exception in thread "main" java.lang.RuntimeException: Root directory not writable ...
但是,如果我在网页上设置其手动创建一个奴隶,它的工作原理,我可以看到从在线:
node$ sudo docker run -ti docker.io/jenkinsci/jnlp-slave:latest /bin/bash pod$ java -jar /usr/share/jenkins/slave.jar -jnlpUrl http://10.254.151.87/computer/slave1/slave-agent.jnlp ... INFO: Connected
所以...我不知道要进一步测试什么。如果有人能给我一个提示,我会很感激!
与问候,
马里奥
那么,和你怎么收场把这些参数呢?我有一个类似的问题,仍然不能真正理解为什么它不工作http://stackoverflow.com/questions/41253094/kubernetes-plugin-containers-cant-connect-back-to-jenkins – user3081519