<p>I was able to get it working following NFS example in Kubernetes.</p>

<p><a href="https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/nfs" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/tree/master/examples/volumes/nfs</a></p>

<p>However, when I want to automate all the steps, I need to find the IP and update <code>nfs-pv.yaml</code> PV file with the hard coded IP address as mentioned in the example link page.</p>

<blockquote>
  <p>Replace the invalid IP in the nfs PV. (In the future, we'll be able to
  tie these together using the service names, but for now, you have to
  hardcode the IP.)</p>
</blockquote>

<p>Now, I wonder that <strong>how can we tie these together using the services names</strong>?</p>

<p>Or, <strong>it is not possible</strong> at the latest version of Kubernetes (as of today, the latest stable version is <a href="https://github.com/kubernetes/kubernetes/releases" rel="nofollow noreferrer">v1.6.2</a>) ?</p>

<p>I got it working after I add <strong>kube-dns</strong> address to the each minion|node where <strong>Kubernetes</strong> is running. After login each minion, update <strong>resolv.conf</strong> file as the following;</p>

<pre><code>cat /etc/resolv.conf
# Generated by NetworkManager
search openstacklocal localdomai
nameserver 10.0.0.10 # I added this line
nameserver 159.107.164.10
nameserver 153.88.112.200
....
</code></pre>

<p>I am not sure is it the best way but this works.</p>

<p>Any better solution is welcome.</p>
