Configmaps for Kong Ingress Controller setup

Hi,

We are trying to replace Nginx ingress controller with Kong ingress controller. as per our needs we used few configmaps For Nginx like “enable-real-ip, use-forwarded-headers, forwarded-for-header, proxy-read-timeout, proxy-send-timeout, proxy-connect-timeout, proxy-real-ip-cidr and proxy-body-size”. Now to use the same configmaps for the kong Ingress Controller i don’t find any documentation available and not able to find it somewhere what values do i need to replace for the above configmaps which are present for Nginx ingress controller. can i use the same configmaps and values?

You will not be able to use the same ConfigMaps.

Most of the settings you mention are global settings handled in kong.conf, e.g. the real IP header. These are set via KONG_-prefixed environment variables, e.g. KONG_REAL_IP_HEADER=X-Forwarded-For (or env.real_ip_header if using our Helm chart).

Some, however, are configured on a per-Service basis: the timeouts are configured via the proxy section of an attached KongIngress resource:

Additional per-route or per-service configuration documentation is available at Kubernetes Ingress Controller annotations - v2.4.x | Kong Docs

There are also some NGINX settings that we do not expose through Kong-specific configuration. If you do not find a kong.conf entry for a directive you need, you can inject directives into the generated NGINX configuration at various points. These are still environment variables in our case though, e.g. you’d set something like KONG_NGINX_HTTP_SSL_STAPLING=on if you wanted to port over an ssl_stapling on; statement from the http block of your NGINX configuration.

Thank you so much for the reply. I’m concerned about “proxy-real-ip-cidr” ConfigMap, do we have any equivalent ConfigMap for “proxy-real-ip-cidr” in Kong and can i take same cidr values same as Nginx Ingress Controller?

Not 100% sure this is what you need–the documentation for that ConfigMap field is a bit unclear, but it looks like you want KONG_TRUSTED_IPS: kong/kong.conf.default at f2f707532e92d531bfad66d1141cfad75e92ac52 · Kong/kong · GitHub