<p>Hello every one i have created a headless service using ExternalName type to access database residing outside my cluster but i am not able to connect to this service and even ping it from my pods in the cluster .Need help as to what am i doing wrong.I am using the kubernetes that comes shipped with docker-desktop-for-windows</p>

<p>ExternalName service yaml</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: dbservice
spec:
  type: ExternalName
  externalName: geekdude9094  //my hostname
</code></pre>

<p>results when bin bashing into one of the pods and pinging the service</p>

<pre><code>   root@service-app-6ffb5c88fb-5kvcd:/usr/local/tomcat#  ping dbservice
    PING geekdude9094.home (192.168.10.22): 56 data bytes
    92 bytes from broadcom.home (192.168.10.1): Destination Host Unreachable
    92 bytes from csp3.zte.com.cn.home (192.168.10.1): Destination Host Unreachable
    92 bytes from broadcom.home (192.168.10.1): Destination Host Unreachable
    92 bytes from csp3.zte.com.cn.home (192.168.10.1): Destination Host Unreachable
    92 bytes from broadcom.home (192.168.10.1): Destination Host Unreachable
    92 bytes from csp3.zte.com.cn.home (192.168.10.1): Destination Host Unreachable
    92 bytes from broadcom.home (192.168.10.1): Destination Host Unreachable
    92 bytes from csp3.zte.com.cn.home (192.168.10.1): Destination Host Unreachable
    ^C--- geekdude9094.home ping statistics ---

My windows OS: windows 10 64 bit
kubernetes version: 1.10.11 both client and server
</code></pre>

JayD
<p>I think the reason you can't access the service is that <code>docker-desktop-for-windows</code> run a virtual machine with different networking layers. So from point of networking the cluster cloudn't reach this <code>192.168.10.1</code> network because as far as I know, docker windows virtual machine use <code>10.0.75.0</code> subnet address.
Maybe you can use this <a href="https://docs.docker.com/docker-for-windows/networking/#use-cases-and-workarounds" rel="nofollow noreferrer">option</a></p>
