<p>I read in the <a href="https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod" rel="nofollow noreferrer">Kubernetes docs</a>  that from within a pod you can access the Kubernetes apiserver with the <code>kubernetes.default.svc</code> DNS name. This name does resolve to an IP address, however, it seems that there's no response from this service endpoint.</p>
<pre><code>// from within a container in a pod

# nslookup kubernetes.default.svc
nslookup: can't resolve '(null)': Name does not resolve

Name:      kubernetes.default.svc
Address 1: 10.96.0.1 kubernetes.default.svc.cluster.local
/ # ping 10.96.0.1
PING 10.96.0.1 (10.96.0.1): 56 data bytes
^C
--- 10.96.0.1 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
</code></pre>
<p>No response from the apiserver. Someone?</p>

YoavKlein
<p>In kubernetes a Service exists of a IP <strong>and port</strong> pair (or multiple). It does not represent anything. The IP is just virtual and not assigned to a network interface. This is the reason, why you can't ping a service (pings do not get sent to a specific port).</p>
<p>Using curl/nc/telnet to access/connect to the API server via its service name &amp; port will work.</p>
<p>e.g.:</p>
<pre><code>$ curl -k https://kubernetes.default.svc:443
{
  &quot;kind&quot;: &quot;APIVersions&quot;,
  &quot;versions&quot;: [
    &quot;v1&quot;
  ],
  &quot;serverAddressByClientCIDRs&quot;: [
    {
      &quot;clientCIDR&quot;: &quot;0.0.0.0/0&quot;,
      &quot;serverAddress&quot;: &quot;10.0.1.149:443&quot;
    }
  ]
}
</code></pre>
