This is my ingress:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
spec:
rules:
- http:
paths:
- path: /rain
pathType: Exact
backend:
service:
name: echo
port:
number: 80
- path: /snow
pathType: Prefix
backend:
service:
name: echo
port:
number: 80
This is the result:
Request path: /snowy is Prefix matches /snow, so client got HTTP 200.
Request path: /rainy is not Exact matches /rain, so client got HTTP 404.
That’s all.