title: test round-robin in kubernetes
body: <p>Context:
  2 Nodes with 3 Pods</p>
  
  <p>Node-1:Pod-A,Pod-B
  Node-2:Pod-C</p>
  
  <p>use NodePort to expose the service in my local virtual boxes(centos).</p>
  
  <p>If I visit application by k8s service-clusterIP, I can see the round-robin is working among the 3 pods</p>
  
  <p>If I visit application By Node-1, I didn't see the round-robin is working. only Pod-A is hit.</p>
  
  <p>the round-robin is not working if access by Node IP? (the node have more than 1 pod)</p>
  
  <hr>
  
  <p>10.144.39.* (company network)</p>
  
  <p>192.168.*  k8s  network</p>
  
  <p><strong>Env:</strong>
  Mac laptop
  k8s cluster is hosted in the VM(3 instances:Master,Node-1,Node-2)</p>
  
  <p><strong>k8s clusters</strong></p>
  
  <p>Master</p>
  
  <p>Node-1:Pod-A,Pod-B </p>
  
  <p>Node-2:Pod-C</p>
  
  <p><strong>IP info:</strong>
  Master 10.144.39.107</p>
  
  <p>Node-1: 10.144.39.108  192.168.84.128</p>
  
  <p>Node-2: 10.144.39.109  192.168.247.0</p>
  
  <p><strong>Testcases:</strong></p>
  
  <p>1.send request from Mac env</p>
  
  <p>step:</p>
  
  <pre><code>wget -qO- http://10.144.39.108:1651 (node-2 with 2 pods)
  </code></pre>
  
  <p>Result:</p>
  
  <p>Round-Robin:only hit the Pod-A</p>
  
  <hr>
  
  <p>2.send reqeuset from the master/node-1/node-2 VM (Master server)</p>
  
  <p>step:</p>
  
  <pre><code>wget -qO- http://10.144.39.108:1651 (node-2 with 2 pods)
  </code></pre>
  
  <p>Result:</p>
  
  <p>Round-Robin: only hit the Pod-A,Pod-B</p>
  
  <hr>
  
  <p>3.send request from the cluster inside:</p>
  
  <p>steps:</p>
  
  <p>1.kubectl exec busybox -it /bin/sh</p>
  
  <p>2.wget -qO- <a href="http://10.144.39.108" rel="nofollow noreferrer">http://10.144.39.108</a>：31651</p>
  
  <p>3.exit</p>
  
  <p>Round-Robin:  hit the Pod-A,Pod-B,Pod-C</p>