I have a single service running on a NodePort service. How do i use ingress to access multiple services.
apiVersion: apps/v1
kind: Deplo
Try these manifests and remember to deploy an Ingress Controller (I usually use traefik, here some instructions to set it)
service.yml
: I changed NodePort to ClusterIP (the default, you can remove the line)
apiVersion: v1
kind: Service
metadata:
name: auth
spec:
selector:
app: auth
tier: backend
ports:
- protocol: TCP
port: 3000
targetPort: auth
type: ClusterIP
ingress.yml
: (I set port to 3000, your service port)
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
spec:
backend:
serviceName: auth
servicePort: 3000