I have an application running on 1001. I deployed it to a container in port 80.
How can I use Ingress for that?
I tried using NodePort with --targetPort=1001 and and I added 80 in servicePort in Ingress.yaml
.
kubectl expose deployment test --target-port=1001 --type=NodePort
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
spec:
backend:
serviceName: test
servicePort: 80
I am getting error
Backend not found- 404
Am I using the correct way or should I need to follow something else?