<p>In my namespace I have services</p>
<pre><code>k get svc
NAME              TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
blue-service      NodePort    10.107.127.118   &lt;none&gt;        80:32092/TCP     60m
demo              ClusterIP   10.111.134.22    &lt;none&gt;        80/TCP           3d
</code></pre>
<p>I added blue-service to /etc/hosts
It failes again</p>
<pre><code>wget -O- blue-service
--2022-06-13 11:11:32--  http://blue-service/
Resolving blue-service (blue-service)... 10.107.127.118
Connecting to blue-service (blue-service)|10.107.127.118|:80... failed: Connection timed out.
Retrying.
</code></pre>
<p>I decided to chech with describe</p>
<pre><code>Name:                     blue-service
Namespace:                default
Labels:                   app=blue
Annotations:              &lt;none&gt;
Selector:                 app=blue
Type:                     NodePort
IP Family Policy:         SingleStack
IP Families:              IPv4
IP:                       10.107.127.118
IPs:                      10.107.127.118
Port:                     &lt;unset&gt;  80/TCP
TargetPort:               8080/TCP
NodePort:                 &lt;unset&gt;  32092/TCP
Endpoints:                172.17.0.39:8080,172.17.0.40:8080,172.17.0.41:8080
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;
</code></pre>
<p>Why?</p>

MikiBelavista
<p>The services you are referring to do not have an external IP (the External IP field is empty) so you cannot access those services.</p>
<p>If you want to access those services, you either need to</p>
<ol>
<li>Make them a LoadBalancer service type which will give them an external IP</li>
</ol>
<p>or</p>
<ol start="2">
<li>Use <code>kubectl port-forward</code> to connect a local port on your machine to the service then use <code>localhost:xxxx</code> to access the service</li>
</ol>
<p>If you want to map a DNS name to the service, you should look at the External DNS project as mentioned in <a href="https://stackoverflow.com/questions/72593100/kubernetes-ingress-hostname-and-ip/72594447#72594447">this answer</a> which will allow you to create DNS entries in your provider's DNS service (if you are running the cluster on a managed platform)</p>
<p>OR, use <a href="https://nip.io" rel="nofollow noreferrer">nip.io</a> if you're only testing</p>
