Traefik 502 error

Hello traefik community!
I’m being faced with an interesting problem.
I am self hosting an authentik stack and in the docker compose for authetik I am using the following traefik-related labels:

  server:
# More config irrelevant to this topic above this
    deploy:
      labels:
        traefik.enable: "true"
        traefik.http.routers.authentik.rule: "Host(`auth.domain.tld`)"
        traefik.http.services.authentik.loadbalancer.server.port: 89
        traefik.http.services.authentik.loadbalancer.server.scheme: "https"

For context, port 89 is authentik’s HTTP port, and port 9883 is authentik’s HTTPS port. Having said that, everytime I go to auth.domain.tld, I am met with a Bad Gateway error.
When I check traefik logs for when I visited the website, I am met with this:

Anyone have any idea?

When I check the server IP for the container which has the ports exposed, it’s this:
The service:

The container:

Interestingly, it says that the container has no published ports but the service does.

I removed the last flag and changed the port to 9000 and it worked. Who knew.