创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。
发帖前请点击 发表主题 右边的 预览(👀) 按钮,确保帖子格式正确。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
Ubuntu18.04
Kubernetes版本信息
v18.8 多节点。
容器运行时
例如,使用 containerd 1.3.9
KubeSphere版本信息
v3.0.0 离线安装
问题是什么
k8s集群证书过期,参考链接:https://www.jianshu.com/p/3e9e59e738be,对集群证书进行更新。
启动流水线发布业务,发现发布用的容器一直在pending,jenkins的报错日志如下:
2022-02-28 13:26:49.777+0000 [id=1753926] INFO o.c.j.p.k.KubernetesSlave#_terminate: Terminating Kubernetes instance for agent general-pdvpv
Terminated Kubernetes instance for agent kubesphere-devops-system/general-pdvpv
2022-02-28 13:26:49.794+0000 [id=1753926] INFO o.c.j.p.k.KubernetesSlave#deleteSlavePod: Terminated Kubernetes instance for agent kubesphere-devops-system/general-pdvpv
2022-02-28 13:26:49.794+0000 [id=1753926] INFO o.c.j.p.k.KubernetesSlave#_terminate: Disconnected computer general-pdvpv
Disconnected computer general-pdvpv
2022-02-28 13:26:53.652+0000 [id=29] INFO o.c.j.p.k.KubernetesCloud#provision: Excess workload after pending Kubernetes agents: 1
2022-02-28 13:26:53.653+0000 [id=29] INFO o.c.j.p.k.KubernetesCloud#provision: Template for label general: general
2022-02-28 13:26:54.678+0000 [id=1753926] INFO hudson.slaves.NodeProvisioner#lambda$update$6: general-nrkqd provisioning successfully completed. We have now 2 computer(s)
2022-02-28 13:26:54.696+0000 [id=1753945] INFO o.c.j.p.k.KubernetesLauncher#launch: Created Pod: kubesphere-devops-system/general-nrkqd
2022-02-28 13:26:54.750+0000 [id=1753914] INFO o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2022-02-28 13:26:54.801+0000 [id=1753945] INFO o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2022-02-28 13:28:34.761+0000 [id=1753945] WARNING o.c.j.p.k.KubernetesLauncher#launch: Error in provisioning; agent=KubernetesSlave name: general-nrkqd, template=PodTemplate{id='6f05f711-cb87-48df-b0a3-16637289c005', name='general', namespace='kubesphere-devops-system', label='general', nodeUsageMode=EXCLUSIVE, workspaceVolume=EmptyDirWorkspaceVolume [memory=false], volumes=[HostPathVolume [mountPath=/var/lib/containers, hostPath=/var/lib/containers], HostPathVolume [mountPath=/root/.m2, hostPath=/root/.m2], HostPathVolume [mountPath=/root/.sonar/cache, hostPath=/root/.sonar/cache]], containers=[ContainerTemplate{name='general', image='reg.qtaichi.com/tool/kubesphere-sonnar-scanner:v1', privileged=true, command='cat', args='', ttyEnabled=true, resourceRequestCpu='100m', resourceRequestMemory='100Mi', resourceLimitCpu='4000m', resourceLimitMemory='8192Mi'}, ContainerTemplate{name='jnlp', image='jenkins/jnlp-slave:3.27-1', command='jenkins-slave', args='${computer.jnlpmac} ${computer.name}', resourceRequestCpu='50m', resourceRequestMemory='400Mi', resourceLimitMemory='1536Mi'}]}
io.fabric8.kubernetes.client.KubernetesClientTimeoutException: Timed out waiting for [100000] milliseconds for [Pod] with name:[general-nrkqd] in namespace [kubesphere-devops-system].
at org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcher.await(AllContainersRunningPodWatcher.java:97)
at org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher.launch(KubernetesLauncher.java:156)
at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:294)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
2022-02-28 13:28:34.762+0000 [id=1753945] INFO o.c.j.p.k.KubernetesSlave#_terminate: Terminating Kubernetes instance for agent general-nrkqd