<p>I have a nginx ingress controller on aks which I configured using <a href="https://learn.microsoft.com/en-us/azure/aks/ingress-basic" rel="nofollow noreferrer">official guide</a>. I also wanted to configure the nginx to allow underscores in the header so I wrote down the following configmap</p>

<pre><code>apiVersion: v1
kind: ConfigMap
data:
   enable-underscores-in-headers: "true"
metadata:
   name: nginx-configuration
</code></pre>

<p>Note that I am using default namespace for nginx. However applying the configmap nothing seem to be happening. I see no events.  What am I doing wrong here?</p>

<pre><code>Name:         nginx-configuration
Namespace:    default
Labels:       &lt;none&gt;
Annotations:  kubectl.kubernetes.io/last-applied-configuration:
                {"apiVersion":"v1","data":{"enable-underscores-in-headers":"true"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"nginx-configura...

Data
====
enable-underscores-in-headers:
----
true
Events:  &lt;none&gt;
</code></pre>

user11791088
<p>Solution was to correctly name the configmap, firstly I did <code>kubectl describe deploy nginx-ingress-controller</code> which contained the configmap this deployment is looking for. In my case it was something like this <code>--configmap=default/nginx-ingress-controller</code>. I changed name of my configmap to <code>nginx-ingress-controller</code>. As soon I did that controller picked up the data from my configmap and changed the configuration inside my nginx pod.</p>
