How to create a project/namespace through a YAML file or API call in OpenShift 4.x?

Solution Verified - Updated -

Issue

  • How to create a project/namespace through a YAML file or API call in OpenShift 4.x?

  • Is it possible to create a Namespace or a Project through a YAML file, that is without using the command oc new-project for a non-cluster-admin users? If so, how?

  • Our users want to use GitOps principles, and for that the creation of a Project with YAML files is necessary.

Environment

  • Red Hat OpenShift Container Platform 4.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content