<p>I'm trying to run an NGINX reverse proxy, which is publicly exposed, without a loadbalancer. I want to curl the VM IP on port 80 with the ingress path specified and see my nginx setup page.</p>
<p>I installed this NGINX controller:</p>
<p><a href="https://kubernetes.github.io/ingress-nginx/deploy/#digital-ocean" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/#digital-ocean</a></p>
<p>Ingress</p>
<pre><code>...
spec:
  ingressClassName: nginx
  rules:
  - http:
      paths:
      - backend:
          service:
            name: webserver-srv
            port:
              number: 80
        path: /
        pathType: Prefix
</code></pre>
<p>I've modified the <code>externalIP</code> on the ingress controller to point to my VM like so:</p>
<p>(This is what allows the port 80 to open up when I run netcat)</p>
<pre><code>spec:
  externalIPs:
  - my.ip.goes.here
</code></pre>
<p>I can successfully validate that the port is open <code>nc -vz &lt;IP&gt; 80</code>, however I just get <code>empty reply from the server</code>.</p>
<p>I have a basic nginx webserver running as the service:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
    name: webserver-depl
spec:
    replicas: 1
    selector:
        matchLabels:
            app: webserver
    template:
        metadata:
            labels:
                app: webserver
        spec:
            containers:
                - name: webserver
                  image: nginx
---
apiVersion: v1
kind: Service
metadata:
    name: webserver-srv
spec:
    selector:
        app: webserver
    type: ClusterIP
    ports:
        - name: webserver
          protocol: TCP
          port: 80
          targetPort: 80

</code></pre>
<p>I can curl the clusterIP of the service and it works as expected:</p>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Welcome to nginx!&lt;/title&gt;
&lt;style&gt;
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Welcome to nginx!&lt;/h1&gt;
&lt;p&gt;If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.&lt;/p&gt;

&lt;p&gt;For online documentation and support please refer to
&lt;a href=&quot;http://nginx.org/&quot;&gt;nginx.org&lt;/a&gt;.&lt;br/&gt;
Commercial support is available at
&lt;a href=&quot;http://nginx.com/&quot;&gt;nginx.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thank you for using nginx.&lt;/em&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

Ryan
<p>Don't set Services externalIPs matching one of your nodes addresses (or anything else in your network). Those need to be unique. Although working in a cloud environment (digitalocean) probably serves as a fail-safe, here.</p>
<p>You did not expose your ingress controller outside of your SDN. A ClusterIP Service won't do (exposes in-SDN only). Setting an externalIP that overlaps with something else won't do either.</p>
<p>If you don't want to use a LoadBalancer Service, then you need to chose another way, making that ingress available to clients outside of your SDN.</p>
<p>One of which would be to use hostNetwork. See <a href="https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network</a></p>
