<p>I'm using Google Container Engine with a cluster using <em>Kubernetes 0.20.2</em>.</p>

<p>In this cluster, I have <em>1 replication controller (2 replicas)</em> and <em>1 service</em> with a spec type defined to <strong><em>LoadBalancer</em></strong> (basic setup).</p>

<p>Everything is working fine here;
Then I want to roll update to a different image using the <em>kubectl</em> command:</p>

<pre><code>kubectl rolling-update my-rc \
  --image=gcr.io/project/gcloudId:my-image-updated \
  --update-period=0m
</code></pre>

<p>About what I understood, running this command should take care of having a zero-downtime. Unfortunately, I have been doing some test using the curl command in a loop, and I still have a downtime of a few seconds.
Any ideas why this is happening?</p>

<p>The <code>--update-period</code> flag tells Kubernetes how long to wait between each pod that it's rolling an update to. With the update period set to 0, Kubernetes will update all pods at once, causing a short period of unavailability while the new pods start up. You should set <code>--update-period</code> to be at least as long as it takes each of your pods to initialize. The default value (1 minute) should be fine for almost all cases if you don't want to have to think about it.</p>
