<p>I have several pods, for example a python web app and a redis(shared by other apps), so I need to place redis in a separate pod. But they are all use the same subnet from docker(172.17.0.0/16) or even the same ip address. how can app pods talk with redis pod?</p>

<p>Maybe what I want ask is what's the best way to setup multi-host conainer networking.</p>

<hr>

<p>7 weeks later, I get more familiar with kubernetes. I know kubernetes has network assuming that pods can access each other. so if you app service pod need to access a shared service(redis) pod, you need expose the the shared service as a kubernetes service, then you can get the shared service endpoint from app pods' environment variables or hostname.</p>

<p>How did you set up Kubernetes? I'm not aware of any installation scripts that put pod IPs into a 172 subnet.</p>

<p>But in general, assuming Kubernetes has been set up properly (ideally using one of the provided scripts), using a <a href="https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/services.md" rel="nofollow">service object</a> to load balance across your 1 or more redis pods would be the standard approach.</p>
