In openshift 4.x, you have an API for project
which seems to be totally similar to namespace
in the sense that when you create a project there a namespace created and the other way around.
I know namespace
is a standard object in kubernetes and project is specific to Openshift.
So what does project
brings ?
# list projects
oc get projects
NAME DISPLAY NAME STATUS
default Active
kube-node-lease Active
kube-public Active
kube-system Active
local-storage Active
openshift Active
openshift-apiserver Active
# list namespaces
$ oc get ns
NAME STATUS AGE
default Active 17d
kube-node-lease Active 17d
kube-public Active 17d
kube-system Active 17d
local-storage Active 16d
openshift Active 17d
openshift-apiserver Active 17d
openshift-apiserver-operator Active 17d
The list is the same except different columns
oc get project foo
Error from server (NotFound): namespaces "foo" not found
oc get ns foo
Error from server (NotFound): namespaces "foo" not found
15:30 $ oc new-project foo
Now using project "foo" on server "https://api.goo.tadadidou.bo:6443".
...
$ oc get project foo
NAME DISPLAY NAME STATUS
foo Active
$ oc get ns foo
NAME STATUS AGE
foo Active 70s
Even the yaml output is similar, except the value of the field Kind:
which is either Project
or Namespace
.