Working with projects in Openshift
A project allows a community of users to organize and manage their content in isolation from other communities.
Projects starting with openshift-
and kube-
are considered critical by OpenShift Container Platform. As such, OpenShift Container Platform does not allow you to create Projects starting with openshift-
or kube-
using the oc new-project
command. Cluster administrators can create these Projects using the oc adm new-project
command.
If you are the cluster administrator, which in this case you are, you can create the projects using the following commands. More explanation on being an OpenShift admin/developer will be covered in another post and linked here. Read the explanation after the first 2 basic tutorials.
Create a project on console
Check your access from the cli
ibmcloud oc cluster ls
View project using the CLI
- 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>
Create a project from CLI
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"
Viewing a project using the web console
- Navigate to Home → Projects.
- Select a project to view.
On this page, click the Workloads button to see workloads in the project.
Delete a project using the console
- Navigate to Home → Projects.
- Locate the project that you want to delete from the list of projects.
- On the far right side of the project listing, select Delete Project from the Options menu.
- When the Delete Project pane opens, enter the name of the project that you want to delete in the field.
- Click Delete.
Delete a project from CLI
Run oc delete project <project_name>
Resources : https://cloud.ibm.com/docs/openshift?topic=openshift-deploy_app#app_cli