Postgres STARTTLS not working with Traefik 2.9.6

This is the first time I am using Traefik with Kubernetes.
Following this PR: https://github.com/traefik/traefik/issues/8971
I am trying to create access to multiple postgres databases behind Traefik ingress. But this is not working. I am using sslmode=require so that it initiates a TLS connection, "psql "sslmode=require host=pg1.example.com dbname=app_db""
Here is my ingressroutetcp menifest:

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: postgresql-ingress
  namespace: default
spec:
  entryPoints:
    - postgres
  routes:
    - match: HostSNI(`pg1.example.com`)
      services:
        - name: postgresql-dev
          namespace: default
          port: 5432
  tls: 
    secretName: tlssecret

Also, is there a way to get logs on tcp router? I have enanbled logging with DEBUG.

1 Like

Hello @utkarsh079 and thanks for your interest in Traefik,

The pull request https://github.com/traefik/traefik/pull/9377 which fixes https://github.com/traefik/traefik/issues/8971 has been merged in master. This means that the fix is not available in v2.9.6 but will be available in the next major release of Traefik.

1 Like