# Configmaps for Kong Ingress Controller setup

**URL:** https://discuss.konghq.com/t/configmaps-for-kong-ingress-controller-setup/10342
**Category:** Questions
**Tags:** kubernetes
**Created:** [June 30, 2022, 8:19pm UTC](https://discuss.konghq.com/t/configmaps-for-kong-ingress-controller-setup/10342 "2022-06-30T20:19:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![derangulasu](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@derangulasu](https://discuss.konghq.com/u/derangulasu)
#### Post date: [June 30, 2022, 8:19pm UTC](https://discuss.konghq.com/t/configmaps-for-kong-ingress-controller-setup/10342/1 "2022-06-30T20:19:41Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![traines](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/traines/32/158_2.png) [@traines](https://discuss.konghq.com/u/traines)
#### Post date: [June 30, 2022, 9:02pm UTC](https://discuss.konghq.com/t/configmaps-for-kong-ingress-controller-setup/10342/2 "2022-06-30T21:02:28Z")

</div>

You will not be able to use the same ConfigMaps.

Most of the settings you mention are global settings handled in [kong.conf](https://github.com/Kong/kong/blob/master/kong.conf.default), e.g. the [real IP header](https://github.com/Kong/kong/blob/ff61489882ad124f45b51a0c00320bd64052126c/kong.conf.default#L772-L788). 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:

> **[Custom Resource Definitions - v2.4.x | Kong Docs](https://docs.konghq.com/kubernetes-ingress-controller/2.4.x/references/custom-resources/#kongingress)**
>
> Documentation for Kong, the Cloud Connectivity Company for APIs and Microservices.

> **[Using KongIngress resource - v2.4.x | Kong Docs](https://docs.konghq.com/kubernetes-ingress-controller/2.4.x/guides/using-kongingress-resource/)**
>
> Documentation for Kong, the Cloud Connectivity Company for APIs and Microservices.

Additional per-route or per-service configuration documentation is available at [Kubernetes Ingress Controller annotations - v2.4.x | Kong Docs](https://docs.konghq.com/kubernetes-ingress-controller/2.4.x/references/annotations/)

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](https://github.com/Kong/kong/blob/ff61489882ad124f45b51a0c00320bd64052126c/kong.conf.default#L836-L887) 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.

---

<div class="post-metadata">

### Author: ![derangulasu](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@derangulasu](https://discuss.konghq.com/u/derangulasu)
#### Post date: [July 5, 2022, 2:36am UTC](https://discuss.konghq.com/t/configmaps-for-kong-ingress-controller-setup/10342/3 "2022-07-05T02:36:36Z")

</div>

> [@traines](#):
>
> `KONG_REAL_IP_HEADER`

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?

---

<div class="post-metadata">

### Author: ![traines](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/traines/32/158_2.png) [@traines](https://discuss.konghq.com/u/traines)
#### Post date: [July 22, 2022, 5:20pm UTC](https://discuss.konghq.com/t/configmaps-for-kong-ingress-controller-setup/10342/4 "2022-07-22T17:20:05Z")

</div>

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](https://github.com/Kong/kong/blob/f2f707532e92d531bfad66d1141cfad75e92ac52/kong.conf.default#L749-L770)
