How to configure Request Transformer Advanced plugin for replace URI on Kubernetes

Uses: Kong Gateway
TL;DR

How do I configure the Request Transformer Advanced plugin’s config.replace.uri parameter in Kubernetes?

Apply a KongClusterPlugin resource with config.replace.uri set under the replace config block for the request-transformer-advanced plugin, then run kubectl apply -f sample.yaml.

Overview

How can we configure the Request Transformer Advanced plugin to use config.replace.uri in our Kubernetes environment. We see it as an available field but the documentation doesn’t display an example on how to configure this.

Steps

To configure the Request Transformer Advanced plugin to use the config.replace.uri parameter in kubernetes we can apply the following yaml file.

kubectl apply -f sample.yaml

sample.yaml contents:

apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
metadata:
  name: global-request-transformer-advanced
  annotations:
    kubernetes.io/ingress.class: kong
  labels:
    global: "true"
config: 
  replace:
    uri: "/anything"
plugin: request-transformer-advanced

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!