<p>I have my application <a href="https://myapp.com" rel="nofollow noreferrer">https://myapp.com</a> deployed on K8S, with an nginx ingress controller. HTTPS is resolved at nginx.</p>
<p>Now there is a need to expose one service on a specific port for example <a href="https://myapp.com:8888" rel="nofollow noreferrer">https://myapp.com:8888</a>. Idea is to keep <a href="https://myapp.com" rel="nofollow noreferrer">https://myapp.com</a> secured inside the private network and expose only port number 8888 to the internet for integration.</p>
<p>Is there a way all traffic can be handled by the ingress controller, including tls termination, and it can also expose 8888 port and map it to a service?</p>
<p>Or
I need another nginx terminating tls and exposed on nodeport? I am not sure if I can access services like <a href="https://myapp.com" rel="nofollow noreferrer">https://myapp.com</a>:&lt;node_port&gt; with https.</p>
<p>Is using multiple ingress controllers an option?</p>
<p>What is the best practice to do this in Kubernetes?</p>

Vishal
<p>Use sidecar proxy pattern to add HTTPS support to the application running inside the pod.</p>
<p><strong>Refer the below diagram as a reference</strong></p>
<p><a href="https://i.stack.imgur.com/aym8f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aym8f.png" alt="enter image description here" /></a></p>
<p>Run nginx as a sidecar proxy container fronting the application container inside the same pod. Access the application through port 8888 on nginx proxy. nginx would route the traffic to the application.</p>
<p>Find below the post showing how it can be implemented</p>
<p><strong><a href="https://vorozhko.net/kubernetes-sidecar-pattern-nginx-ssl-proxy-for-nodejs" rel="nofollow noreferrer">https://vorozhko.net/kubernetes-sidecar-pattern-nginx-ssl-proxy-for-nodejs</a></strong></p>
