How do you create a new OpenShift project and switch to it?

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

How do you create a new OpenShift project and switch to it?

Explanation:
Creating and switching to a new project is done with oc new-project <name>. This command creates the project (which is OpenShift’s namespace with project metadata) and immediately switches your CLI context to that project, so subsequent commands target that namespace. You can confirm the active project with oc project. The other proposed commands aren’t correct because there isn’t a standard oc create-project that both creates and switches, and there isn’t a valid oc switch-project command.

Creating and switching to a new project is done with oc new-project . This command creates the project (which is OpenShift’s namespace with project metadata) and immediately switches your CLI context to that project, so subsequent commands target that namespace. You can confirm the active project with oc project. The other proposed commands aren’t correct because there isn’t a standard oc create-project that both creates and switches, and there isn’t a valid oc switch-project command.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy