Resolution
The container step introduces an overhead because internally it is directly using the Kubernetes API to run commands
(while without it, only the remoting protocol is used).
Therefore, as the container step makes Kubernetes API call, it can be limited by the Max connections to Kubernetes API.
This value is set to 32 by default and you can increase it in the Cloud Configuration (under <jenkins_url>/manage/cloud).
To improve the performance of the container step, when using the Kubernetes Plugin version 4526.vdd5315b_e0d0d or later, consider enabling the Use active containers option in .
This routes metadata requests for sh steps inside the container step through the Remoting channel instead of making additional calls to the Kubernetes API.
|
This option is supported for Linux agents only. Windows agents continue to use the original WebSocket-based implementation even when the option is selected. |
Tested product/plugin versions
-
Jenkins 2.516.x with the Kubernetes plugin version 4526.vdd5315b_e0d0d.