<p>I need to get access to current namespace. I've look up <code>KUBERNETES_NAMESPACE</code> and <code>OPENSHIFT_NAMESPACE</code> but they are unset.</p>

<pre><code>$ oc rsh wsec-15-t6xj4
 $ env | grep KUBERNETES
KUBERNETES_SERVICE_PORT=443
KUBERNETES_PORT=tcp://172.30.0.1:443
KUBERNETES_PORT_53_TCP_ADDR=172.30.0.1
KUBERNETES_PORT_53_UDP_ADDR=172.30.0.1
KUBERNETES_PORT_53_TCP_PORT=53
KUBERNETES_PORT_53_TCP_PROTO=tcp
KUBERNETES_PORT_53_UDP_PORT=53
KUBERNETES_SERVICE_PORT_DNS=53
KUBERNETES_PORT_53_UDP_PROTO=udp
KUBERNETES_PORT_443_TCP_ADDR=172.30.0.1
KUBERNETES_PORT_53_TCP=tcp://172.30.0.1:53
KUBERNETES_PORT_53_UDP=udp://172.30.0.1:53
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT_443_TCP_PROTO=tcp
KUBERNETES_SERVICE_PORT_DNS_TCP=53
KUBERNETES_PORT_443_TCP=tcp://172.30.0.1:443
KUBERNETES_SERVICE_PORT_HTTPS=443
KUBERNETES_SERVICE_HOST=172.30.0.1
</code></pre>

<p>Also the content of <code>/var/run/secrets/kubernetes.io/namespace</code> is empty.</p>

<p>Any ideas?</p>

<p>OpenShift are using Project instead Namespace.</p>

<p><a href="https://docs.openshift.com/container-platform/3.9/architecture/core_concepts/projects_and_users.html#namespaces" rel="nofollow noreferrer">https://docs.openshift.com/container-platform/3.9/architecture/core_concepts/projects_and_users.html#namespaces</a></p>

<p>It extended features of kubernetes namespace, such as resource limitation, rbac and so on.</p>
