<p>I want to update the image for the k8s deployment and I found two RESTAPI in k8s to update the deployment: <code>PATCH</code> and <code>PUT</code>.
I found out, that the <code>PATCH</code> is for updating and the <code>PUT</code> is for replacing in the official document but after testing with the two command: </p>

<pre><code>kubectl patch -p ...
kubectl replace -f ...
</code></pre>

<p>it seems to has no differences between the two method.</p>

<p>Both of them can rollback and name of the new pod changed.</p>

<p>I wondered if it is only different in the request body for this two commands? (patch only need the changed part and put need the whole parts)</p>

<p>According to the documenation:</p>

<p><code>kubectl patch</code> </p>

<p>is to change the live configuration of a Deployment object. You do not change the configuration file that you originally used to create the Deployment object.</p>

<pre><code>kubectl replace  
</code></pre>

<p>If replacing an existing resource, the complete resource spec must be provided.</p>
