7

KubeSphere运行流水线一直“即将完成初始化”问题解决

 2 years ago
source link: https://blog.51cto.com/u_12760547/5635357
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

KubeSphere运行流水线一直“即将完成初始化”问题解决

精选 原创

云烟旧梦 2022-08-31 09:03:12 博主文章分类:Kubernetes ©著作权

文章标签 maven 初始化 文章分类 kubernetes 云计算 阅读数363

使用KubeSphere创建流水线发现:

KubeSphere运行流水线一直“即将完成初始化”问题解决_maven

一直是“即将完成初始化”,大约等待了一个小时,还是这个状态“即将完成初始化”。感觉到了事情不对。

好,那就看一下jenkins日志。

KubeSphere运行流水线一直“即将完成初始化”问题解决_maven_02

日志内容如下:

KubeSphere运行流水线一直“即将完成初始化”问题解决_初始化_03

这里把日志内容取出来看下:

2022-07-08 06:17:45.511+0000 [id=29] INFO o.c.j.p.k.KubernetesCloud#mayAddProvisionedSlave: Maximum number of concurrently running agent pods (2) reached for Kubernetes Cloud kubernetes, not provisioning: 2 running or pending in namespace kubesphere-devops-worker with Kubernetes labels {jenkins=slave}

 2022-07-08 06:17:50.483+0000 [id=31] INFO o.c.j.p.k.KubernetesCloud#provision: Excess workload after pending Kubernetes agents: 1

 2022-07-08 06:17:50.484+0000 [id=31] INFO o.c.j.p.k.KubernetesCloud#provision: Template for label maven: maven

上面的意思大概为:

最大并发运行数量为2,已经达到了并发运行的最大数量。有2个流水线正在运行或挂起,这两个正在运行或挂起的流水线都有{jenkins=slave}这个标签。

待处理额外的工作量为1。

通过上面的分析,可以得出,之前创建有流水线,最大支持并发流水线为2,有2个挂起或正在运行。由于我没有正在运行的流水线,所以进入到k8s底层看下:

KubeSphere运行流水线一直“即将完成初始化”问题解决_maven_04

罪魁祸首,已经找到。因为这两个流水线报错了,所以一直卡在这里,让整个工作线无法正常工作。所以我们只需要干死这两个容器就可以解决这个问题了。

强制杀死这俩容器:

[root@k8s-master01 ~]# kubectl delete pod maven-hz85t -n kubesphere-devops-worker --force --grace-period=0

[root@k8s-master01 ~]# kubectl delete pod maven-v5zpn -n kubesphere-devops-worker --force --grace-period=0

好,问题解决,流水线正常执行:

KubeSphere运行流水线一直“即将完成初始化”问题解决_初始化_05
  • 打赏
  • 1
  • 1收藏
  • 评论
  • 分享
  • 举报

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK