A project allows a community of users to organize and manage their content in isolation from other communities.
Projects starting with |
In OpenShift Dedicated clusters that use the Customer Cloud Subscription (CCS) model, you cannot assign an SCC to pods created in one of the default namespaces: |
You can use the OpenShift Dedicated web console or the OpenShift cli (oc
) to create a project in your cluster.
You can use the OpenShift Dedicated web console to create a project in your cluster.
Projects starting with |
Ensure that you have the appropriate roles and permissions to create projects, applications, and other workloads in OpenShift Dedicated.
If you are using the Administrator perspective:
Navigate to Home → Projects.
click Create Project:
In the Create Project dialog box, enter a unique name, such as myproject
, in the Name field.
Optional: Add the Display name and Description details for the project.
click Create.
The dashboard for your project is displayed.
Optional: Select the Details tab to view the project details.
Optional: If you have adequate permissions for a project, you can use the Project Access tab to provide or revoke admin, edit, and view privileges for the project.
If you are using the Developer perspective:
click the Project menu and select Create Project:
In the Create Project dialog box, enter a unique name, such as myproject
, in the Name field.
Optional: Add the Display name and Description details for the project.
click Create.
Optional: Use the left navigation panel to navigate to the Project view and see the dashboard for your project.
Optional: In the project dashboard, select the Details tab to view the project details.
Optional: If you have adequate permissions for a project, you can use the Project Access tab of the project dashboard to provide or revoke admin, edit, and view privileges for the project.
If allowed by your cluster administrator, you can create a new project.
Projects starting with |
Run:
$ oc new-project <project_name> \
--description="<description>" --display-name="<display_name>"
For example:
$ oc new-project hello-openshift \
--description="This is an example project" \
--display-name="Hello OpenShift"
The number of projects you are allowed to create might be limited by the system administrator. After your limit is reached, you might have to delete an existing project in order to create a new one. |
You can use the OpenShift Dedicated web console or the OpenShift cli (oc
) to view a project in your cluster.
You can view the projects that you have access to by using the OpenShift Dedicated web console.
If you are using the Administrator perspective:
Navigate to Home → Projects in the navigation menu.
Select a project to view. The Overview tab includes a dashboard for your project.
Select the Details tab to view the project details.
Select the YAML tab to view and update the YAML configuration for the project resource.
Select the Workloads tab to see workloads in the project.
Select the RoleBindings tab to view and create role bindings for your project.
If you are using the Developer perspective:
Navigate to the Project page in the navigation menu.
Select All Projects from the Project drop-down menu at the top of the screen to list all of the projects in your cluster.
Select a project to view. The Overview tab includes a dashboard for your project.
Select the Details tab to view the project details.
If you have adequate permissions for a project, select the Project access tab view and update the privileges for the project.
When viewing projects, you are restricted to seeing only the projects you have access to view based on the authorization policy.
To view a list of projects, run:
$ oc get projects
You can change from the current project to a different project for cli operations. The specified project is then used in all subsequent operations that manipulate project-scoped content:
$ oc project <project_name>
You can use the Project view in the Developer perspective to grant or revoke access permissions to your project.
You have created a project.
To add users to your project and provide Admin, Edit, or View access to them:
In the Developer perspective, navigate to the Project page.
Select your project from the Project menu.
Select the Project Access tab.
click Add access to add a new row of permissions to the default ones.
Enter the user name, click the Select a role drop-down list, and select an appropriate role.
click Save to add the new permissions.
You can also use:
The Select a role drop-down list, to modify the access permissions of an existing user.
The Remove Access icon, to completely remove the access permissions of an existing user to the project.
Advanced role-based access control is managed in the Roles and Roles Binding views in the Administrator perspective. |
In the Developer perspective of the web console, the Project → Project access page enables a project administrator to grant roles to users in a project. By default, the available cluster roles that can be granted to users in a project are admin, edit, and view.
As a cluster administrator, you can define which cluster roles are available in the Project access page for all projects cluster-wide. You can specify the available roles by customizing the spec.customization.projectAccess.availableClusterRoles
object in the Console
configuration resource.
You have access to the cluster as a user with the cluster-admin
role.
In the Administrator perspective, navigate to Administration → Cluster settings.
click the Configuration tab.
From the Configuration resource list, select Console operator.openshift.io
.
Navigate to the YAML tab to view and edit the YAML code.
In the YAML code under spec
, customize the list of available cluster roles for project access. The following example specifies the default admin
, edit
, and view
roles:
apiVersion: operator.openshift.io/v1
kind: Console
metadata:
name: cluster
# ...
spec:
customization:
projectAccess:
availableClusterRoles:
- admin
- edit
- view
click Save to save the changes to the Console
configuration resource.
In the Developer perspective, navigate to the Project page.
Select a project from the Project menu.
Select the Project access tab.
click the menu in the Role column and verify that the available roles match the configuration that you applied to the Console
resource configuration.
You can add items to your project by using the +Add page in the Developer perspective.
You have created a project.
In the Developer perspective, navigate to the +Add page.
Select your project from the Project menu.
click on an item on the +Add page and then follow the workflow.
You can also use the search feature in the Add* page to find additional items to add to your project. click * under Add at the top of the page and type the name of a component in the search field. |
You can use the OpenShift Dedicated web console or the OpenShift cli (oc
) to view the status of your project.
You can review the status of your project by using the web console.
You have created a project.
If you are using the Administrator perspective:
Navigate to Home → Projects.
Select a project from the list.
Review the project status in the Overview page.
If you are using the Developer perspective:
Navigate to the Project page.
Select a project from the Project menu.
Review the project status in the Overview page.
You can review the status of your project by using the OpenShift cli (oc
).
You have installed the OpenShift cli (oc
).
You have created a project.
Switch to your project:
$ oc project <project_name> (1)
1 | Replace <project_name> with the name of your project. |
Obtain a high-level overview of the project:
$ oc status
You can use the OpenShift Dedicated web console or the OpenShift cli (oc
) to delete a project.
When you delete a project, the server updates the project status to Terminating from Active. Then, the server clears all content from a project that is in the Terminating state before finally removing the project. While a project is in Terminating status, you cannot add new content to the project. Projects can be deleted from the cli or the web console.
You can delete a project by using the web console.
You have created a project.
You have the required permissions to delete the project.
If you are using the Administrator perspective:
Navigate to Home → Projects.
Select a project from the list.
click the Actions drop-down menu for the project and select Delete Project.
The Delete Project option is not available if you do not have the required permissions to delete the project. |
In the Delete Project? pane, confirm the deletion by entering the name of your project.
click Delete.
If you are using the Developer perspective:
Navigate to the Project page.
Select the project that you want to delete from the Project menu.
click the Actions drop-down menu for the project and select Delete Project.
If you do not have the required permissions to delete the project, the Delete Project option is not available. |
In the Delete Project? pane, confirm the deletion by entering the name of your project.
click Delete.
You can delete a project by using the OpenShift cli (oc
).
You have installed the OpenShift cli (oc
).
You have created a project.
You have the required permissions to delete the project.
Delete your project:
$ oc delete project <project_name> (1)
1 | Replace <project_name> with the name of the project that you want to delete. |