"Sidecar" containers in Kubernetes pods
<p>I'd like a multi-container pod with a couple of components:</p>

<ul>
<li>A "main" container which contains a build job</li>
<li>A "sidecar" container which contains an HTTP proxy, used by the "main" container</li>
</ul>

<p>This seems to fit well with the pod design philosophy as <a href="http://kubernetes.io/docs/user-guide/pods/#uses-of-pods" rel="noreferrer">described in the Kubernetes documentation</a>, but I believe so long as the "sidecar" runs, the pod is kept alive. In my case, the "main" container is not long-lived; once it exits, the "sidecar" should be terminated.</p>

<p>How can I achieve this?</p>