I have the following that config that works when I try <NodeIP>:30080
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: app-deployment
spec:
replicas: 3
template:
metadata:
labels:
name: app-node
spec:
containers:
- name: app
image: myregistry.net/repo/app:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
env:
- name: NODE_ENV
value: production
---
apiVersion: v1
kind: Service
metadata:
name: app-service
spec:
selector:
name: app-node
ports:
- protocol: TCP
port: 80
targetPort: 8080
nodePort: 30080
type: NodePort
I am trying to use an Ingress:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: nginx-ingress
spec:
rules:
- host: myhost.com
http:
paths:
- path: /app
backend:
serviceName: app-service
servicePort: 80
myhost.com
works with the nginx intro screen, but myhost.com/app
gives 404 Not Found
. Where is the issue in my setup?
UPDATE:
- path: /
backend:
serviceName: app-service
servicePort: 80
If I do root path it works, but how come /app
doesn't?