Hi, I am a rookie still learning and hoping to get some guidance.
We are using kong db-less gateways to route traffic. I am trying to figure out how to add in some additional configurations like
real_ip_header: X-Forwarded-For
real_ip_recursive: “on”
trusted_ips:
but I am not sure where to add these.
are these added to the Kong Gateway definition? Does this go into the proxy definition?
currently we have gateways set like this
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong
spec:
gatewayClassName: kong
listeners:
- name: https
port: 443
protocol: HTTPS
hostname: "*.domain.com"
tls:
mode: Terminate
certificateRefs:
- kind: Secret
name: wildcardcert
Would we define the gateway like this?
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: kong
spec:
gatewayClassName: kong
-env:
- name: REAL_IP_HEADER
value: X-Forwarded-For
- name: KONG_TRUSTED_IPS
value: 0.0.0.0/0,::/0
- name: KONG_REAL_IP_RECURSIVE
value: "on"
listeners:
- name: https
port: 443
protocol: HTTPS
hostname: "*.domain.com"
tls:
mode: Terminate
certificateRefs:
- kind: Secret
name: wildcardcert
thanks in advance