<p>Created a <code>kubernetes</code> cluster with private topology on <code>aws</code> using <code>kops</code></p>

<p>My application exposes several services. As expected, services communicate among each other using their names, i.e. the <code>name</code> field below:</p>

<pre><code>kind: Service
metadata:
  name: myservice
  namespace: staging_namespace
</code></pre>

<p>Here is the question:</p>

<p>Assuming that I will deploy <strong>2</strong> version of my application (e.g. <code>testing</code> and <code>staging</code>) in <strong>different namespaces</strong>, will this prevent service name collision?</p>

<p>Will namespace separation allow </p>

<ul>
<li><p><code>service1</code> reach the correct <code>myservice</code> in <code>staging_namespace</code> in my <code>staging</code> deployment</p></li>
<li><p><code>service1</code> reach the correct <code>myservice</code> in <code>testing_namespace</code> in my <code>testing</code> deployment</p></li>
</ul>

<p>?</p>

<p>Using  </p>

<pre><code>kops version
Version 1.8.0 (git-5099bc5)
</code></pre>

<p>and </p>

<pre><code>$ kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.1", GitCommit:"f38e43b221d08850172a9a4ea785a86a3ffa3b3a", GitTreeState:"clean", BuildDate:"2017-10-11T23:27:35Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:17:43Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
</code></pre>

<p>As I understand, Namespace is a virtual cluster in k8s cluster, therefore it provides isolation and separation of concern. It does not conflict If you have same services or pods in different namespaces. </p>

<p>All service are assigned a DNS Record which is unique therefore there is no conflict. for instance, </p>

<pre><code>my-svc.my-namespace.svc.cluster.local. 
</code></pre>

<p><strong>In your case, it would be like this</strong></p>

<pre><code>my-svc.staging_namespace.svc.cluster.local.
my-svc.testing_namespace.svc.cluster.local.
</code></pre>

<p>I have attached a link for further research. 
<a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="nofollow noreferrer">services-networking</a></p>

<p><strong>Edit:1</strong> </p>

<p><strong>Purpose and Motivation of Namespaces</strong> </p>

<p>The functionality of namespace is to provide the logical separation of environments which is providing a uniqueness to k8s resources even being a same pod or service.</p>

<blockquote>
  <p>Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces.</p>
</blockquote>

<p><a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/" rel="nofollow noreferrer">Virtual cluster are called namespaces</a></p>
