IngressRoute TCP - Service Does Not Exist Error

I am trying to create an IngressRouteTCP for a bitnami/postgres deployment (via helm) in my cluster using Traefik 2.5.3, however I am getting the following error:

I do have Traefik with a postgres entryPoint, which correctly appears in the dashboard; however, I have no TCP Services appearing there.

The bitnami/postgres chart creates the following service (excerpted from helm template):

# Source: postgresql/templates/svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: postgres-postgresql
  labels:
    app.kubernetes.io/name: postgresql
    helm.sh/chart: postgresql-10.12.7
    app.kubernetes.io/instance: postgres
    app.kubernetes.io/managed-by: Helm
  annotations:
  namespace: database
spec:
  type: ClusterIP
  ports:
    - name: tcp-postgresql
      port: 5432
      targetPort: tcp-postgresql
  selector:
    app.kubernetes.io/name: postgresql
    app.kubernetes.io/instance: postgres
    role: primary

I am trying to set up an IngressRouteTCP to allow connections to this service using:

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
  name: postgres-ingressroute
  namespace: database
spec:
  entryPoints:
    - postgres
  routes:
    - match: HostSNI(`*`)
      services:
        - name: postgres-postgresql
          port: 5432

I've done quite a few google searches, and what Iv'e found on stackoverflow says this should be working, so I'm at a loss.

Any help anyone can offer would be greatly appreciated.

Hello @astn and thanks for your interest in Traefik,

The IngressRouteTCP and Service configuration looks good. I reproduced the service error by having a service without endpoints. This means that no pods are selected because the selector does not match or the selected pods are not running. THe following error should be displayed in the logs:

Cannot create service: subset not found

Can you verify that your pods are running or that the selector matches?

Hope this helps!

Yep, you're right. Postgres was broken, but pretended it was working.

For posterity (anyone with the same problem in the future): My problem was file permissions on my nfs share, not traefik. I'm not sure what is going on with the combination of the bitnami/postgresql chart and the postgres docker image, but kubectl believed the pod was up and running, but you were correct that it was not. There was a single error in first run log of postgres; once the db was initialized it never appeared again (meaning I could uninstall and reinstall the cluster and never know I had a file permissions error---which I did dozens of times). It was only after a full teardown (including deleting the nfs share and re-creating it, which caused the init script to run again) that I caught it.

Thanks for your help and sorry to bother you with a problem where traefik was working correctly.