<p>I have a deployment created with a YAML file, the image for the containers is <code>image:v1</code>.</p>

<p>Now I update the file to <code>image:v2</code>, and do <code>kubectl apply -f newDeploymentFile.yml</code>.  Does Kubernetes use rolling update behind the scenes to update my deployment or some other way?</p>

<p>What happens exactly is controlled by the <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment" rel="nofollow noreferrer"><code>Deployment</code></a> itself:</p>

<ul>
<li><a href="https://kubernetes.io/docs/api-reference/v1.7/#deploymentstrategy-v1beta1-apps" rel="nofollow noreferrer"><code>.spec.stategy</code></a>: <code>RollingUpdate</code> (default) or <code>Recreate</code></li>
<li><a href="https://kubernetes.io/docs/api-reference/v1.7/#rollingupdatedeployment-v1beta1-apps" rel="nofollow noreferrer"><code>.spec.strategy.rollingUpdate</code></a>: see the docs I've linked for the explanation of the <code>maxSurge</code> and <code>maxUnavailable</code></li>
</ul>

<p>(I assumed that by <em>deployment</em> you actually mean a <code>Deployment</code> type object and not speaking in general.)</p>
