<p>My deployment JSON file have following entry from my image, where 49 is build number. I'm confused how do I use VSTS or kubectl to replace that number with each incremental build. VSTS provides command line options to cubectl command, is it possible to specify something like <code>cubectl -f file.json -imagetag $TAG</code> or something?</p>

<pre><code>"containers": [
          {
            "name": "jietest",
            "image": "myreg.azurecr.io/jietest:49",
            "resources": {},
</code></pre>

<p>You can use <a href="https://kubernetes.io/docs/user-guide/kubectl/v1.8/#-em-image-em-" rel="nofollow noreferrer"><code>kubectl set image</code></a> to update container image of a resource.</p>

<p>For example: <code>kubectl set image -f file.json jietest=myreg.azurecr.io/jietest:$TAG</code>.</p>
