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.
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
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.yamlsample.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