<p>According to the Kubernetes documentation, services of the <code>ClusterIP</code> type will populate a <code>DNS</code> <code>A</code> type record with the following schema:</p>

<pre><code>pod-ip-address.my-namespace.pod.cluster.local
</code></pre>

<p>I am having difficultly parsing this schema into a resolvable address for my application.</p>

<p>For example, suppose I have the following service:</p>

<pre><code>subway-explorer-gmaps-proxy-service   ClusterIP   10.35.252.232   &lt;none&gt;   9000/TCP   19m
</code></pre>

<p>What will the corresponding DNS record be?</p>

<p>If your application is in the same namespace as the service you wish to consume, you can use the servicename:</p>

<pre><code>subway-explorer-gmaps-proxy-service
</code></pre>

<p>as the DNS name. Kube dns will resolve to the service IP. </p>

<p>If your application is not in the same namespace as that service, services get a DNS name of</p>

<pre><code>$service.$namespace.svc.cluster.local
</code></pre>

<p>e.g. if the service was created in the default namespace, it will get </p>

<pre><code>subway-explorer-gmaps-proxy-service.default.svc.cluster.local
</code></pre>

<p>Those names are resolvable anywhere in the cluster.</p>

<p><a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/</a></p>
