<ol>
<li>I use a local kubernetes bundled with docker on Mac OS.</li>
<li>I've installed the <a href="https://github.com/jnewland/local-dev-with-docker-for-mac-kubernetes" rel="nofollow noreferrer">nginx-ingress-controller</a>.</li>
<li>I managed to send external http <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-controllers" rel="nofollow noreferrer">request via ingress</a> to my kubernetes managed containers (e.g. from my local browser). All request are sent via the nginx ports 80 or 443.</li>
</ol>
<p>The problem is, that I can only route http or https requests via my ngnix controller.
How can I send non HTTP Requests (e.g. database or corba) via ingress to my containers?</p>

<p>This is not well supported via the ingress mechanism and is an <a href="https://github.com/kubernetes/kubernetes/issues/23291" rel="noreferrer">open issue</a>.<br>
There is a work around for tcp or udp traffic using nginx-ingress which will map an exposed port to a kubernetes service using a configmap.<br>
See <a href="https://github.com/kubernetes/ingress-nginx/blob/e8d81034b8f6b3308caac85280e4cf3d93baee1c/docs/user-guide/exposing-tcp-udp-services.md" rel="noreferrer">this doc</a>.     </p>

<p>Start the ingress controller with the <code>tcp-services-configmap</code> (and/or <code>udp-services-configmap</code>) argument.  </p>

<pre><code>args: 
- "/nginx-ingress-controller"
- "--tcp-services-configmap=default/nginx-tcp-configmap"
- "--v=2"
</code></pre>

<p>deploy configmap:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-tcp-configmap
data:
  9000: "default/example-service:8080"
</code></pre>

<p>where <code>9000</code> is the exposed port and <code>8080</code> is the service port</p>
