<p>I have two machines within my netwrok which I want communicate from the pod. </p>

<p>Ips are as follows : </p>

<pre><code>10.0.1.23 - Lets call it X

13.0.1.12  - Lets call it Y
</code></pre>

<p>When I ssh into the master node or agent node and then do a ping to X or Y, the ping is successful. 
Therefore the machines are reachable. </p>

<p>Now I create a deployment, I log into the shell of the pod using (<code>kubectl exec -it POD_NAME — /bin/sh</code>). </p>

<p>Ping to Y is successful. But ping to X fails. </p>

<p>CIDR details : </p>

<pre><code>Master Node : 14.1.255.0/24
Agent Node: 14.2.0.0/16
Pod CIDR: 
   Agent : 10.244.1.0/24
   Master: 10.244.0.0/24
</code></pre>

<p>My understanding on what could be the issue : </p>

<blockquote>
  <p>acs-engine has kube-proxy setup the service network with 10.0.0.0/16
  If this is the problem how do i change the kube-proxy cidr?</p>
</blockquote>

<p>Additional Info: </p>

<p>I am using <em>acs-engine</em> for my deployment of cluster.</p>

<p>Output for <code>ip route</code> </p>

<p><code>default via 10.244.1.1 dev eth0 
10.244.1.0/24 dev eth0  src 10.244.1.13</code></p>

<p>Another suspect: On running <code>iptables-save</code> I see </p>

<p><code>-A POSTROUTING ! -d 10.0.0.0/8 -m comment --comment "kubenet: SNAT for outbound traffic from cluster" -m addrtype ! --dst-type LOCAL -j MASQUERADE
</code></p>

<p>Based on your question, it sounds like you've added another subnet to the k8 Virtual Network that gets deployed with the ACS Kubernetes cluster.</p>

<p>As it turns out, I ran into this <em>exact</em> same problem in our project. Azure Container Services uses very specific routing rules for the agent nodes. When the k8 cluster is deployed, they create a Route Table resource in the same resource group as all your cluster entities. So, if you...</p>

<ol>
<li>Open the k8 Route Table in the Azure Portal</li>
<li>Go to the Subnets section</li>
<li>+Associate with the subnet that your other VMs/PaaS services are in</li>
</ol>

<p>...this will create the routes that the k8 agents are looking for when routing the outbound Pod container traffic.</p>
