<p>I was playing with k8s deployment - rolling update and it works really well. 
I am curious to know how to do deployment when we have a service dependency! Not sure If i am explaining my question correctly. It is just a very high level scenario! </p>

<p>Lets consider this example. I have deployed 2 apps with 10 replicas each, exposed as services. </p>

<pre><code>Service-A
  Deployment-A
    Pod-A - v1 - (10)

Service-B
  Deployment-B
    Pod-B - v1 - (10)
</code></pre>

<p>Service A depends on B. Now as part of v2 release both apps need to use v2. Service B api expects few additional parameters / slightly changed. When we upgrade both apps with newer version v2, if service-B becomes up and running before Service-A, some of the requests would be failing as Service-A is still in v1 (as the upgrade is in progress). How can we do the deployment without any failure here? if you are using k8s already, what is the best practice you would follow.</p>

<p>As shown in "<a href="https://medium.com/platformer-blog/enable-rolling-updates-in-kubernetes-with-zero-downtime-31d7ec388c81" rel="nofollow noreferrer">Enable Rolling updates in Kubernetes with Zero downtime</a>" from <a href="https://twitter.com/Nilesh_93" rel="nofollow noreferrer">Nilesh Jayanandana</a>, you could check if implementing a <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/" rel="nofollow noreferrer">readiness probe</a> would help service B to wait for service A being in V2.</p>

<p>Another approach would be through an Helm package, as in "<a href="https://docs.bitnami.com/kubernetes/how-to/deploy-application-kubernetes-helm/" rel="nofollow noreferrer">Deploy, Scale and Upgrade an Application on Kubernetes with Helm</a>", which can modelize the dependency, and then, through <code>helm update</code>, perform the rolling upgrade.</p>
