<p>We have a Web interface built using React (and nginx) and a Rest API (with json schema validation). They are in different repositories. Our cluster is a private openshift (3.11)</p>

<p>We would like to achieve a zero downtime deployment.
Let's assume that:</p>

<ol>
<li>we have 10 pods for the Web and 20 pods for the Rest API.</li>
<li>we want to upgrade WEB and API from 1.0.0 to 2.0.0</li>
<li>the new version of WEB supports only the new version of the API</li>
<li>each repo (WEB and API) has its own helm chart (if needed and it is recommended, we could create an additional repository containing a single helm chart that deploys both web and api)</li>
</ol>

<p>Which deployment strategy should we use? (blue/green, canary, a/b ?)</p>

<p>How can we configure the new WEB pods in order to hit the only new service of the API:</p>

<ul>
<li>WEB 1.0.0 --> API 1.0.0</li>
<li>WEB 2.0.0 --> API 2.0.0</li>
</ul>

<p>How can we perform the upgrade with zero downtime? </p>

<p>The very important thing is that, during the upgrade, the new version of the WEB should hit only the new version of the API, while the already deployed pods (1.0.0) should continue to hit the old version of the API.</p>

Fabry
<p>I have done the same, and within Kubernetes, you can achieve this. Let's follow the below approach.</p>

<p><a href="https://i.stack.imgur.com/LMcWN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LMcWN.png" alt="enter image description here"></a></p>

<p>If you look above, I am doing my deployment via helm, and all the K8s objects (Pods, SVC, ingress) are unique based on release names. By this, I can access my specific front-end release by adding a context after my domain like <code>https://app.com/1.0</code> or <code>https://app.com/2.0</code>. </p>

<p>The version which I want to expose to the internet, I am controlling it via Separate Ingress object (You can call super-ingress), which is independent of your releases and decide which version you want to keep live. By this, you can deploy N number of releases in production without any conflict, and by super-ingress, you can choose, which svc you want to point to the public. </p>
