<p>I've deployed my bitnami/mongodb helm chart:</p>
<pre><code>helm install mongodb bitnami/mongodb \
  --set architecture=&quot;replicaset&quot; \
  --set auth.enabled=false
</code></pre>
<p>Services:</p>
<pre><code>NAME                       TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)     AGE
mongodb-arbiter-headless   ClusterIP   None         &lt;none&gt;        27017/TCP   30m
mongodb-headless           ClusterIP   None         &lt;none&gt;        27017/TCP   30m
</code></pre>
<p>Both nodes are accesible behing <code>mongodb-headless</code>:</p>
<pre class="lang-yaml prettyprint-override"><code>Name:              mongodb-headless
Namespace:         salut
Labels:            app.kubernetes.io/component=mongodb
                   app.kubernetes.io/instance=mongodb
                   app.kubernetes.io/managed-by=Helm
                   app.kubernetes.io/name=mongodb
                   helm.sh/chart=mongodb-10.30.11
Annotations:       meta.helm.sh/release-name: mongodb
                   meta.helm.sh/release-namespace: salut
Selector:          app.kubernetes.io/component=mongodb,app.kubernetes.io/instance=mongodb,app.kubernetes.io/name=mongodb
Type:              ClusterIP
IP Families:       &lt;none&gt;
IP:                None
IPs:               None
Port:              mongodb  27017/TCP
TargetPort:        mongodb/TCP
Endpoints:         10.42.0.9:27017,10.42.2.5:27017   &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>
<p>I've created this Traefik <code>IngressRoute</code> in order to get access to my deployed replicaset mongo:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: mongodb
spec:
  entryPoints:
  - web
  routes:
  - kind: Rule
    match: Host(`mongodb.localhost`)
    services:
    - kind: Service
      name: mongodb-headless
      port: 27017
</code></pre>
<p>I need to get access from my host to this deployed replicaset, but I'm not able to reach it:</p>
<pre><code>mongo mongodb://mongodb.localhost:80/mpi
MongoDB shell version v5.0.5
connecting to: mongodb://mongodb.localhost:80/mpi?compressors=disabled&amp;gssapiServiceName=mongodb
...
...
...
...
waiting, bit never reached
</code></pre>
<p>Any ideas?</p>

Jordi
<p><code>IngressRoute</code> is for HTTP services. MongoDB is a TCP service so you should use <a href="https://doc.traefik.io/traefik/routing/providers/kubernetes-crd/#kind-ingressroutetcp" rel="nofollow noreferrer"><code>IngressRouteTCP</code></a> instead.</p>
