<p>I have a kubernetes setup with 1 master and 1 slave, hosted on DigitalOcean Droplets.
For exposing my services I want to use Ingresses.</p>

<p>As I have a bare metal install, I have to configure my own ingress controller.
<strong>How do I get it to listen to port 443 or 80 instead of the 30000-32767 range?</strong></p>

<p>For setting up the ingress controller I used this guide: <a href="https://kubernetes.github.io/ingress-nginx/deploy/" rel="noreferrer">https://kubernetes.github.io/ingress-nginx/deploy/</a></p>

<p>My controller service looks like this:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
spec:
  type: NodePort
  ports:
    - name: http
      port: 80
      targetPort: 80
      protocol: TCP
    - name: https
      port: 443
      targetPort: 443
      protocol: TCP
  selector:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
</code></pre>

<p>And now obviously, because the NodePort range is 30000-32767, this controller doesn't get mapped to port 80 or 443:</p>

<pre><code>➜ kubectl get services --all-namespaces
NAMESPACE       NAME                   TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
ingress-nginx   ingress-nginx          NodePort    10.103.166.230   &lt;none&gt;        80:30907/TCP,443:30653/TCP   21m
</code></pre>

<p>I agree with @Matthew L Daniel, if you don't consider to use external load balancer, the best option would be sharing host network interface with <code>ingress-nginx</code> Pod by enabling <code>hostNetwork</code> option in the Pods' spec:</p>

<pre><code>template:
  spec:
    hostNetwork: true
</code></pre>

<p>Thus, NGINX Ingress controller can bind ports 80 and 443 directly to Kubernetes nodes, without mapping special proxy ports (30000-32767) to the nested services. Find more information <a href="https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network" rel="noreferrer">here</a>.</p>
