Search code examples
kubernetesopenshift

Changing image tag in OpenShift Deployment with CLI


is there a set of commands to change the docker image name/tag in an existing deployment in a project in an OpenShift cluster?


Solution

  • You can use the oc set image command to change the image for a container in an existing Deployment / DeploymentConfig:

    oc set image dc/myapp mycontainer=nginx:1.9.1
    

    Try oc set image --help for some examples.