Traefik IngressRouteTcp expose K3s service bitnami/PostgreSQL-HA not working

I've installed Traefik with HELM setting the new entry point "postgres"

    port: 5432
    expose: true
    exposedPort: 5432
    protocol: TCP

kubectl describe deployments.apps traefik | grep 5432

Ports:       9100/TCP, 5432/TCP, 9000/TCP, 8000/TCP, 8443/TCP

I can see that the deployment of traefik contains the 5432 port and that the new entry point has been added.

kubectl get endpoints | grep 5432

postgresql-postgresql-ha-pgpool 2d3h
postgresql-postgresql-ha-postgresql 2d3h
postgresql-postgresql-ha-postgresql-headless 2d3h
traefik,, 3h

I can see also that the services of Postgres have been created and that the port 5432 is configured in traefik.

I've created the following IngressRouteTcp

kind: IngressRouteTCP
  name: postgresqlss
  namespace: tandemblind
    - postgres
   -  match: HostSNI(`*`)
        - name: postgresql-postgresql-ha-postgresql-headless
          port: 5432

looking the logs of the traefik pod I don't see any error related to this IngressRouteTCP.

I've tried also to use the other two services of Postgres postgresql-postgresql-ha-postgresql and the pool but the issue is the same. I cannot reach postgresql from outside.

from the traefik dashboard I can see that the router and service have been created and there aren't errors.

if I run sudo nmap -sS -p 5432 -v

I can see 5432/tcp filtered postgresql

Can someone tell me what I'm doing wrong? I've followed plenty of articles but I didn't manage to expose the db on internet(only for dev/test purpose).

Thanks in advance!

Hello @Angelo,

Thanks for your interest in Traefik!

Are they other routers attached to the postgres entryPoint?

thanks for your reply, Finally I managed to fix the issue.

It was my bad, I hadn't realized that the port was blocked by the cloud provider.

I've opened the port and everything worked as expected (after 1 week finally I managed :S ) !

I hope that will save some time to some other people with the same issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.