Answers: <p>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).</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-10-06T21:55:13.703Z
Answers: 2019-10-06T21:55:13.703Z
Answers: envalentine
Body: <p>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.</p>
  
  <p>After searching from many blogs, I come up with these approaches:</p>
  
  <ol>
  <li>Setup Jenkins master in production and one Jenkins slave/agent in the testing environment.</li>
  <li>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.</li>
  </ol>
  
  <p>I like to know which approach is better.</p>
  
Comments: CC BY-SA 4.0
Comments: 2019-10-08T03:38:26.127Z
Comments: Have you considered using a single Kubernetes cluster and isolating workloads with affinity/taint?
Comments: casey vega
Tags: <jenkins><kubernetes><deployment>
Title: Kubernetes and Jenkins
UserDisplayName: Parth Wadhwa
ThreadText: # Kubernetes and Jenkins
  
  (Asked by: username_0 on 2019-10-06)
  
  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:
  
  1. Setup Jenkins master in production and one Jenkins slave/agent in the testing environment.
  2. 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.
  
  **Tags:** jenkins, kubernetes, deployment
  
  > **Comments:**
  > **username_1**: Have you considered using a single Kubernetes cluster and isolating workloads with affinity/taint?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-10-06. Score: 1
  
  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.
  
  
  ---
  
  