The Stack Overflow podcast is back! Listen to an interview with our new CEO.
3 of 3 Copy edited (e.g. ref. <https://en.wikipedia.org/wiki/DevOps>, <https://en.wikipedia.org/wiki/Docker_%28software%29>, <https://en.wikipedia.org/wiki/Jenkins_%28software%29>, <https://en.wikipedia.org/wiki/Kubernetes>, and <https://en.wikipedia.org/wiki/Ansible_(software)>).

Change variable inside of project. Jenkins, docker, kubernetes

Because I am new in the DevOps, I don't know where I need to apply the changes to correctly run the project.

The structure:

Git → Jenkins → Docker build -> Kubernetes (deploy)

Is it better to make the change of variables in the project, (example: password, database connection, etc.) to Jenkins, Kubernetes, or Docker?

Example:

With docker-compose I use an environment variable to change the variable inside my code.

environment:
  MONGO_INITDB_ROOT_USERNAME: user
  MONGO_INITDB_ROOT_PASSWORD: user

I want to change this variable and run correctly in the production environment.

I don't know where it is the best to change the variable, Jenkins, Kubernetes with Ansible, etc.