<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>Your service is running in port 3000 but your Ingress routing rule is matching to port 8080. It will probably work if you just change the servicePort to 3000 in the backend section of your Ingress resource definition. </p>

<p>I'd suggest making sure it works with NodePort first before trying Ingress. I suggest this because I notice your Service only specifies values for port and targetPort but not nodePort. If you do not specify a nodeport value, you will get a random port number. As you want to use ingress with NodePort service type, the random port number should not matter. </p>

<p>For NodePort tutorials you could start with <a href="https://medium.com/@markgituma/kubernetes-local-to-production-with-django-2-docker-and-minikube-ba843d858817" rel="nofollow noreferrer">https://medium.com/@markgituma/kubernetes-local-to-production-with-django-2-docker-and-minikube-ba843d858817</a> as I notice you've tagged your post with django</p>

<p>For nginx ingress you could see <a href="https://cloud.google.com/community/tutorials/nginx-ingress-gke" rel="nofollow noreferrer">https://cloud.google.com/community/tutorials/nginx-ingress-gke</a> but you might want to find something specific to your cloud platform if you're not using gke</p>

<p>It is best to start with one service but to understand how this can work for multiple services you could have a look at the fanout ingress example in the docs <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout</a></p>
