<p>I have a digital ocean kubernetes and an ingress controller routing traffic. but one of the pods needs to accept TCP traffic; so i would like to make the ingress to accept the TCP traffic and route to the pod. i followed this</p>
<p><a href="https://minikube.sigs.k8s.io/docs/tutorials/nginx_tcp_udp_ingress/" rel="nofollow noreferrer">https://minikube.sigs.k8s.io/docs/tutorials/nginx_tcp_udp_ingress/</a></p>
<p>and</p>
<p><a href="https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/" rel="nofollow noreferrer">https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/</a></p>
<p>after following, i still cannot connect to the port.</p>
<p>Below is what i have:</p>
<p>Load. balancer:</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
  name:  ingress-nginx
  namespace: ingress-nginx
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
spec:
  selector:
    # app:  speed-transmission-app
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
  type:  LoadBalancer
  ports:
  - name: http
    port: 80
    targetPort: 80
    protocol: TCP
  - name: https
    port: 443
    targetPort: 443
    protocol: TCP
  - name:  transmission-port
    port:  9000
    targetPort:  8998
    protocol: TCP

</code></pre>
<p>config map</p>
<pre><code>
apiVersion: v1
kind: ConfigMap
metadata:
  name: tcp-services
  namespace: ingress-nginx
data:
  9000: &quot;staging/speed-transmission-service:9000&quot;
</code></pre>
<p>Now when i try to connect to the load balancer external IP at port 9000, i get connection lost.</p>
<p>I will really appreciate help on how to configure this. thanks.</p>

Adebari Olalekan
<p>After searching everywhere for how to do this i came accross another stackoverflow answer that explain how this could work. it worked well and its what i still use now.  the only issue is just that its not a long term solution as i usually have my loadbalancer goes down anytime any of the services that is listening on the tcp service goes down, thus affecting the whole cluster. this is however on DOKS, am not sure of how it will behave on another platform. <a href="https://stackoverflow.com/questions/61430311/exposing-multiple-tcp-udp-services-using-a-single-loadbalancer-on-k8s">here</a> is the link to the answer. i will update this answer if i find a more stable solution.</p>
