<p>I am setting a reverse proxy using kubernetes nginx-ingress, but I don't know how to add nginx parameters to the configuration, specifically: <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ssl_server_name" rel="nofollow noreferrer">proxy_ssl_server_name</a>. How do I set ingress parameters in yaml configurations?</p>

<p>I already tried using the <a href="https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-snippet" rel="nofollow noreferrer">server-snippet</a> annotation, but it seems like  it's not adding the parameter to the nginx.conf file in the cluster pods.</p>

<p>Here is the current code for the reverse proxy:</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  name: formstack
  namespace: serves
spec:
  type: ExternalName
  externalName: fluidsignal.formstack.com
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: formstack
  namespace: serves
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/upstream-vhost: "fluidsignal.formstack.com"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
  tls:
  - hosts:
    - fluidattacks.com
    secretName: fluidattacks-cert
  rules:
  - host: fluidattacks.com
    http:
      paths:
      - backend:
          serviceName: formstack
          servicePort: 443
        path: /forms(.*)
</code></pre>

<p>After setting up the proxy, I get a <code>502 Bad Gateway</code> error from Nginx. After looking at the pods logs, I see I'm getting the following openssl error: <code>SSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:SSL alert number 40</code>, which is why I want to add the parameter I mentioned before.</p>

<p>I just figured out that I was indeed using the right annotation: <code>nginx.ingress.kubernetes.io/server-snippet</code>,</p>

<p>But I needed to add an extra parameter: <code>proxy_ssl_name</code></p>

<p>Adding the following code fixed the problem:</p>

<pre><code>nginx.ingress.kubernetes.io/server-snippet: |
  proxy_ssl_name fluidsignal.formstack.com;
  proxy_ssl_server_name on;
</code></pre>

<p>Everything seems to be working fine now :D</p>
