title: NGINX Ingress - Redis Module add on
body: <p>Hi there I'm having some trouble adding in a 3rd party module into the Kubernetes NGINX-Ingress custom image, and haven't been successful in figuring out how to do it.</p>
  <p>I have seen one other has had this <a href="https://stackoverflow.com/questions/61866808/how-to-add-a-third-party-module-for-nginxinc-nginx-ingress-configuration-in-kube">problem</a>, and they seemed to of compiled it from scratch but dont seem to provide details as to how they added the file.</p>
  <p>I'm installing the ingress controller via Helm, with a simple <code>values.yaml</code> file to make the alterations shown below:</p>
  <h2>values.yaml</h2>
  <pre class="lang-yaml prettyprint-override"><code>controller:
    image:
      registry: [registry]
      repository: [repo]
      image: [image]
      tag: 1.0.2
      pullPolicy: Always
    config:
      entries:
        main-snippets: &quot;load_module /etc/nginx/modules/ngx_http_redis2_module.so&quot;
  prometheus:
    create: true
  </code></pre>
  <p>Which was accepted when doing a helm install, in pulling a custom image into the pod/container for the ingress controller.  I have been able to dynamically compile the module into a <code>.so</code> file that I'm keeping locally at this time to add into the custom image. But the issue that I'm having it seems that when building a Docker file for this custom image I seem to be unable to add the module file.</p>
  <h2>Dockerfile</h2>
  <pre class="lang-yaml prettyprint-override"><code>FROM nginx/nginx-ingress:2.1.0
  
  #Adds nginx redis2 module
  USER root
  
  COPY ngx_http_redis2_module.so /etc/nginx/modules/ngx_http_redis2_module.so
  
  USER www-data
  </code></pre>
  <p>The <code>dockerfile</code> is what I'm using above to attempt to add the file into the proper place, which should be under the <code>/etc/nginx/modules</code> folder like the others. But after running the pod, and bashing into it I'm only seeing the following:</p>
  <pre><code>-rwxr-xr-x    1 www-data www-data    164256 Sep 26 17:40 ngx_http_auth_digest_module.so
  -rwxr-xr-x    1 www-data www-data   5388256 Sep 26 17:40 ngx_http_brotli_filter_module.so
  -rwxr-xr-x    1 www-data www-data     78152 Sep 26 17:40 ngx_http_brotli_static_module.so
  -rwxr-xr-x    1 www-data www-data    100704 Sep 26 17:40 ngx_http_geoip2_module.so
  -rwxr-xr-x    1 www-data www-data    113056 Sep 26 17:40 ngx_http_influxdb_module.so
  -rwxr-xr-x    1 www-data www-data    267080 Sep 26 17:40 ngx_http_modsecurity_module.so
  -rwxr-xr-x    1 www-data www-data   2468184 Sep 26 17:40 ngx_http_opentracing_module.so
  -rwxr-xr-x    1 www-data www-data     74856 Sep 26 17:40 ngx_stream_geoip2_module.so
  </code></pre>
  <p>It seems that I'm making the image incorrectly or something else entirely and any help would be appreciated.</p>