<p>Is there any way to do a rolling-update with a replication controller that has 2 or more containers?  </p>

<p>For example, I have Jenkins setup to automatically do a rolling update on a rep controller in our dev environment once a successful build takes place using the --image flag specifying the new container's image stored in GCR.  This method doesn't work when there are two containers in the same pod and there is no "-c" flag to specify the container you wish to update on the rolling-update command as there is on other commands such as "exec" or "logs".  </p>

<p>The reason I'm looking to have multiple pods is to implement a logging sidecar as in:
<a href="https://github.com/kubernetes/contrib/tree/master/logging/fluentd-sidecar-es" rel="nofollow">https://github.com/kubernetes/contrib/tree/master/logging/fluentd-sidecar-es</a>  </p>

<p>The only alternative I can think of is to bake the fluentd config into each container, which feels decidedly 'un-kubernetes' to me.  </p>

<p>You are right in saying that <code>kubectl rolling-update frontend --image=image:v2</code> does not give you a way to provide more details about a container when updating a pod that has more than one container. It gives you an error <code>Image update is not supported for multi-container pods</code></p>

<p>But, it certainly gives you 2 variants </p>

<ol>
<li><code>kubectl rolling-update frontend-v1 -f frontend-v2.json</code></li>
<li><code>cat frontend-v2.json | kubectl rolling-update frontend-v1 -f -</code> </li>
</ol>

<p>where v1 and v2 can be your build versions. This way, you would also have the advantage of your pod names adhering to your build versions too.</p>
