<p>I have a cluster of 3 vm on which I install kubernetes and deployed some pods and services that I would like to be accessible from outside (my local pc for exemple)</p>

<p>I followed this tutorial <a href="https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/#bare-metal</a> to install my ingress controller.
I have created a service of type NodePort.
I have created a ingress that looks like this:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
      kubernetes.io/ingress.class: nginx
spec:
  rules:
  - host: my.service.com
    http:
      paths:
      - path: /
        backend:
          serviceName: myservice
          servicePort: 9090
</code></pre>

<p><code>kubectl get svc myservice</code> gives me:</p>

<pre><code>NAME        TYPE       CLUSTER-IP        EXTERNAL-IP   PORT(S)          AGE
myservice   NodePort   xxx.xxx.xxx.xxx   &lt;none&gt;        9090:31220/TCP   47m
</code></pre>

<p><code>kubectl get ingress test-ingress</code> gives me</p>

<pre><code>NAME            HOSTS            ADDRESS          PORTS   AGE
test-ingress    my.service.com   xx.xxx.xxx.xxx   80      49m
</code></pre>

<p>On my local computer I have added to /etc/hosts I have mapped the ip address of the ingress to the name my.service.com
When I try to ping my.service.com or directly the ip I go request timeout 100% packet loss.
I tried to reach my service visual interface with the web browser and it does not work either.</p>

<p>How can I investigate further why I can't access to my service from outside the cluster ?</p>

jerome
<p>There is probably an issue with your firewall. Check the firewall rules if they are blocking access from outside to that port.</p>

<p>Also you should access the service from the NodePort of the service you created while deploying the ingress controller.</p>

<p>Also edit your ingress and add the tls and hosts property with a self signed certificate for <code>my.service.com</code></p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
      ingress.kubernetes.io/rewrite-target: /
      kubernetes.io/ingress.class: nginx
spec:
  tls:
  - hosts:
    - my.service.com
    secretName: tls-secret-for my service
  rules:
  - host: my.service.com
    http:
      paths:
      - path: /
        backend:
          serviceName: myservice
          servicePort: 9090
</code></pre>
