title: Helm Nginx Ingress: How to turn off server-tokens?
body: <p>There's <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/#server-tokens" rel="nofollow noreferrer">a setting</a> to turn off the NGINX Server header, but I'm new to Kubernetes and Helm so I don't actually know how to set it.</p>
  
  <p>I've tried to turn off server tokens like so:</p>
  
  <pre><code>helm upgrade --reuse-values nginx-ingress stable/nginx-ingress -ndefault --set controller.config.server-tokens='"false"'
  </code></pre>
  
  <p>Which is indeed reflected when I read back the chart values:</p>
  
  <pre><code>❯ helm get values nginx-ingress -ndefault
  
  USER-SUPPLIED VALUES:
  controller:
    config:
      server-tokens: '"false"'
    publishService:
      enabled: true
  </code></pre>
  
  <p>And in the YAML:</p>
  
  <pre><code>❯ kubectl get -n default configmap  ingress-controller-leader-nginx -oyaml
  apiVersion: v1
  data:
    server-tokens: "false"
  kind: ConfigMap
  metadata:
    ...
  </code></pre>
  
  <p>But it doesn't seem to be applied against the internal <code>nginx.conf</code>:</p>
  
  <pre><code>❯ kubectl exec -ndefault nginx-ingress-controller-b545558d8-829dz -- cat /etc/nginx/nginx.conf | grep tokens
          server_tokens on;
  </code></pre>
  
  <p>And also my web-server is still sending the <code>server:</code> header.</p>
  
  <p>Do I have to reboot the service for the ConfigMap to be reflected or what? How do I do this?</p>