<p>I'm using default deployment strategy for my load-balancer service in kubernetes, and when I describe my deployment the strategy looks like follows: </p>

<pre><code>Replicas:               2 desired | 2 updated | 2 total | 2 available | 0 unavailable
StrategyType:           RollingUpdate
</code></pre>

<p>MinReadySeconds:        0
RollingUpdateStrategy:  1 max unavailable, 1 max surge</p>

<p>So according to the description, there should not be any downtime. However, there's still a downtime in the service. 
How can I make sure there's zero downtime?</p>

Khadar111
<p>From what I can see you are using the <code>as fast as possible</code> approach of <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/" rel="nofollow noreferrer"><code>Rolling Updates</code></a>.</p>

<p>While this is a good approach it's better to use <code>Replicas: 3</code>, because you might end up with 2 <code>pods</code> down during update.</p>

<p>You should implement <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes" rel="nofollow noreferrer"><code>ReadinessProbe</code></a> that might look like the following:</p>

<pre><code>readinessProbe:  
  httpGet:  
     path: /  
     port: 8080  
     initialDelaySeconds: 5  
     periodSeconds: 5  
     successThreshold: 1
</code></pre>

<ul>
<li><code>initialDelaySeconds</code>: Number of seconds after the container has started before readiness probes are initiated.</li>
<li><code>periodSeconds</code>: How often to perform the probe. Default to 10 seconds.</li>
<li><code>successThreshold</code>: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1.</li>
</ul>

<p>I also recommend reading <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>, as they nicely explains the use of Rolling updates.</p>
