I have two ingress resources both are mapped to use nginx-ingress-controller
Ingress 1 -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: github-eventsource
namespace: argo-events
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
ingressClassName: nginx
rules:
- host: ad27b4b64cf6e4882a21b2500424b4de-65f846a64d3d542c.elb.eu-west-1.amazonaws.com
# host: dryrun.tk
http:
paths:
- path: /argocd-webhook
pathType: Exact
backend:
service:
name: github-eventsource-svc
port:
number: 12000
Ingress 2 -
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app1
namespace: services
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /app1
pathType: ImplementationSpecific
backend:
service:
name: app1
port:
number: 80
However when I both ingress resources are deployed and I try to curl Ingress-2 I get the below response as 404 -
curl ad27b4b64cf6e4882a21b2500424b4de-65f846a64d3d542c.elb.eu-west-1.amazonaws.com/app1
It always gives me error -
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
However if I remove/delete the Ingress-1 completely then Ingress-2 starts working and I get proper 200 response and data back as expected -
curl ad27b4b64cf6e4882a21b2500424b4de-65f846a64d3d542c.elb.eu-west-1.amazonaws.com/app1
This is an example app%
I want to understand here why is the Ingress-1 is conflicting with Ingress-2 when one is mapped to be exact match by Pathsegment + port 12000( should be targeting a very specific url ) and the other one being Implementation specific.