# Ping container running on specific host

**URL:** <https://forums.suse.com/t/ping-container-running-on-specific-host/6172>\
**Category:** Rancher 1.x\
**Created:** [April 17, 2017, 6:51pm UTC](https://forums.suse.com/t/ping-container-running-on-specific-host/6172 "2017-04-17T18:51:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iBobik](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ibobik/32/2339_2.png) [@iBobik](https://forums.suse.com/u/iBobik)\
**Post date:** [April 17, 2017, 6:51pm UTC](https://forums.suse.com/t/ping-container-running-on-specific-host/6172/1 "2017-04-17T18:51:37Z")

</div>

I have service with NFS server with scheduling configured to deploy on all hosts with persistent storage, so its storage can be used by services across environment (with epheral instances also - not persistent storage).

How this NFS server can be accessible from clients? I can not use just service alias, because it will target to all servers randomly. I need some DNS name to specific service on specific host.

Is it possible without exposing NFS ports to external network (I want to keep it inside overlay network)?

---

<div class="post-metadata">

**Author:** ![iBobik](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ibobik/32/2339_2.png) [@iBobik](https://forums.suse.com/u/iBobik)\
**Post date:** [April 18, 2017, 12:13pm UTC](https://forums.suse.com/t/ping-container-running-on-specific-host/6172/2 "2017-04-18T12:13:32Z")

</div>

Just to clarify:

`ping nfs-server` will alternately return different IPs, each on different host

I want something what will return IP to specific host:  
`ping nfs-server.host1` will always return IP to nfs-server running on host1  
`ping nfs-server.host2` will always return IP to nfs-server running on host2

And without port mapping to host network, because it will expose nfs-server to the Internet or (if I block it on firewall) nfs-server will not be accessible by services on the different hosts.

NFS servers will be then used only by Rancher NFS volume drivers.

---

<div class="post-metadata">

**Author:** ![beatcracker](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/beatcracker/32/1482_2.png) [@beatcracker](https://forums.suse.com/u/beatcracker)\
**Post date:** [February 23, 2018, 5:05pm UTC](https://forums.suse.com/t/ping-container-running-on-specific-host/6172/3 "2018-02-23T17:05:49Z")

</div>

+1 I’d love to be able to resolve DNS name to the service container on the same host, not a random one. Something like `prefer-local/only-local` labels that loadbalancers have. This way I could just scale some internal service like `Memcached` and be sure that other containers would use local instance.

I’ve created GitHub issue for this feature: [https://github.com/rancher/rancher/issues/11593](https://github.com/rancher/rancher/issues/11593)
