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.