Jenkins was stuck in 'There are no nodes with the label' for too long when creating the k8s agent node

Hi,

When I build the Jenkins pipeline job, sometimes the Jenkins log will show ‘There are no nodes with the label’ xxxx ', which will stick here for 4-5 minutes without any output, resulting in low efficiency. What is the reason for this?

My Jenkins version is 2.346.3,Kubernetes plugin version is 1.30.1,The Kubernetes cluster version is 1.19.16

Thx for advice

Hello @Iris and welcome to this community :wave:

Could this be linked to insufficient Kubernetes resources?
Ensure that your Kubernetes cluster has enough resources (CPU, memory, etc.) to accommodate the Jenkins agents.
If the cluster is overloaded or lacks available resources, Jenkins may struggle to provision nodes with the specified label, resulting in delays.
My $0.02 (I haven’t installed Jenkins through Kube yet).

Thank you for your answer!@poddingue My k8s cluster resources are sufficient. When “there are no nodes with the label” waiting for a long time, my k8s cluster did not create a Jenkins agent.When I wait for 4-5 minutes, the Jenkins agent will be created, and I don’t know what happened during this period.

1 Like

Hi @poddingue facing the same resource are sufficient but still getting the same error.

Same here. It’s a random stuff. Sometimes everything is OK while it will hung there for minutes even there is no agent running.