How ingress path type differs

When we create ingress, we have various path types i.e.

  1. ImplementationSpecific
  2. Prefix
  3. Exact

If we use prefix path type and then if we use path:- /aaa in ingress and pathType is Prefix then following path in the actual request will results the same.

/aaa/bbb/ccc
/aaa/bbb/
/aaa/

but first two doesn’t work why ? but third one correctly works.

Do we have any blog/discussion where the actual functioning is explained about nginx ingress controller ? with detailed examples

You might not find the docs you want. What you can do is experiment. You can see how your URLs are handled by looking at the logs of the ingress-nginx controller pod (in namespace ingress-nginx) describe when you try to hit an endpoint. My understanding is that the Prefix type should match all 3 of your examples, although the problem may be that the part of the prefix after your match is passed to the pod, and the pod may not know what to do with the rest of the path. You can confirm this by looking at the pod logs of the pods served by the service of the ingress rule.

Here’s what you see in k explain ing.spec.rules.http.path:

 - `"Prefix"` matches based on a URL path prefix split by '/'. Matching is
case sensitive and done on a path element by element basis. A path element
refers to the list of labels in the path split by the '/' separator. A
request is a match for path p if every p is an element-wise prefix of p of
the request path. Note that if the last element of the path is a substring
of the last element in request path, it is not a match (e.g. /foo/bar
matches /foo/bar/baz, but does not match /foo/barbaz). If multiple matching
paths exist in an Ingress spec, the longest matching path is given priority.
Examples: - /foo/bar does not match requests to /foo/barbaz - /foo/bar
matches request to /foo/bar and /foo/bar/baz - /foo and /foo/ both match
requests to /foo and /foo/. If both paths are present in an Ingress spec,
the longest matching path (/foo/) is given priority.