<p>I have a single service running on a NodePort service. How do i use ingress to access multiple services.</p>

<h3>deployment.yml</h3>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth
  template:
    metadata:
      labels:
        app: auth
        tier: backend
        track: dev
    spec:
      containers:
        - name: auth
          image: [url]/auth_app:v2
          ports:
            - name: auth
              containerPort: 3000
</code></pre>

<h2>service.yml</h2>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: auth
spec:
  selector:
    app: auth
    tier: backend
  ports:
    - protocol: TCP
      port: 3000
      targetPort: auth
  type: NodePort
</code></pre>

<h2>ingress.yml</h2>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
spec:
  backend:
    serviceName: auth
    servicePort: 8080
</code></pre>

<p>I followed step by step from the this <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/examples/static-ip/" rel="nofollow noreferrer">repo</a>. I could not get it working for my port config.
I'm a beginner and would like some resources for the same. </p>

<p>Try these manifests and remember to deploy an Ingress Controller (I usually use traefik, <a href="https://stackoverflow.com/a/51425301/2718151">here</a> some instructions to set it)</p>

<p><code>service.yml</code>: I changed NodePort to ClusterIP (the default, you can remove the line)</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: auth
spec:
  selector:
    app: auth
    tier: backend
  ports:
    - protocol: TCP
      port: 3000
      targetPort: auth
  type: ClusterIP
</code></pre>

<p><code>ingress.yml</code>: (I set port to 3000, your service port)</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
spec:
  backend:
    serviceName: auth
    servicePort: 3000
</code></pre>
