<p>We are planning to setup Highly Available Jenkins setup in container platform using kubernetes. We are looking at setting up one Active master and another master in standby mode.
Jenkins data volume is going to be stored in a global storage that is shared between the two master containers.</p>

<p>In case the active master is not available then requests should fail over to other master. And the slaves should be communicating only with active master.</p>

<p>How do we accomplish Jenkins HA setup in active/passive mode in kubernetes. please provide your suggestions.</p>

<p>We would like to achieve as shown in the diagram from below link</p>

<p><a href="https://endocode.com/img/blog/jenkins-ha-setup_concept.png" rel="nofollow noreferrer">https://endocode.com/img/blog/jenkins-ha-setup_concept.png</a></p>

<p>This contradicts with how one should IMHO run applications in Kubernetes. Active/passive is a concept for the past century.</p>

<p>Instead, configure a health check for the Jenkins Deployment. If that fails, Kubernetes will automatically kill the task and start a replacement (which will be available only a few seconds after detecting the active one being unhealthy).</p>
