Gregory Suvalian
Gregory Suvalian

Reputation: 3832

How do I deploy specific tag of my docker image in kubernetes

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 cubectl -f file.json -imagetag $TAG or something?

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

Upvotes: 2

Views: 1054

Answers (1)

janetkuo
janetkuo

Reputation: 2835

You can use kubectl set image to update container image of a resource.

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

Upvotes: 2

Related Questions