<p><strong>kubernetes</strong> <em>version</em>:<code>1.10.4</code></p>

<p>In my project,I have an <code>initContainer</code> image and an common container image,I want to update the <code>initContainer</code>'s image with zero down time.</p>

<p>But the <code>kubectl set image xxx</code> command cannot work on <code>initContainer</code>.</p>

<p>I have read the document about rolling update containers' image, but not found the information about <code>initContainer</code> image.</p>

<p>Who has encountered this situation?</p>

<p>If you want to do manual change I'd start with </p>

<pre><code>kubectl edit deployment xxx
</code></pre>

<p>for non-interactive operations it's probably easiest to use <code>kubectl patch</code> like </p>

<pre><code>kubectl patch deployment/xxx -p '{"spec": {"template": {"spec": {"initContainers":[{"name":"cinit", "image":"alpine:3.6"}]}}}}'
</code></pre>
