<p>I have multiple teams and each team has bunch of Applications and Each application will have different environments( DEV, STAGE, PROD ). Looking for a way to limit the accesses using namespace.</p>
<p>Say, each team will have their own namespace.</p>
<p>I don't want Application deployed in namespace A access configMaps from namespace B. But, I want Applications deployed in namespace A access Rest Applications deployed in namespace B (either through ingress or services).</p>
<p>Also, dev applications should not have visibility on STAGE applications.</p>
<p>But, there are few applications which will serve request for DEV &amp; STAGE based on tenantId in the request header.</p>
<p>What is the recommendation for creating namespace here?</p>

<p>Namespaces automatically separate resources in the cluster. So if you create a namespace A and B, then if you create a configmap in namespace A it will automatically be unavailable in namespace B.</p>

<p>If you want to restrict users on what they can do in your cluster. For example if you like developers to be able to create resources on development but only view things in staging or production. I would take a look at using <a href="https://kubernetes.io/docs/admin/authorization/rbac/#service-account-permissions" rel="nofollow noreferrer">RBAC</a> </p>

<p>If you want to separate access to and from applications on the network layer I would suggest taking a look at <a href="https://kubernetes.io/docs/concepts/services-networking/network-policies/" rel="nofollow noreferrer">Network Policies</a>. For that you would need an applicable networking solution for example <a href="https://docs.projectcalico.org/v3.1/getting-started/kubernetes/" rel="nofollow noreferrer">Project Calico</a></p>
