<p>What I understood by the documentation is that:</p>
<ul>
<li>
<pre class="lang-sh prettyprint-override"><code>kubectl create
</code></pre>
Creates a new k8s resource in the cluster</li>
<li>
<pre class="lang-sh prettyprint-override"><code>kubectl replace
</code></pre>
Updates a resource in the live cluster</li>
<li>
<pre class="lang-sh prettyprint-override"><code>kubectl apply
</code></pre>
If I want to do create + replace (<em><a href="https://kubernetes.io/docs/user-guide/kubectl-overview/" rel="noreferrer">Reference</a></em>)</li>
</ul>
<p><strong>My questions are</strong></p>
<ol>
<li>Why are there three operations for doing the same task in a cluster?</li>
<li>What are the use cases for these operations?</li>
<li>How do they differ from each other under the hood?</li>
</ol>

<p>Those are two different approaches:</p>
<h3>Imperative Management</h3>
<p><code>kubectl create</code> is what we call <a href="https://kubernetes.io/docs/tutorials/object-management-kubectl/imperative-object-management-configuration/" rel="noreferrer">Imperative Management</a>. On this approach you tell the Kubernetes API what you want to create, replace or delete, not how you want your K8s cluster world to look like.</p>
<h3>Declarative Management</h3>
<p><code>kubectl apply</code> is part of the <a href="https://kubernetes.io/docs/tutorials/object-management-kubectl/declarative-object-management-configuration/" rel="noreferrer">Declarative Management</a> approach, where changes that you may have applied to a live object (i.e. through <code>scale</code>) are &quot;<strong>maintained</strong>&quot; even if you <code>apply</code> other changes to the object.</p>
<blockquote>
<p>You can read more about imperative and declarative management in the <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/object-management/" rel="noreferrer">Kubernetes Object Management</a> documentation.</p>
</blockquote>
<h3>In laymans They do different things. If the resource exists, <code>kubectl create</code> will error out and <code>kubectl apply</code> will not error out.</h3>
