| We use kubernetes plugin for running freestyle projects. We configured default pod template and labeled it, for example "k8s-runner". We configured a freestyle project and restricted to run this project in "k8s-runner". After start - the job wait up to 5 minutes if there is already running jobs on this label ("k8s-runner"). If there are no running jobs - job will start faster (1-2 minutes). But this is also very slow. I made an experiments and understood that the problem is not in kubernetes. I measured the time and get those results: 00:00 - I press on "Run job". I instantly see new build is created. And the status is "(pending—All nodes of label ‘cd-k8s-ansible’ are offline)" 03:24 - The build status changes to "(pending—-k8s-runner-job-t3f20 is offline)" 03:30 - The build is running. I kubernetes logs i see that in 03:23 the pod "k8s-runner-job-t3f20" creation started. My java experience is not so high, for debugging jenkins and kubernetes plugin. I cant find where is blocking place in the code. We use this plugin for half of year, and by my observation, the jobs are started very slow. We tried to change jenkins version, upgrade kubernetes plugin, play with configuration of plugin, try other kubernetes cluster. Nothing helped us. |