<p>When you edit a deployment to update the docker image, I need to run a one-time script which changes parts of my application database and sends an email that the rolling upgrade process is complete and the result is passed / failed.</p>
<p>Is there a hook where I can attach this script to?</p>

Devaroop
<p>Kubernetes doesn't implement such thing. This can be done by CI/CD pipeline or manually checking rolling update status. As you have said you can write simple script which will check status of rolling update and send it via e-mail and attach it to created <a href="https://plugins.jenkins.io/kubernetes/" rel="nofollow noreferrer">pipeline in Jenkins</a>.</p>
<p>To manually check status of rolling update execute command:</p>
<p><code>$ kubectl rollout status deploy/your-deployment -n your-namespace</code></p>
<p>If for example you are passing variables using ConfigMap you can use  <a href="https://github.com/stakater/Reloader" rel="nofollow noreferrer">Reloader</a> to perform your rolling updates automatically when a configmap/secret changed.</p>
