<p>I've found a documentation about how to configure your NginX ingress controller using ConfigMap: <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/" rel="noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/</a></p>

<p>Unfortunately I've no idea and couldn't find it anywhere how to load that ConfigMap from my Ingress controller.</p>

<p>My ingress controller:</p>

<pre><code>helm install --name ingress --namespace ingress-nginx --set rbac.create=true,controller.kind=DaemonSet,controller.service.type=ClusterIP,controller.hostNetwork=true stable/nginx-ingress
</code></pre>

<p>My config map:</p>

<pre><code>kind: ConfigMap
apiVersion: v1
metadata:
  name: ingress-configmap
data:
  proxy-read-timeout: "86400s"
  client-max-body-size: "2g"
  use-http2: "false"
</code></pre>

<p>My ingress:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress
  annotations:
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
  tls:
    - hosts:
        - my.endpoint.net
      secretName: ingress-tls
  rules:
    - host: my.endpoint.net
      http:
        paths:
          - path: /
            backend:
              serviceName: web
              servicePort: 443
          - path: /api
            backend:
              serviceName: api
              servicePort: 443
</code></pre>

<p>How do I make my Ingress to load the configuration from the ConfigMap? </p>

<p>I've managed to display what YAML gets executed by Helm using the: <code>--dry-run --debug</code> options at the end of <code>helm install</code> command. Then I've noticed that there controller is executed with the: <code>--configmap={namespace-where-the-nginx-ingress-is-deployed}/{name-of-the-helm-chart}-nginx-ingress-controller</code>.
In order to load your ConfigMap you need to override it with your own (check out the namespace).</p>

<pre><code>kind: ConfigMap
apiVersion: v1
metadata:
  name: {name-of-the-helm-chart}-nginx-ingress-controller
  namespace: {namespace-where-the-nginx-ingress-is-deployed}
data:
  proxy-read-timeout: "86400"
  proxy-body-size: "2g"
  use-http2: "false"
</code></pre>

<p>The list of config properties can be found <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md" rel="noreferrer">here</a>.</p>
