<p>I have all our applications in Kubernetes Helm charts using:</p>

<pre><code># values.yaml

default:
  IMAGE_REPO: myorg
  IMAGE_NAME: api
  IMAGE_TAG: latest
</code></pre>

<p>I understand that in order for Helm to know it has to re-deploy the pods <em>(i.e. pull down the latest image)</em> I have to change the the <code>IMAGE_TAG</code>. My question is how is this managed? Do I manually update the values.yaml file every deploy, git commit, git pull on the master, and then run <code>helm upgrade api --values values.yaml ./</code>?</p>

<p>Or is it better to just leave <code>values.yaml</code> on <code>latest</code> and update via the command line directly like:</p>

<pre><code>helm upgrade api --values values.yaml ./ --set IMAGE_TAG=ab31f452
</code></pre>

<p>Use git (99% of the time)</p>

<p>For a production deployment or anywhere that needs tracking I would want it in git and pushed from there. The helm chart will also evolve over time with your app so  this also means you get checkpoints of working app versions with the helm chart. </p>

<p>For development or snapshot environments that don't need to be reproduced, I sometimes might go with the less formal method of <code>helm</code> pushing out new image tags as needed. More so if you have something like Jenkins or any job runner that tracks when and how things happen. </p>

<p>This is very dependent on the environment the app runs in. It can range from  applications that require an audit trail all the way from a dev, through testing to production deployment where it has to be in git, over to the other end of the spectrum of throw stuff at production by hand (where you end up wanting it in git).</p>

<blockquote>
  <p>I understand that in order for Helm to know it has to re-deploy the pods (i.e. pull down the latest image) I have to change the the IMAGE_TAG</p>
</blockquote>

<p>This isn't entirely correct, kubernetes will reschedule pods when the resource spec changes. You could change an annotation or label on the pod spec and pods would be replaced. Then <a href="https://kubernetes.io/docs/concepts/containers/images/#updating-images" rel="nofollow noreferrer"><code>imagePullPolicy: Always</code></a> can be set in the pod spec. </p>

<p>Still, don't use that to rely on <code>:latest</code>. It will bite you one day.</p>
