OC Rollout with specific tag name

Viewed 547

I have created Tag Version using oc tag command in CLI, i have to deploy the image with recently created tag version. Ex. oc tag <Source Service Name>:latest <Destination Service Name>:Rel10.0. I have created Tag Name as Rel10.0, i have to select this Tag name and deploy it using CLI.

What is OC Command i have to use?

I have tried with oc rollout latest but this command does only deploy. I have to select that specific tag name and deploy the image. oc rollout latest <image name>

I know after doing oc tag in CLI, we can check in Openshift UI for that specific tag name select and deploy it. I dont want to use Openshift i want to use CLI and do this job.

1 Answers
oc set image $resourcetype $containername=$imagename:$tag

so assuming you have a deployment named web which has a container named server using nginx image you would do the following:

oc set image deployment web server=nginx:latest
Related