<p>I have setup a Nginx Ingress to proxy traffic to a Kubernetes cluster I have setup with <code>kubeadm</code>. This seems to be working well.</p>

<p>On the host (where the Master node is setup) I have a number of other services running that are being proxied by another Nginx (publicly facing). </p>

<p>What I want to achieve is route all the traffic to a specific domain (pointing to the cluster) from the first Nginx (facing the public) to the Nginx running in the cluster.</p>

<p><code>Internet -----&gt; Nginx Public -----&gt; Nginx Ingress -----&gt; Cluster</code></p>

<p>Nginx Ingress is listening on TLS/SSL traffic.</p>

<p>So I want to passthrough SSL traffic to it via the public Nginx.</p>

<p>I attempted it with the following which didnt seem to work.</p>

<pre><code>upstream cluster {
    server 10.109.70.33:443 max_fails=10 fail_timeout=10s;
}

server {
    listen 80;
    listen [::]:80;

    listen 443;
    listen [::]:443;

    server_name *.dev-new.test.co;

    access_log /var/log/nginx/cluster-access.log;
    error_log  /var/log/nginx/cluster-error.log;

    location / {
        proxy_pass https://cluster;
    }
}
</code></pre>

nixgadget
<p>You need to add </p>

<pre><code>proxy_set_header Host $host; 
</code></pre>

<p>in your <code>proxy_pass</code> block. This is needed so the server knows which virtual host you are trying to look into</p>
