This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.8.3. Setting the image trigger on Kubernetes resources
When adding an image trigger to deployments, you can use the oc set triggers command. For example, the sample command in this procedure adds an image change trigger to the deployment named example so that when the example:latest image stream tag is updated, the web container inside the deployment updates with the new image value. This command sets the correct image.openshift.io/triggers annotation on the deployment resource.
Procedure
Trigger Kubernetes resources by entering the
oc set triggerscommand:oc set triggers deploy/example --from-image=example:latest -c web
$ oc set triggers deploy/example --from-image=example:latest -c webCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Unless the deployment is paused, this pod template update automatically causes a deployment to occur with the new image value.