<p>I'm trying to implement a functionality similar to <code>kubectl apply</code> using Kazan, a kubernetes client in Elixir, and trying to understand how to perform a rolling update, in specifically the function <code>replace_namespaced_deployment</code>.</p>

<p>Having REST as background, where CRUD are the verbs to manipulate resources, Kubernetes' 'replace' sounds to me like an <code>UPDATE</code>, so I try to understand:</p>

<ul>
<li>Why replace and not update</li>
<li>Is replace equivalent to update or not?</li>
</ul>

Alex.U
<p>Short answer: yes</p>

<p>Long answer: There is no "update" command in Kubernetes. If you want to edit any parameters of a resource, you can edit the yaml file, then run:</p>

<pre><code>kubectl replace -f FILE
</code></pre>

<p>Note that some resources will throw an error saying it is not possible t modify. In that case you will need to delete the resource and create it again.</p>
