Which command creates a template from the file template.json?

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 a template from the file template.json?

Explanation:
Templates are stored in OpenShift as resources defined in a manifest. To register such a resource in the cluster, you create it from the file that describes it. The command oc create -f template.json reads the file and creates the Template object as declared, making it available for users to instantiate. This is the straightforward way to add a new Template to the cluster. Other commands don’t directly register a Template resource in the same way. Using the first option would invoke an application-building flow and isn’t intended for creating a Template object itself. The second option could apply changes to existing resources and, while it can create in some cases, the common, explicit approach for adding a new Template is oc create -f. The final option isn’t valid syntax for OpenShift CLI.

Templates are stored in OpenShift as resources defined in a manifest. To register such a resource in the cluster, you create it from the file that describes it. The command oc create -f template.json reads the file and creates the Template object as declared, making it available for users to instantiate. This is the straightforward way to add a new Template to the cluster.

Other commands don’t directly register a Template resource in the same way. Using the first option would invoke an application-building flow and isn’t intended for creating a Template object itself. The second option could apply changes to existing resources and, while it can create in some cases, the common, explicit approach for adding a new Template is oc create -f. The final option isn’t valid syntax for OpenShift CLI.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy