What are Ingress `pathType` values and how does matching work?
IntermediateConceptServices, Networking, Ingress & Gateway API
Answer
Exact matches the path exactly; Prefix matches by path segments (/api matches /api/v1 but not /apiv1); ImplementationSpecific leaves it to the controller. ingressClassName selects the controller; the old kubernetes.io/ingress.class annotation is deprecated.
spec:
ingressClassName: nginx
rules:
- host: shop.example.com
http:
paths:
- path: /api
pathType: Prefix
backend: { service: { name: api, port: { number: 80 } } }