Rewrite-target query


can you please help me to understand how rewrite-target works, with example. I understood the concept behind it but how it actuallly works, I am still confused.

e.g. If may URL is

what will be the outcome for / /$1 /$2


In ingress, any characters captured by (.*) will be assigned to the placeholder $2, which is then used as a parameter in the rewrite-target annotation.

For example, the ingress definition above will result in the following rewrites:

  • rewrites to
  • rewrites to
  • rewrites to

It is well explained in this documentation

Now it’s clear. Thanks.