Which method would you use to promote a built image from development to production within the same OpenShift cluster?

Prepare for the Red Hat Openshift Developer EX288 Exam. Study with comprehensive quizzes and flashcards. Each question includes hints and explanations to enhance your understanding. Ace your exam with confidence!

Multiple Choice

Which method would you use to promote a built image from development to production within the same OpenShift cluster?

Explanation:
In OpenShift, promoting a built image within the same cluster is done by re-tagging the image in an ImageStream. You have a built image already stored under a development tag, and you promote it by creating a new production tag that references the same image digest. Using a command like oc tag myapp:dev myapp:prod makes the prod tag point to the exact same image, so your production deployments pull from the prod tag without rebuilding. This preserves the image identity, enables straightforward rollback by keeping the original dev tag, and keeps promotion simple and reproducible within the cluster. Exposing via a Route doesn’t promote or change which image a deployment uses; it merely exposes the service. Modifying the Dockerfile’s FROM would require rebuilding a new image rather than promoting the existing one. OpenShift Pipelines can automate promotion, but the direct, standard method inside a single cluster is tagging the ImageStreamTag to the production tag.

In OpenShift, promoting a built image within the same cluster is done by re-tagging the image in an ImageStream. You have a built image already stored under a development tag, and you promote it by creating a new production tag that references the same image digest. Using a command like oc tag myapp:dev myapp:prod makes the prod tag point to the exact same image, so your production deployments pull from the prod tag without rebuilding. This preserves the image identity, enables straightforward rollback by keeping the original dev tag, and keeps promotion simple and reproducible within the cluster.

Exposing via a Route doesn’t promote or change which image a deployment uses; it merely exposes the service. Modifying the Dockerfile’s FROM would require rebuilding a new image rather than promoting the existing one. OpenShift Pipelines can automate promotion, but the direct, standard method inside a single cluster is tagging the ImageStreamTag to the production tag.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy