<p>Maybe I am missing something but am I right in thinking that if I want to update a webapi that is hosted in my kubernetes cluster in Azure I have to delete and recreate it?</p>
<p>The instructions I am seeing online seem to show deleting the cluster rather than upgrading the api</p>
<p>Paul</p>

<p>If it's your web API application then it's only deployment image update, you don't need to delete the whole cluster.</p>
<hr />
<p>There is an example of <a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#updating-a-deployment" rel="nofollow noreferrer">updating a nginx deployment</a> with new image:</p>
<pre><code>kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1 --record
</code></pre>
<p>This way it will first create a new pods with newer version of image and once successfully deployed it will terminate old pods.</p>
<p>You can check status of the update by running</p>
<pre><code>kubectl rollout status deployment.v1.apps/nginx-deployment
</code></pre>
<hr />
<p>Additional resources:</p>
<ul>
<li><a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/#updating-resources" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/kubectl/cheatsheet/#updating-resources</a></li>
<li><a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/" rel="nofollow noreferrer">https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/</a></li>
<li><a href="https://www.bluematador.com/blog/kubernetes-deployments-rolling-update-configuration" rel="nofollow noreferrer">https://www.bluematador.com/blog/kubernetes-deployments-rolling-update-configuration</a></li>
</ul>
