This question is not in case of kubernetes but when you use servers or docker for deployment using CICD tool like Jenkins or gitlab. In jenkins or gitlab I've agents/runners and in pipeline stages I've a deploy stage. Now, where should this deployment ideally happen? On the agent? or or some other server (through ssh)?

1 Answer 1


Your question is a little bit confusing and led to some interpretations.

First, for Jenkins, you should always run your pipelines using Jenkins agents, it is a good practice.

The deploy stage is to - well, as the name -- deploy to somewhere. The way you are going to deploy totally depends on what you are deploying and where, you can use an API, a CLI, SSH, or even an SFTP. You can also store your artifact in a artifact server (Nexus, Docker Hub, Artifactory) and then tell your server to pull the image from there.

Wrapping up: In the deploy stage, put the code to deploy the artifact (.exe, .war, .zip...) anywhere you want. The deploy stage will run inside an agent/runner, this runner will connect to the destination system through CLI, API... to deploy the artifact.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.