Which command lists the templates available in the OpenShift namespace?

Prepare for the Red Hat OpenShift Developer II DO288 Exam with our quizzes. Study with flashcards and multiple choice questions, each with hints and explanations. Get ready for your certification!

Multiple Choice

Which command lists the templates available in the OpenShift namespace?

Explanation:
Templates are a namespaced resource in OpenShift, and the built-in templates live in the openshift namespace. To see what’s available there, you need to query the templates resource specifically in that namespace. The command uses the plural resource name (templates) with the namespace flag (-n openshift), which targets the OpenShift-provided templates in the correct namespace. Using oc get templates would show templates in your current namespace, which might not be the OpenShift one. Using the singular form oc get template would try to fetch a single resource named template, not list all templates. Using -A would list templates across all namespaces, not just the OpenShift namespace, which isn’t as focused as the requested scope. The explicit approach oc get templates -n openshift directly meets the requirement.

Templates are a namespaced resource in OpenShift, and the built-in templates live in the openshift namespace. To see what’s available there, you need to query the templates resource specifically in that namespace. The command uses the plural resource name (templates) with the namespace flag (-n openshift), which targets the OpenShift-provided templates in the correct namespace.

Using oc get templates would show templates in your current namespace, which might not be the OpenShift one. Using the singular form oc get template would try to fetch a single resource named template, not list all templates. Using -A would list templates across all namespaces, not just the OpenShift namespace, which isn’t as focused as the requested scope. The explicit approach oc get templates -n openshift directly meets the requirement.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy