title: Setting up the network for Kubernetes
body: <p>I'm reading the <a href="http://kubernetes.io/v1.0/docs/getting-started-guides/scratch.html" rel="nofollow">Kubernetes "<em>Getting Started from Scratch</em>" Guide</a> and have arrived at the dreaded <a href="http://kubernetes.io/v1.0/docs/admin/networking.html#kubernetes-model" rel="nofollow"><strong>Network Section</strong></a>, where they state:</p>
  
  <pre><code>Kubernetes imposes the following fundamental requirements on any networking implementation
  (barring any intentional network segmentation policies):
  * all containers can communicate with all other containers without NAT
  * all nodes can communicate with all containers (and vice-versa) without NAT
  * the IP that a container sees itself as is the same IP that others see it as
  </code></pre>
  
  <p>My first source of confusion is: <strong>How is this <em>different</em> than the "standard" Docker model?</strong> How is Docker different w.r.t. those 3 Kubernetes requirements?</p>
  
  <p>The article then goes on to summarize how GCE achieves these requirements:</p>
  
  <blockquote>
    <p>For the Google Compute Engine cluster configuration scripts, we use advanced routing to assign each VM a subnet (default is /24 - 254 IPs). Any traffic bound for that subnet will be routed directly to the VM by the GCE network fabric. This is in addition to the "main" IP address assigned to the VM, which is NAT'ed for outbound internet access. A linux bridge (called cbr0) is configured to exist on that subnet, and is passed to docker's --bridge flag.</p>
  </blockquote>
  
  <p>My question here is: <strong>Which requirement(s) from the 3 above does this paragraph address? More importantly, <em>how</em> does it achieve the requirement(s)?</strong> I guess I just don't understand how 1-subnet-per-VM accomplishes: container-container communication, node-container communication, and static IP.</p>
  
  <hr>
  
  <p>And, as a bonus/stretch concern: Why doesn't Marathon suffer from the same networking concerns as what Kubernetes is addressing here?</p>