Kong ingress controller and path based routing

It turns out that Ingress Spec supports the POSIX regular expression (as defined by IEEE Std 1003.1) and not PCRE, which is used by Kong.

This means that you can use only a subset of regular expressions that are valid POSIX regexes.

Since, it’s an ID that you are trying express, I imagine it would be possible for you to know which characters can be present in the ID?

The following Ingress is satisfied and works properly for me, and you can build up on top of it:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: my-regex
spec:
  rules:
  - http:
      paths:
      - path: "/billing/[a-z1-3]+/details"
        backend:
          serviceName: http-svc
          servicePort: 80

Please note that I put the above content into a YAML file on disk and then apply that, to get around escape issues with shells.

Hope this helps!