Which command creates an image stream myphp:1.0 by importing from quay.io/test/myphp:latest with --confirm?

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 command creates an image stream myphp:1.0 by importing from quay.io/test/myphp:latest with --confirm?

Explanation:
Importing a remote image into an ImageStream is done with the import-image command, telling OpenShift which ImageStream and tag to update, where to pull the image from, and that the change should be applied immediately with the confirm flag. Use this to create the ImageStream myphp:1.0 by pulling from quay.io/test/myphp:latest: oc import-image myphp:1.0 --confirm --from quay.io/test/myphp:latest The image stream name is myphp and the tag is 1.0, while the source image is quay.io/test/myphp:latest. The --confirm flag is what actually performs the import; without it, OpenShift would show what would happen but not take action. Other commands don’t fit: one simply lists image streams or tags and cannot create or update an ImageStream; another is for starting an application build or deployment rather than importing an image into an ImageStream.

Importing a remote image into an ImageStream is done with the import-image command, telling OpenShift which ImageStream and tag to update, where to pull the image from, and that the change should be applied immediately with the confirm flag.

Use this to create the ImageStream myphp:1.0 by pulling from quay.io/test/myphp:latest:

oc import-image myphp:1.0 --confirm --from quay.io/test/myphp:latest

The image stream name is myphp and the tag is 1.0, while the source image is quay.io/test/myphp:latest. The --confirm flag is what actually performs the import; without it, OpenShift would show what would happen but not take action.

Other commands don’t fit: one simply lists image streams or tags and cannot create or update an ImageStream; another is for starting an application build or deployment rather than importing an image into an ImageStream.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy