<p>I have created an application by using azure's kubernates service.
In my yaml I specified "latest" as image version for every image I'm using.</p>

<p>Is there any option to make so that, when I update the image registry so that "latest" changes, kubernates auto-deploys that? And everything is managed so that it only updates one replica and then scales so that service is not interrupted during deploy? </p>

Phate
<blockquote>
  <p>Is there any option to make so that, when I update the image registry so that "latest" changes, kubernates auto-deploys that?</p>
</blockquote>

<p>It's not kubernetes's work to handle this. There are two steep to work on this:</p>

<ul>
<li><p>Add webhook on docker registry, for docker-hub, it is <a href="https://docs.docker.com/docker-hub/webhooks/" rel="nofollow noreferrer">Docker Hub Webhooks</a>. When new image has been pushed to registry, you can send a <code>POST</code> request to somewhere as notification.</p></li>
<li><p>Deploy a CI/CD to receive that notification and roll update your application. Or just create a simple HTTP Server to handle notification request and do something like <code>kubectl ...</code>.</p></li>
</ul>

<blockquote>
  <p>And everything is managed so that it only updates one replica and then scales so that service is not interrupted during deploy?</p>
</blockquote>

<p>Kubernetes handle this by <a href="https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/" rel="nofollow noreferrer">rolling update</a>. For <code>Deployment</code> or <code>StatefulSet</code>, current kubernetes auto update pods by rolling update, all you need to do is <code>kubectl apply -f new-spec.yaml</code>.</p>
