Kubernetes and Jenkins I started building CI/CD pipeline using two Kubernetes clusters and one Jenkins. Two clusters are totally isolated as one is in the test environment and other in production.

After searching from many blogs, I come up with these approaches:


Setup Jenkins master in production and one Jenkins slave/agent in the testing environment.
Make Kubernetes api-server of test environment accessible in production environment with proper firewall whitelisting and setup jenkins in production to deploy in both environments.


I like to know which approach is better.
For the best practices will be great to install Jenkins master on the lower Environments (best Dev env) and to leave Production in peace with only necessary things (with your end-user application and their dependencies).

The reason why is because production means production and if something will happen with Jenkins or if you will allow a lot of people accessing Jenkins in production you increase your failure rate.

Will be better to install Jenkins separated from production and to do VPC Peering between clusters and after you can create a fully CI/CD pipeline where you can create a Jenkins slave/agent which will deploy your application to PROD.

PROD suppose to be more focused to an end Product result.
You didn't specify which cloud provider do you use so, I can't help too much...
Hope this will clarify your vision.