title: Nginx Ingress on Kubernetes Cluster
body: <p>`I had a working Ingress controller version 1.0.0 (Bitnami). It stopped working one fine morning, and it appeared that the error was due to the version being depricated. Now I tried to upgrade this version, but started getting errors. I delete ingress and reinstalled it again, and this time from Bitnami repo which pulled the latest image. It is throwing errors. I created a new AKS cluster and installed ingress on it from the same repo, and it seems to work perfectly fine. Can somebody help me understand how this can be fixed please? I have over 120 services running on this cluster, and starting over would mean a lot of effort and time.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>E0419 10:57:29.245933       1 queue.go:130] "requeuing" err="\n-------------------------------------------------------------------------------\nError: exit status 1\n2022/04/19 10:57:29 [warn] 25#25: the \"http2_max_field_size\" directive is obsolete, use the \"large_client_header_buffers\" directive instead in /tmp/nginx-cfg2573211911:143\nnginx: [warn] the \"http2_max_field_size\" directive is obsolete, use the \"large_client_header_buffers\" directive instead in /tmp/nginx-cfg2573211911:143\n2022/04/19 10:57:29 [warn] 25#25: the \"http2_max_header_size\" directive is obsolete, use the \"large_client_header_buffers\" directive instead in /tmp/nginx-cfg2573211911:144\nnginx: [warn] the \"http2_max_header_size\" directive is obsolete, use the \"large_client_header_buffers\" directive instead in /tmp/nginx-cfg2573211911:144\n2022/04/19 10:57:29 [warn] 25#25: the \"http2_max_requests\" directive is obsolete, use the \"keepalive_requests\" directive instead in /tmp/nginx-cfg2573211911:145\nnginx: [warn] the \"http2_max_requests\" directive is obsolete, use the \"keepalive_requests\" directive instead in /tmp/nginx-cfg2573211911:145\n2022/04/19 10:57:29 [emerg] 25#25: \"location\" directive is not allowed here in /tmp/nginx-cfg2573211911:783\nnginx: [emerg] \"location\" directive is not allowed here in /tmp/nginx-cfg2573211911:783\nnginx: configuration file /tmp/nginx-cfg2573211911 test failed\n\n-------------------------------------------------------------------------------\n" key="initial-sync"
  I0419 10:57:29.246021       1 event.go:282] Event(v1.ObjectReference{Kind:"Pod", Namespace:"nginx-ingress", Name:"nginx-nginx-ingress-controller-5575846679-bjwkp", UID:"9e5641ae-345c-4d3c-a840-83c143f07fd3", APIVersion:"v1", ResourceVersion:"5932936", FieldPath:""}): type: 'Warning' reason: 'RELOAD' Error reloading NGINX: 
  -------------------------------------------------------------------------------
  Error: exit status 1
  2022/04/19 10:57:29 [warn] 25#25: the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg2573211911:143
  nginx: [warn] the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg2573211911:143
  2022/04/19 10:57:29 [warn] 25#25: the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg2573211911:144
  nginx: [warn] the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg2573211911:144
  2022/04/19 10:57:29 [warn] 25#25: the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /tmp/nginx-cfg2573211911:145
  nginx: [warn] the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /tmp/nginx-cfg2573211911:145
  2022/04/19 10:57:29 [emerg] 25#25: "location" directive is not allowed here in /tmp/nginx-cfg2573211911:783
  nginx: [emerg] "location" directive is not allowed here in /tmp/nginx-cfg2573211911:783
  nginx: configuration file /tmp/nginx-cfg2573211911 test failed</code></pre>
  </div>
  </div>
  </p>