<p>I use <code>kubectl rollout restart deployment mydeployment-container</code> as an ad-hoc way to spin up a new container without starting a whole pod over again.</p>
<p>Another behavior I like about this command is that it brings up the new container and gracefully switches once the readiness probe passes before terminating the old container.</p>
<p>Except when using Persistent Volumes Claims:</p>
<p>When I try to to use the same command my new container stays in ContainerCreating with a <code>Multi-Attach error</code> It seems as though the persistent volume claim is effectively blocking the creation of a new container, destined to use said persistent volume claim!</p>
<p>Yes, they are configured for <code>ReadWriteOnce</code> for internal policy reasons, but no, I can't change that.</p>
<p>I come here because I'm hoping learn a new workflow that will come close to the one I currently use.</p>

qwerty10110
<p>What is your <code>strategy</code>, id you replace <code>RollingUpdate</code> with <code>Recreate</code>, kubernetes will destroy the original pod before starting the successor, thus detaching the volume before it is mounted again.</p>
<pre><code>strategy:
    type: Recreate
</code></pre>
