Kong ingress controller and path based routing

@hbagdi Thanks to your promptly response. I did try that. But when I tried to access it thru KONG it returns

GET /billing/abc123/details
    {
        "message": "no route and no API found with those values"
    }

Then I replaced {billingId} as regex S+ for any non-whitespace characters (as in Kong doc).

  • With \S+, ingress returned invalid escapse character
  • With \S+, ingress returned invalid regex
  • With \\S+, ingress passed, but receive 404 when access kong, same as using {billingId}.

My ingress.ymal looks like below (a copy from your article.

My questions is how to include the {billingid} in the path that pass ingress and also accessible thru KONG?

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: app-name
  annotations:
    kubernetes.io/ingress.class: "kong"
spec:
  rules:
    - host:
      http:
        paths:
          - path: "/billing/\\S+/details"
            backend:
              serviceName: app-name
              servicePort: 443
          - path: "/checksense"
            backend:
              serviceName: app-name
              servicePort: 443