<p>I am following traefik documentation (<a href="https://docs.traefik.io/routing/routers/" rel="nofollow noreferrer">https://docs.traefik.io/routing/routers/</a>), want to use PathPrefix matcher to match different paths with wildcard support, for example, to match path starting with api/v1, it should match</p>
<p>api/v1/customers,</p>
<p>api/v1alpha/customers,</p>
<p>api/v1beta/customers.</p>
<p>How to achieve it using wildcards in path syntax? Please find below my ingress yaml. I tried /api/{v1*}/customers but not working as expected.</p>
<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: traefik
    traefik.frontend.rule.type: PathPrefix
  labels:
    app: &lt;app_name&gt;
    chart: &lt;chart_name&gt;
    heritage: Tiller
    release: &lt;release_name&gt;
  name: &lt;name&gt;
  namespace: default
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: &lt;service_name&gt;
          servicePort: 443
        path: /api/v1*/customers
</code></pre>

<p>I figured out how it works, posting here if someone wants to know. We can add regular expression in path</p>
<p>path: /api/{version:v1([a-z]*)}/customers</p>
